1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2015 Steve Sprang <scs@stevesprang.com>
3 ;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
4 ;;; Copyright © 2015 Aljosha Papsch <misc@rpapsch.de>
5 ;;; Copyright © 2016 Christopher Allan Webber <cwebber@dustycloud.org>
6 ;;; Copyright © 2016 Jessica Tallon <tsyesika@tsyesika.se>
7 ;;; Copyright © 2016 Andreas Enge <andreas@enge.fr>
8 ;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
9 ;;; Copyright © 2016, 2019, 2020 Alex Griffin <a@ajgrf.com>
10 ;;; Copyright © 2017 Leo Famulari <leo@famulari.name>
11 ;;; Copyright © 2017, 2018 Clément Lassieur <clement@lassieur.org>
12 ;;; Copyright © 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
13 ;;; Copyright © 2017 Jelle Licht <jlicht@fsfe.org>
14 ;;; Copyright © 2017, 2019 Eric Bavier <bavier@member.fsf.org>
15 ;;; Copyright © 2017, 2020 Nicolas Goaziou <mail@nicolasgoaziou.fr>
16 ;;; Copyright © 2017 Manolis Fragkiskos Ragkousis <manolis837@gmail.com>
17 ;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
18 ;;; Copyright © 2018 Marius Bakke <mbakke@fastmail.com>
19 ;;; Copyright © 2018 Konrad Hinsen <konrad.hinsen@fastmail.net>
20 ;;; Copyright © 2018 Thomas Sigurdsen <tonton@riseup.net>
21 ;;; Copyright © 2018 Arun Isaac <arunisaac@systemreboot.net>
22 ;;; Copyright © 2018 Pierre Neidhardt <mail@ambrevar.xyz>
23 ;;; Copyright © 2018 Amirouche Boubekki <amirouche@hypermove.net>
24 ;;; Copyright © 2018, 2019, 2020 Tim Gesthuizen <tim.gesthuizen@yahoo.de>
25 ;;; Copyright © 2019 Jens Mølgaard <jens@zete.tk>
26 ;;; Copyright © 2019 Tanguy Le Carrour <tanguy@bioneland.org>
27 ;;; Copyright © 2020 Guillaume Le Vaillant <glv@posteo.net>
28 ;;; Copyright © 2020 Brice Waegeneire <brice@waegenei.re>
29 ;;; Copyright © 2020 Jean-Baptiste Note <jean-baptiste.note@m4x.org>
30 ;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
31 ;;; Copyright © 2020 Vinicius Monego <monego@posteo.net>
33 ;;; This file is part of GNU Guix.
35 ;;; GNU Guix is free software; you can redistribute it and/or modify it
36 ;;; under the terms of the GNU General Public License as published by
37 ;;; the Free Software Foundation; either version 3 of the License, or (at
38 ;;; your option) any later version.
40 ;;; GNU Guix is distributed in the hope that it will be useful, but
41 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
42 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
43 ;;; GNU General Public License for more details.
45 ;;; You should have received a copy of the GNU General Public License
46 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
48 (define-module (gnu packages password-utils)
49 #:use-module ((guix licenses) #:prefix license:)
50 #:use-module (guix build-system cmake)
51 #:use-module (guix build-system gnu)
52 #:use-module (guix build-system go)
53 #:use-module (guix build-system trivial)
54 #:use-module (guix download)
55 #:use-module (guix git-download)
56 #:use-module (guix packages)
57 #:use-module (gnu packages)
58 #:use-module (gnu packages admin)
59 #:use-module (gnu packages aidc)
60 #:use-module (gnu packages authentication)
61 #:use-module (gnu packages base)
62 #:use-module (gnu packages check)
63 #:use-module (gnu packages compression)
64 #:use-module (gnu packages crypto)
65 #:use-module (gnu packages cryptsetup)
66 #:use-module (gnu packages curl)
67 #:use-module (gnu packages docbook)
68 #:use-module (gnu packages file)
69 #:use-module (gnu packages freedesktop)
70 #:use-module (gnu packages gettext)
71 #:use-module (gnu packages glib)
72 #:use-module (gnu packages gnupg)
73 #:use-module (gnu packages golang)
74 #:use-module (gnu packages gtk)
75 #:use-module (gnu packages guile)
76 #:use-module (gnu packages kerberos)
77 #:use-module (gnu packages libffi)
78 #:use-module (gnu packages linux)
79 #:use-module (gnu packages man)
80 #:use-module (gnu packages multiprecision)
81 #:use-module (gnu packages ncurses)
82 #:use-module (gnu packages nss)
83 #:use-module (gnu packages opencl)
84 #:use-module (gnu packages perl)
85 #:use-module (gnu packages pkg-config)
86 #:use-module (gnu packages python)
87 #:use-module (gnu packages python-web)
88 #:use-module (gnu packages python-xyz)
89 #:use-module (gnu packages readline)
90 #:use-module (gnu packages ruby)
91 #:use-module (gnu packages security-token)
92 #:use-module (gnu packages suckless)
93 #:use-module (gnu packages tcl)
94 #:use-module (gnu packages tls)
95 #:use-module (gnu packages qt)
96 #:use-module (gnu packages version-control)
97 #:use-module (gnu packages wxwidgets)
98 #:use-module (gnu packages xdisorg)
99 #:use-module (gnu packages xorg)
100 #:use-module (gnu packages xml)
101 #:use-module (guix build-system python))
110 (uri (string-append "mirror://sourceforge/pwgen/pwgen/" version
111 "/pwgen-" version ".tar.gz"))
113 (base32 "0yy90pqrr2pszzhb5hxjishq9qc7dqd290amiibqx9fm1b9kvc6s"))))
114 (build-system gnu-build-system)
116 `(#:tests? #f)) ; no test suite
117 (home-page "http://pwgen.sourceforge.net/")
118 (synopsis "Password generator")
119 (description "Pwgen generates passwords which can be easily memorized by a
121 (license license:gpl2)))
123 (define-public keepassxc
130 (uri (string-append "https://github.com/keepassxreboot/keepassxc"
131 "/releases/download/" version "/keepassxc-"
132 version "-src.tar.xz"))
134 (base32 "0f3ygnjzjijqmmrvrslwsbnz208jgxp5bwy4p336w3bn1bggl6qh"))))
135 (build-system cmake-build-system)
137 '(#:configure-flags '("-DWITH_XC_ALL=YES"
138 "-DWITH_XC_UPDATECHECK=NO")
140 (modify-phases %standard-phases
141 (add-after 'install 'wrap-bin
142 (lambda* (#:key outputs inputs #:allow-other-keys)
143 (let ((out (assoc-ref outputs "out")))
144 (wrap-program (string-append out "/bin/keepassxc")
145 `("QT_PLUGIN_PATH" ":" prefix
146 ,(map (lambda (label)
147 (string-append (assoc-ref inputs label)
149 '("qtbase" "qtsvg")))))
152 `(("asciidoctor" ,ruby-asciidoctor)
153 ("qttools" ,qttools)))
156 ("libgcrypt" ,libgcrypt)
157 ("libsodium" ,libsodium) ; XC_BROWSER
158 ("libyubikey" ,libyubikey) ; XC_YUBIKEY
161 ("qrencode" ,qrencode)
164 ("qtx11extras" ,qtx11extras)
165 ("quazip" ,quazip) ; XC_KEESHARE
166 ("readline" ,readline)
167 ("yubikey-personalization" ,yubikey-personalization) ; XC_YUBIKEY
169 (home-page "https://www.keepassxc.org")
170 (synopsis "Password manager")
171 (description "KeePassXC is a password manager or safe which helps you to
172 manage your passwords in a secure way. You can put all your passwords in one
173 database, which is locked with one master key or a key-file which can be stored
174 on an external storage device. The databases are encrypted using the
175 algorithms AES or Twofish.")
176 ;; While various parts of the software are licensed under different licenses,
177 ;; the combined work falls under the GPLv3.
178 (license license:gpl3)))
180 (define-public keepassx
187 (uri (string-append "https://www.keepassx.org/releases/" version
188 "/keepassx-" version ".tar.gz"))
191 "1ia7cqx9ias38mnffsl7da7g1f66bcbjsi23k49sln0c6spb9zr3"))))
192 (build-system cmake-build-system)
194 `(("libgcrypt" ,libgcrypt)
200 (home-page "https://www.keepassx.org")
201 (synopsis "Password manager")
202 (description "KeePassX is a password manager or safe which helps you to
203 manage your passwords in a secure way. You can put all your passwords in one
204 database, which is locked with one master key or a key-file which can be stored
205 on an external storage device. The databases are encrypted using the
206 algorithms AES or Twofish.")
207 ;; Non functional parts use various licences.
208 (license license:gpl3)
209 (properties `((superseded . ,keepassxc)))))
211 (define-public pwsafe
215 (home-page "https://www.pwsafe.org/")
220 (url "https://github.com/pwsafe/pwsafe")
223 (base32 "0d51dlw98mv23nwb0b5jyji8gnb9f5cnig6kivfljl97lmr6lhvf"))
224 (file-name (git-file-name name version))))
225 (build-system cmake-build-system)
227 `(("gettext" ,gettext-minimal)
228 ("gtest" ,googletest)
231 (inputs `(("curl" ,curl)
233 ("libuuid" ,util-linux "lib")
237 ("qrencode" ,qrencode)
238 ("wxwidgets" ,wxwidgets)
239 ("xerces-c" ,xerces-c)))
240 (arguments '(#:configure-flags (list "-DNO_GTEST=YES")
241 #:phases (modify-phases %standard-phases
242 (add-after 'unpack 'add-gtest
243 (lambda* (#:key inputs #:allow-other-keys)
244 (chmod "CMakeLists.txt" #o644)
245 (let ((cmake-port (open-file "CMakeLists.txt"
247 (display "find_package(GTest)
248 add_subdirectory(src/test)\n" cmake-port)
251 (synopsis "Password safe with automatic input and key generation")
252 (description "pwsafe is a password manager originally designed by Bruce
253 Schneier. It offers a simple UI to manage passwords for different services.
254 There are other programs that support the file format on different
256 (license license:artistic2.0)))
258 (define-public shroud
264 (uri (string-append "https://files.dthompson.us/shroud/shroud-"
268 "1l2shrhvcwfzkar9qiwb75nhcqmx25iz55lzmz0c187nbjhqzi9p"))))
269 (build-system gnu-build-system)
271 `(("pkg-config" ,pkg-config)))
273 `(#:modules ((guix build gnu-build-system)
278 (modify-phases %standard-phases
279 (add-after 'install 'wrap-shroud
280 (lambda* (#:key inputs outputs #:allow-other-keys)
281 (let* ((out (assoc-ref outputs "out"))
282 (guile (assoc-ref inputs "guile"))
283 (effective (read-line
284 (open-pipe* OPEN_READ
285 (string-append guile "/bin/guile")
286 "-c" "(display (effective-version))")))
287 (ccachedir (string-append out
288 "/lib/guile/" effective "/site-ccache"))
289 (prog (string-append out "/bin/shroud")))
291 `("GUILE_LOAD_COMPILED_PATH" ":" prefix (,ccachedir)))
294 `(("guile" ,guile-2.2)
297 (synopsis "GnuPG-based secret manager")
298 (description "Shroud is a simple secret manager with a command line
299 interface. The password database is stored as a Scheme s-expression and
300 encrypted with a GnuPG key. Secrets consist of an arbitrary number of
301 key/value pairs, making Shroud suitable for more than just password storage.
302 For copying and pasting secrets into web browsers and other graphical
303 applications, there is xclip integration." )
304 (home-page "https://dthompson.us/projects/shroud.html")
305 (license license:gpl3+)))
314 (uri (string-append "https://yapet.guengel.ch/downloads/yapet-"
317 (base32 "0b1v0whf70dfjzlwqwwvfv526s828skjvm4xvwly3vcvcmpz59sh"))))
318 (build-system gnu-build-system)
322 ("openssl" ,openssl)))
324 `(("cppunit" ,cppunit)
325 ("pkg-config" ,pkg-config)))
326 (synopsis "Yet Another Password Encryption Tool")
327 (description "YAPET is a text based password manager using the Blowfish
328 encryption algorithm. Because of its small footprint and very few library
329 dependencies, it is suited for installing on desktop and server systems alike.
330 The text based user interface allows you to run YAPET easily in a Secure Shell
331 session. Two companion utilities enable users to convert CSV files to YAPET
333 (home-page "https://yapet.guengel.ch/")
334 (license license:gpl3+)))
336 (define-public cracklib
343 (uri (string-append "https://github.com/cracklib/cracklib/"
344 "releases/download/v" version "/"
345 "cracklib-" version ".tar.bz2"))
347 (base32 "1rimpjsdnmw8f5b7k558cic41p2qy2n2yrlqp5vh7mp4162hk0py"))))
348 (build-system gnu-build-system)
351 (modify-phases %standard-phases
352 (add-after 'install 'install-dict
353 (lambda* (#:key make-flags #:allow-other-keys)
355 (chmod (string-append "util/cracklib-format") #o755)
356 (apply invoke "make" "dict" make-flags)
358 (synopsis "Password checking library")
359 (home-page "https://github.com/cracklib/cracklib")
361 "CrackLib is a library containing a C function which may be used in a
362 @command{passwd}-like program. The idea is simple: try to prevent users from
363 choosing passwords that could easily be guessed (or \"cracked\") by filtering
364 them out, at the source.")
365 (license license:lgpl2.1)))
367 (define-public libpwquality
369 (name "libpwquality")
374 (string-append "https://github.com/libpwquality/libpwquality"
375 "/releases/download/libpwquality-" version
376 "/libpwquality-" version ".tar.bz2")
377 (string-append "https://launchpad.net/libpwquality/trunk/"
378 version "/+download/"
379 "libpwquality-" version ".tar.bz2")))
382 "0id5a8bi8xnjg11g9vzrl2xbpx65mfxclxcvis7zx1v8vhisyfyl"))))
383 (build-system gnu-build-system)
386 (modify-phases %standard-phases
387 (add-before 'configure 'set-LDFLAGS
388 (lambda* (#:key inputs outputs #:allow-other-keys)
392 (assoc-ref outputs "out") "/lib"))
395 `(("python" ,python-wrapper)))
397 `(("cracklib" ,cracklib)))
398 (synopsis "Password quality checker")
399 (home-page "https://github.com/libpwquality/libpwquality")
401 "Libpwquality is a library for password quality checking and generation of
402 random passwords that pass the checks.")
403 (license license:gpl2+)))
405 (define-public assword
413 "http://http.debian.net/debian/pool/main/a/assword/"
414 "assword_" version ".orig.tar.gz")))
417 "03gkb6kvsghznbcw5l7nmrc6mn3ixkjd5jcs96ni4zs9l47jf7yp"))))
419 `(;; irritatingly, tests do run but not there are two problems:
420 ;; - "import gtk" fails for unknown reasons here despite it the
421 ;; program working (indeed, I've found I have to do a logout and log
422 ;; back in in after an install order for some mumbo jumbo environment
423 ;; variable mess to work with pygtk and assword... what's up with
425 ;; - even when the tests fail, they don't return a nonzero status,
426 ;; so I'm not sure how to programmatically get that information
429 (modify-phases %standard-phases
430 (add-after 'install 'wrap-assword
431 (lambda* (#:key outputs #:allow-other-keys)
432 (let ((prog (string-append
433 (assoc-ref outputs "out")
435 (gi-typelib-path (getenv "GI_TYPELIB_PATH")))
437 `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path)))
439 (add-after 'install 'manpage
440 (lambda* (#:key outputs #:allow-other-keys)
441 ;; Without this substitution, it fails with
442 ;; ImportError: No module named 'gpg'
443 (substitute* "Makefile"
444 (("PYTHONPATH=.") ""))
445 (invoke "make" "assword.1")
448 (string-append (assoc-ref outputs "out") "/share/man/man1")))))))
449 (build-system python-build-system)
451 `(("txt2man" ,txt2man)))
454 ("python-xdo" ,python-xdo)
455 ("python-gpg" ,python-gpg)
456 ("python-pygobject" ,python-pygobject)))
459 (home-page "https://finestructure.net/assword/")
460 (synopsis "Password manager")
461 (description "assword is a simple password manager using GPG-wrapped
462 JSON files. It has a command line interface as well as a very simple
463 graphical interface, which can even \"type\" your passwords into
465 (license license:gpl3+)))
467 (define-public password-store
469 (name "password-store")
474 (string-append "https://git.zx2c4.com/password-store/snapshot/"
475 name "-" version ".tar.xz"))
478 "1x53k5dn3cdmvy8m4fqdld4hji5n676ksl0ql4armkmsds26av1b"))))
479 (build-system gnu-build-system)
482 (modify-phases %standard-phases
485 (add-before 'install 'patch-system-extension-dir
486 (lambda* (#:key outputs #:allow-other-keys)
487 (let* ((out (assoc-ref outputs "out"))
488 (extension-dir (string-append out "/lib/password-store/extensions")))
489 (substitute* "src/password-store.sh"
490 (("^SYSTEM_EXTENSION_DIR=.*$")
491 ;; lead with whitespace to prevent 'make install' from
492 ;; overwriting it again
493 (string-append " SYSTEM_EXTENSION_DIR=\""
494 "${PASSWORD_STORE_SYSTEM_EXTENSION_DIR:-"
498 (add-before 'install 'patch-passmenu-path
499 (lambda* (#:key inputs #:allow-other-keys)
500 (substitute* "contrib/dmenu/passmenu"
501 (("dmenu") (string-append (assoc-ref inputs "dmenu")
503 (("xdotool") (string-append (assoc-ref inputs "xdotool")
506 (add-after 'install 'install-passmenu
507 (lambda* (#:key outputs #:allow-other-keys)
508 (let* ((out (assoc-ref outputs "out"))
509 (bin (string-append out "/bin")))
510 (install-file "contrib/dmenu/passmenu" bin)
512 (add-after 'install 'wrap-path
513 (lambda* (#:key inputs outputs #:allow-other-keys)
514 (let ((out (assoc-ref outputs "out"))
515 (path (map (lambda (pkg)
516 (string-append (assoc-ref inputs pkg) "/bin"))
517 '("coreutils" "getopt" "git" "gnupg" "qrencode"
518 "sed" "tree" "which" "xclip"))))
519 (wrap-program (string-append out "/bin/pass")
520 `("PATH" ":" prefix (,(string-join path ":"))))
522 #:make-flags (list "CC=gcc" (string-append "PREFIX=" %output)
524 (string-append "BASHCOMPDIR="
525 %output "/etc/bash_completion.d"))
526 ;; Parallel tests may cause a race condition leading to a
527 ;; timeout in some circumstances.
529 #:test-target "test"))
531 (list (search-path-specification
532 (variable "PASSWORD_STORE_SYSTEM_EXTENSION_DIR")
533 (separator #f) ;single entry
534 (files '("lib/password-store/extensions")))))
537 ("getopt" ,util-linux)
540 ("qrencode" ,qrencode)
545 ("xdotool" ,xdotool)))
546 (home-page "https://www.passwordstore.org/")
547 (synopsis "Encrypted password manager")
548 (description "Password-store is a password manager which uses GnuPG to
549 store and retrieve passwords. The tool stores each password in its own
550 GnuPG-encrypted file, allowing the program to be simple yet secure.
551 Synchronization is possible using the integrated git support, which commits
552 changes to your password database to a git repository that can be managed
553 through the pass command.")
554 (license license:gpl2+)))
556 (define-public pass-otp
564 (string-append "https://github.com/tadfisher/pass-otp/releases/"
565 "download/v" version "/pass-otp-" version ".tar.gz"))
568 "0rrs3iazq80dn0wbl20xkh270428jd8l99m5gd7hl93s4r4sc82p"))))
569 (build-system gnu-build-system)
572 (let* ((out (assoc-ref %outputs "out"))
573 (bashcomp (string-append out "/etc/bash_completion.d")))
574 (list (string-append "PREFIX=" %output)
575 (string-append "BASHCOMPDIR=" bashcomp)))
577 (modify-phases %standard-phases
579 (add-after 'build 'patch-oath-path
580 (lambda* (#:key inputs #:allow-other-keys)
581 (substitute* "otp.bash"
585 (assoc-ref inputs "oath-toolkit")
588 #:test-target "test"))
590 `(("oath-toolkit" ,oath-toolkit)))
592 `(("password-store" ,password-store)
597 (home-page "https://github.com/tadfisher/pass-otp")
598 (synopsis "Pass extension for managing one-time-password (OTP) tokens")
600 "Pass OTP is an extension for password-store that allows adding
601 one-time-password (OTP) secrets, generating OTP codes, and displaying secret
602 key URIs using the standard otpauth:// scheme.")
603 (license license:gpl3+)))
605 (define-public qtpass
613 (url "https://github.com/IJHack/QtPass")
614 (commit (string-append "v" version))))
615 (file-name (git-file-name name version))
618 "0748hjvhjrybi33ci3c8hcr74k9pdrf5jv8npf9hrsrmdyy1kr9x"))))
619 (build-system gnu-build-system)
621 `(#:modules ((guix build gnu-build-system)
622 (guix build qt-utils)
624 #:imported-modules (,@%gnu-build-system-modules
625 (guix build qt-utils))
627 (modify-phases %standard-phases
629 (lambda* (#:key inputs outputs #:allow-other-keys)
630 (let ((out (assoc-ref outputs "out")))
631 ;; lupdate/lrelease need to find qmake.
632 (setenv "QMAKE" "qmake")
633 ;; qmake needs to find lrelease/lupdate.
635 "QMAKE_LRELEASE=lrelease"
636 "QMAKE_LUPDATE=lupdate"
637 (string-append "PREFIX=" out)))))
638 (add-after 'configure 'reset-resource-timestamps
639 ;; Reset timestamps on localization files for a reproducible build.
641 (with-directory-excursion "localization"
642 (for-each (lambda (file)
643 (let* ((base (basename file ".qm"))
644 (src (string-append base ".ts"))
646 (set-file-time file st)))
647 (find-files "." ".*\\.qm")))
649 (add-after 'install 'install-auxilliary
650 ;; Install man-page, icon and .desktop file.
651 (lambda* (#:key inputs outputs #:allow-other-keys)
652 (let* ((out (assoc-ref outputs "out"))
653 (applications (string-append out "/share/applications"))
654 (icons (string-append out "/share/icons/hicolor/scalable/apps"))
655 (man (string-append out "/share/man/man1")))
656 (install-file "qtpass.desktop" applications)
657 (install-file "artwork/icon.svg" icons)
658 (rename-file (string-append icons "/icon.svg")
659 (string-append icons "/qtpass-icon.svg"))
660 (install-file "qtpass.1" man)
662 (add-after 'install 'wrap-qt
663 (lambda* (#:key outputs #:allow-other-keys)
664 (wrap-qt-program (assoc-ref outputs "out") "qtpass")
666 (add-before 'check 'check-setup
667 ;; Make Qt render "offscreen", required for tests.
669 (setenv "QT_QPA_PLATFORM" "offscreen")
672 `(("qttools" ,qttools)))
676 (home-page "https://qtpass.org")
677 (synopsis "GUI for password manager password-store")
679 "Qt-based graphical user interface for the password manager
680 password-store also known as pass. Can use either pass or gpg to interact
681 with password-store files. Features configurable password generation,
682 templates, clipboard handling, and per folder settings for multi-recipient
684 (license license:gpl3+)))
686 (define-public rofi-pass
694 (string-append "https://raw.githubusercontent.com/carnager/rofi-pass/"
695 version "/rofi-pass"))
697 (base32 "0msldkndqp40nx1s5s7ggcr97ir4nshpmnyzvj5hqw1l7m3gvw6j"))
699 (build-system trivial-build-system)
701 `(#:modules ((guix build utils))
704 (use-modules (guix build utils))
705 (let ((source (string-append (assoc-ref %build-inputs "source")))
707 (out (assoc-ref %outputs "out")))
708 (copy-file source script)
710 (install-file script (string-append out "/bin"))))))
712 `(("password-store" ,password-store)
714 ("xdotool" ,xdotool)))
715 (home-page "https://github.com/carnager/rofi-pass")
716 (synopsis "Rofi frontend for password-store")
717 (description "Rofi-pass provides a way to manipulate information stored
718 using password-store through rofi interface:
720 @item open URLs of entries with hotkey;
721 @item type any field from entry;
722 @item auto-typing of user and/or password fields;
723 @item auto-typing username based on path;
724 @item auto-typing of more than one field, using the autotype entry;
725 @item bookmarks mode (open stored URLs in browser, default: Alt+x).
727 (license license:gpl3)))
729 (define-public browserpass-native
731 (name "browserpass-native")
737 (url "https://github.com/browserpass/browserpass-native")
739 (file-name (git-file-name name version))
742 "1jkjslbbac49xjyjkc2b07phdm3i64z40kh6h55cl22dxjmpp1nb"))))
743 (build-system go-build-system)
745 `(#:import-path "github.com/browserpass/browserpass-native"
748 (modify-phases %standard-phases
749 (add-before 'build 'patch-makefile
750 (lambda* (#:key outputs #:allow-other-keys)
751 (let ((out (assoc-ref outputs "out")))
752 ;; This doesn't go in #:make-flags because the Makefile itself
755 "src/github.com/browserpass/browserpass-native/Makefile"
756 (("PREFIX \\?= /usr")
757 (string-append "PREFIX ?= " out)))
759 (add-before 'build 'configure
761 (with-directory-excursion
762 "src/github.com/browserpass/browserpass-native"
763 (invoke "make" "configure"))
767 (with-directory-excursion
768 "src/github.com/browserpass/browserpass-native"
773 (with-directory-excursion
774 "src/github.com/browserpass/browserpass-native"
775 (invoke "make" "install"))
777 (add-after 'install 'wrap-executable
778 (lambda* (#:key inputs outputs #:allow-other-keys)
779 (let ((out (assoc-ref outputs "out"))
780 (gnupg (assoc-ref inputs "gnupg")))
781 (wrap-program (string-append out "/bin/browserpass")
783 (,(string-append gnupg "/bin"))))
789 ("go-github-com-mattn-go-zglob" ,go-github-com-mattn-go-zglob)
790 ("go-github-com-rifflock-lfshook" ,go-github-com-rifflock-lfshook)
791 ("go-github-com-sirupsen-logrus" ,go-github-com-sirupsen-logrus)
792 ("go-golang-org-x-sys" ,go-golang-org-x-sys)))
793 (home-page "https://github.com/browserpass/browserpass-native")
794 (synopsis "Browserpass native messaging host")
795 (description "Browserpass is a browser extension for pass, a
796 UNIX-based password store manager. It allows you to auto-fill or copy to
797 clipboard credentials for the current domain, protecting you from phishing
800 This package only contains the Browserpass native messaging host. You must
801 also install the browser extension for GNU IceCat or ungoogled-chromium
803 (license license:isc)))
805 (define-public argon2
813 (url "https://github.com/P-H-C/phc-winner-argon2")
815 (file-name (git-file-name name version))
818 "01rwanr4wmr9vm6c712x411wig543q195z2icn388z892a93lc7p"))))
819 (build-system gnu-build-system)
821 `(#:test-target "test"
822 #:make-flags (list "CC=gcc"
823 (string-append "PREFIX=" (assoc-ref %outputs "out"))
825 (string-append "ARGON2_VERSION=" ,version)
826 "OPTTEST=1") ; disable CPU optimization
828 (modify-phases %standard-phases
829 (delete 'configure)))) ; No configure script.
830 (home-page "https://www.argon2.com/")
831 (synopsis "Password hashing library")
832 (description "Argon2 provides a key derivation function that was declared
833 winner of the 2015 Password Hashing Competition.")
834 ;; Argon2 is dual licensed under CC0 and ASL 2.0. Some of the source
835 ;; files are CC0 only; see README.md and LICENSE for details.
836 (license (list license:cc0 license:asl2.0))))
838 (define-public pass-git-helper
840 (name "pass-git-helper")
846 (url "https://github.com/languitar/pass-git-helper")
847 (commit (string-append "v" version))))
848 (file-name (git-file-name name version))
851 "18nvwlp0w4aqj268wly60rnjzqw2d8jl0hbs6bkwp3hpzzz5g6yd"))))
852 (build-system python-build-system)
855 (modify-phases %standard-phases
856 (add-before 'build 'patch-pass-path
857 (lambda* (#:key inputs #:allow-other-keys)
858 (let* ((password-store (assoc-ref inputs "password-store"))
859 (pass (string-append password-store "/bin/pass")))
860 (substitute* '("passgithelper.py"
861 "test_passgithelper.py")
862 (("'pass'") (string-append "'" pass "'")))
866 (setenv "HOME" (getcwd))
867 (invoke "pytest"))))))
869 `(("python-pyxdg" ,python-pyxdg)
870 ("password-store" ,password-store)))
872 `(("python-pytest" ,python-pytest)
873 ("python-pytest-mock" ,python-pytest-mock)))
874 (home-page "https://github.com/languitar/pass-git-helper")
875 (synopsis "Git credential helper interfacing with pass")
876 (description "pass-git-helper is a git credential helper which
877 uses pass, the standard unix password manager, as the credential backend for
878 your git repositories. This is achieved by explicitly defining mappings
879 between hosts and entries in the password store.")
880 (license license:lgpl3+)))
882 (define-public john-the-ripper-jumbo
883 (let ((official-version "1.9.0")
886 (name "john-the-ripper-jumbo")
887 (version (string-append official-version "-" jumbo-version))
891 (uri (string-append "http://www.openwall.com/john/j/john-"
892 official-version "-jumbo-" jumbo-version ".tar.xz"))
895 "0fvz3v41hnaiv1ggpxanfykyfjq79cwp9qcqqn63vic357w27lgm"))))
896 (build-system gnu-build-system)
903 ("openssl" ,openssl-1.0)
904 ("python" ,python-2) ; For "python" and "python2" shebangs
905 ("ruby" ,ruby) ; For genincstats.rb
909 (list "--with-systemwide"
910 ;; Do not test for instruction set in configure, and do not
911 ;; pass '-march=native' to gcc:
912 "--disable-native-tests"
913 "--disable-native-march"
916 (let ((system (or (%current-target-system)
919 ((or (string-prefix? "x86_64" system)
920 (string-prefix? "i686" system)) "sse2")
921 ((string-prefix? "aarch" system) "neon")
924 (modify-phases %standard-phases
925 (add-before 'configure 'chdir-src
926 (lambda _ (chdir "src") #t))
929 (let ((bindir (string-append %output "/bin"))
930 (docdir (string-append %output "/share/doc/john"))
931 (execdir (string-append %output "/libexec/john"))
932 (datadir (string-append %output "/share/john"))
933 (install-file-to (lambda (dir)
934 (lambda (f) (install-file f dir))))
935 (symlink? (lambda (_ s) (eq? (stat:type s) 'symlink))))
936 (with-directory-excursion "../run"
937 (for-each (install-file-to bindir)
939 "john" "makechr" "cprepair" "SIPdump" "tgtsnarf"
940 "genmkvpwd" "mkvcalcproba" "calc_stat" "raw2dyna"
941 (find-files "." "(to|2)?john(-[^.]*)?$")))
942 (for-each (lambda (f) ; Install symlinked aliases
943 (let ((tgt (string-append bindir "/" (basename f))))
944 ;; The use of install-file above dereferences
945 ;; symlinks. We'd rather have the symlinks
946 ;; for clarity, so remove tgt before linking.
947 (when (file-exists? tgt) (delete-file tgt))
948 (symlink "john" tgt)))
949 (find-files "." symlink?))
950 (for-each (install-file-to execdir)
951 (cons* "mailer" "benchmark-unify" "relbench"
952 (find-files "." ".*\\.js")))
953 (for-each (lambda (f)
954 (let* ((base (basename f))
955 (name (substring base 0 (string-index base #\.)))
956 (link (string-append bindir "/" name)))
957 (install-file f execdir)
958 (when (and (executable-file? f)
959 (not (file-exists? link)))
960 (symlink (string-append execdir "/" base) link))))
961 (find-files "." ".*\\.(pl|py|rb|lua)"))
962 (for-each (install-file-to datadir)
963 (append (find-files "." "(stats|dictionary.*)")
964 (find-files "." "(.*\\.chr|.*\\.lst)")
965 (find-files "." ".*\\.conf")))
966 (copy-recursively "rules" (string-append datadir "/rules")))
967 (copy-recursively "../doc" docdir)
969 (delete 'check) ; Tests need installed .conf files; move after install
970 (add-after 'install 'check
972 (setenv "HOME" "/tmp") ; Some tests need to write to ~/.john
973 (setenv "OMP_NUM_THREADS" (number->string (parallel-job-count)))
974 (apply (assoc-ref %standard-phases 'check) args))))))
975 (home-page "http://www.openwall.com/john/")
976 (synopsis "Password cracker")
977 (description "John the Ripper is a fast password cracker. Its primary
978 purpose is to detect weak Unix passwords. Besides several @code{crypt}
979 password hash types most commonly found on various Unix systems, supported out
980 of the box are Windows LM hashes, plus lots of other hashes and ciphers. This
981 is the community-enhanced, \"jumbo\" version of John the Ripper.")
982 (license license:gpl2+))))
991 (uri (pypi-uri "sala" version))
994 "13qgmc3i2a0cqp8jqrfl93lnphfagb32pgfikc1gza2a14asxzi8"))))
995 (build-system python-build-system)
997 ;; Sala is supposed to work with Python 3.2 or higher,
998 ;; but it doesn't work with Python 3.6. Better stick
999 ;; to Python 2, which works fine.
1000 `(#:python ,python-2))
1004 (home-page "http://www.digip.org/sala/")
1005 (synopsis "Encrypted plaintext password store")
1007 "Store passwords and other bits of sensitive plain-text information
1008 to encrypted files on a directory hierarchy. The information is protected
1009 by GnuPG's symmetrical encryption.")
1010 (license license:expat)))
1018 (uri (string-append "https://als.regnet.cz/fpm2/download/fpm2-"
1019 version ".tar.bz2"))
1022 "19sdy1lygfhkg5nxi2w9a4d9kwvw24nxp0ix0p0lz91qpvk9qpnm"))))
1023 (build-system gnu-build-system)
1024 (inputs `(("gtk2" ,gtk+-2)
1026 ("libxml2" ,libxml2)))
1027 (native-inputs `(("pkg-config" ,pkg-config)
1028 ("intltool" ,intltool)))
1031 (modify-phases %standard-phases
1032 (add-before 'configure 'pre-configure
1033 ;; The file po/POTFILES.in ends up missing for some reason in
1034 ;; both nix and guix builds. Adding the file with contents
1035 ;; found during troubleshooting.
1037 (call-with-output-file "po/POTFILES.in"
1039 (format port "data/fpm2.desktop.in
1040 data/fpm2.desktop.in.in
1050 (synopsis "Manage, generate and store passwords encrypted")
1051 (description "FPM2 is GTK2 port from Figaro's Password Manager
1052 originally developed by John Conneely, with some new enhancements.
1054 Upstream development seems to have stopped. It is therefore recommended
1055 to use a different password manager.")
1056 (home-page "https://als.regnet.cz/fpm2/")
1057 (license license:gpl2+)))
1059 (define-public pass-rotate
1061 (name "pass-rotate")
1067 (url "https://github.com/ddevault/pass-rotate")
1069 (file-name (git-file-name name version))
1072 "1m067vvdlc85csbpkp8aw4s3ags7q8s3jszrr32kmj9qhk5c254f"))))
1073 (build-system python-build-system)
1075 `(("python-beautifulsoup4" ,python-beautifulsoup4)
1076 ("python-docopt" ,python-docopt)
1077 ("python-html5lib" ,python-html5lib)
1078 ("python-requests" ,python-requests)))
1079 (home-page "https://github.com/ddevault/pass-rotate")
1080 (synopsis "Rotate password on online services")
1081 (description "pass-rotate is a command line utility and python library for
1082 rotating passwords on various web services. It makes it easier to rotate your
1083 passwords, one at a time or in bulk, when security events or routine upkeep of
1084 your online accounts makes it necessary.")
1085 (license license:expat)))
1087 (define-public hashcat
1094 (uri (string-append "https://hashcat.net/files/hashcat-"
1098 "104z63m7lqbb0sdrxhf9yi15l4a9zwf9m6zs9dbb3gf0nfxl1h9r"))))
1100 `(("opencl-headers" ,opencl-headers)))
1101 (build-system gnu-build-system)
1103 '(#:tests? #f ;no tests
1104 #:make-flags (list (string-append "PREFIX=" %output))
1106 (modify-phases %standard-phases
1107 (delete 'configure))))
1108 (home-page "https://hashcat.net/hashcat/")
1109 (synopsis "Advanced password recovery utility")
1110 (description "Hashcat is an password recovery utility, supporting five
1111 unique modes of attack for over 200 highly-optimized hashing algorithms.
1112 Hashcat currently supports CPUs, GPUs, and other hardware accelerators on
1113 Linux, Windows, and macOS, and has facilities to help enable distributed
1114 password cracking.")
1115 (license license:expat)))
1117 (define-public hashcat-utils
1119 (name "hashcat-utils")
1124 (uri (string-append "https://github.com/hashcat/hashcat-utils/releases/"
1125 "download/v" version "/"
1126 "hashcat-utils-" version ".7z"))
1128 (base32 "0kq555kb338691qd7zjmi8vhq4km3apnsl2w63zh0igwzcjx6lx1"))))
1130 `(("p7zip" ,p7zip)))
1133 (build-system gnu-build-system)
1135 `(#:tests? #f ;no tests
1136 #:make-flags (list "CC=gcc"
1137 ;; Upstream bug(?): "make all" seems to remove the
1138 ;; Perl scripts from the source.
1141 (modify-phases %standard-phases
1143 (lambda* (#:key source #:allow-other-keys)
1144 (invoke "7z" "x" source)
1145 (chdir (string-append "hashcat-utils-" ,version "/src"))
1149 (lambda* (#:key outputs #:allow-other-keys)
1150 (let ((out (string-append (assoc-ref outputs "out") "/bin")))
1154 (copy-file file (string-append out "/"
1155 (basename file ".bin"))))
1156 (find-files "." "\\.bin$"))
1159 (copy-file file (string-append out "/"
1160 (basename file ".pl"))))
1161 (find-files "../bin" "\\.pl$"))
1163 (home-page "https://github.com/hashcat/hashcat-utils/")
1164 (synopsis "Small utilities that are useful in advanced password cracking")
1165 (description "Hashcat-utils are a set of small utilities that are useful
1166 in advanced password cracking. They all are packed into multiple stand-alone
1167 binaries. All of these utils are designed to execute only one specific
1168 function. Since they all work with @code{STDIN} and @code{STDOUT} you can
1169 group them into chains.")
1170 (license license:expat)))
1172 (define-public bruteforce-luks
1174 (name "bruteforce-luks")
1179 (uri (string-append "https://github.com/glv2/bruteforce-luks/releases/download/"
1185 (base32 "0yawrlbbklhmvwr99wm7li3r0d5kxvpkwf33a12rji7z0ya5p340"))))
1186 (build-system gnu-build-system)
1190 `(("cryptsetup" ,cryptsetup)))
1191 (synopsis "LUKS encrypted volume cracker")
1193 "This is a cracker for LUKS encrypted volumes. It can be used either in
1194 exhaustive mode to try every password given a charset or in dictionary mode to
1195 try every password contained in a file.")
1196 (home-page "https://github.com/glv2/bruteforce-luks")
1197 (license license:gpl3+)))
1199 (define-public makepasswd
1200 (let ((commit "3545d57d3a589a392d7eb0df36a5286785345c9e")
1204 (version (git-version "0.5.4" revision commit))
1209 (url "https://github.com/khorben/makepasswd")
1211 (file-name (git-file-name name version))
1213 (base32 "0lspqyyxbk6h28yxnp7pd5aib161vrkzgasam5jpzn35n1jacx2j"))))
1214 (build-system gnu-build-system)
1216 `(("pkg-config" ,pkg-config)
1217 ("libxslt" ,libxslt)
1218 ("libxml2" ,libxml2)
1219 ("docbook-xsl" ,docbook-xsl)
1220 ("docbook-xml" ,docbook-xml)))
1222 `(("openssl" ,openssl)))
1225 (modify-phases %standard-phases
1226 (delete 'configure))
1227 #:make-flags (list "CC=gcc"
1228 (string-append "PREFIX=" (assoc-ref %outputs "out")))
1229 #:tests? #f)) ;no tests
1230 (synopsis "Generate (pseudo-)random passwords and hashes")
1232 "Makepasswd is a program that generates pseudo-random passwords of a
1233 desired length. It can also generate their corresponding hashes for a given
1234 encryption algorithm if so desired.")
1235 (home-page "https://github.com/khorben/makepasswd")
1236 (license license:gpl3))))
1238 (define-public pass-tomb
1246 (url "https://github.com/roddhjav/pass-tomb")
1247 (commit (string-append "v" version))))
1248 (file-name (git-file-name name version))
1250 (base32 "1qj7vx7svk1ljwihj3kv310k17mafnf919n30n4qn1yxmmsvj924"))))
1251 (build-system gnu-build-system)
1254 (let ((out (assoc-ref %outputs "out")))
1255 (list (string-append "PREFIX=" out)
1256 (string-append "BASHCOMPDIR=" out "/etc/bash_completion.d")))
1257 #:test-target "tests"
1258 ;; tests are very dependent on system state (swap partition) and require
1259 ;; access to /tmp/zsh which is not in the build container.
1262 (modify-phases %standard-phases
1263 (add-after 'unpack 'set-tomb-path
1264 (lambda* (#:key inputs #:allow-other-keys)
1265 (let ((tomb (assoc-ref inputs "tomb")))
1266 (substitute* "tomb.bash"
1268 (string-append ":-" tomb "/bin/tomb"))))))
1269 (delete 'configure))))
1272 (home-page "https://github.com/roddhjav/pass-tomb")
1273 (synopsis "Pass extension keeping the tree of passwords encrypted")
1274 (description "Pass-tomb provides a convenient solution to put your
1275 password store in a Tomb and then keep your password tree encrypted when you
1276 are not using it. It uses the same GPG key to encrypt passwords and tomb,
1277 therefore you don't need to manage more key or secret. Moreover, you can ask
1278 pass-tomb to automatically close your store after a given time.")
1279 (license license:gpl3+)))