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 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>
32 ;;; This file is part of GNU Guix.
34 ;;; GNU Guix is free software; you can redistribute it and/or modify it
35 ;;; under the terms of the GNU General Public License as published by
36 ;;; the Free Software Foundation; either version 3 of the License, or (at
37 ;;; your option) any later version.
39 ;;; GNU Guix is distributed in the hope that it will be useful, but
40 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
41 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
42 ;;; GNU General Public License for more details.
44 ;;; You should have received a copy of the GNU General Public License
45 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
47 (define-module (gnu packages password-utils)
48 #:use-module ((guix licenses) #:prefix license:)
49 #:use-module (guix build-system cmake)
50 #:use-module (guix build-system gnu)
51 #:use-module (guix build-system go)
52 #:use-module (guix build-system trivial)
53 #:use-module (guix download)
54 #:use-module (guix git-download)
55 #:use-module (guix packages)
56 #:use-module (gnu packages)
57 #:use-module (gnu packages admin)
58 #:use-module (gnu packages aidc)
59 #:use-module (gnu packages authentication)
60 #:use-module (gnu packages base)
61 #:use-module (gnu packages check)
62 #:use-module (gnu packages compression)
63 #:use-module (gnu packages crypto)
64 #:use-module (gnu packages cryptsetup)
65 #:use-module (gnu packages curl)
66 #:use-module (gnu packages docbook)
67 #:use-module (gnu packages file)
68 #:use-module (gnu packages freedesktop)
69 #:use-module (gnu packages gettext)
70 #:use-module (gnu packages glib)
71 #:use-module (gnu packages gnupg)
72 #:use-module (gnu packages golang)
73 #:use-module (gnu packages gtk)
74 #:use-module (gnu packages guile)
75 #:use-module (gnu packages kerberos)
76 #:use-module (gnu packages libffi)
77 #:use-module (gnu packages linux)
78 #:use-module (gnu packages man)
79 #:use-module (gnu packages multiprecision)
80 #:use-module (gnu packages ncurses)
81 #:use-module (gnu packages nss)
82 #:use-module (gnu packages opencl)
83 #:use-module (gnu packages perl)
84 #:use-module (gnu packages pkg-config)
85 #:use-module (gnu packages python)
86 #:use-module (gnu packages python-web)
87 #:use-module (gnu packages python-xyz)
88 #:use-module (gnu packages readline)
89 #:use-module (gnu packages ruby)
90 #:use-module (gnu packages security-token)
91 #:use-module (gnu packages suckless)
92 #:use-module (gnu packages tcl)
93 #:use-module (gnu packages tls)
94 #:use-module (gnu packages qt)
95 #:use-module (gnu packages version-control)
96 #:use-module (gnu packages wxwidgets)
97 #:use-module (gnu packages xdisorg)
98 #:use-module (gnu packages xorg)
99 #:use-module (gnu packages xml)
100 #:use-module (guix build-system python))
109 (uri (string-append "mirror://sourceforge/pwgen/pwgen/" version
110 "/pwgen-" version ".tar.gz"))
112 (base32 "0yy90pqrr2pszzhb5hxjishq9qc7dqd290amiibqx9fm1b9kvc6s"))))
113 (build-system gnu-build-system)
115 `(#:tests? #f)) ; no test suite
116 (home-page "http://pwgen.sourceforge.net/")
117 (synopsis "Password generator")
118 (description "Pwgen generates passwords which can be easily memorized by a
120 (license license:gpl2)))
122 (define-public keepassxc
129 (uri (string-append "https://github.com/keepassxreboot/keepassxc"
130 "/releases/download/" version "/keepassxc-"
131 version "-src.tar.xz"))
133 (base32 "1j4cmj5mv13m5b4ig950yas8ayybakqs366lp1cimmzw8ycparml"))))
134 (build-system cmake-build-system)
136 '(#:configure-flags '("-DWITH_XC_ALL=YES"
137 "-DWITH_XC_UPDATECHECK=NO")
139 (modify-phases %standard-phases
140 (add-after 'install 'wrap-bin
141 (lambda* (#:key outputs inputs #:allow-other-keys)
142 (let ((out (assoc-ref outputs "out")))
143 (wrap-program (string-append out "/bin/keepassxc")
144 `("QT_PLUGIN_PATH" ":" prefix
145 ,(map (lambda (label)
146 (string-append (assoc-ref inputs label)
148 '("qtbase" "qtsvg")))))
151 `(("asciidoctor" ,ruby-asciidoctor)
152 ("qttools" ,qttools)))
155 ("libgcrypt" ,libgcrypt)
156 ("libsodium" ,libsodium) ; XC_BROWSER
157 ("libyubikey" ,libyubikey) ; XC_YUBIKEY
160 ("qrencode" ,qrencode)
163 ("qtx11extras" ,qtx11extras)
164 ("quazip" ,quazip) ; XC_KEESHARE
165 ("readline" ,readline)
166 ("yubikey-personalization" ,yubikey-personalization) ; XC_YUBIKEY
168 (home-page "https://www.keepassxc.org")
169 (synopsis "Password manager")
170 (description "KeePassXC is a password manager or safe which helps you to
171 manage your passwords in a secure way. You can put all your passwords in one
172 database, which is locked with one master key or a key-file which can be stored
173 on an external storage device. The databases are encrypted using the
174 algorithms AES or Twofish.")
175 ;; While various parts of the software are licensed under different licenses,
176 ;; the combined work falls under the GPLv3.
177 (license license:gpl3)))
179 (define-public keepassx
186 (uri (string-append "https://www.keepassx.org/releases/" version
187 "/keepassx-" version ".tar.gz"))
190 "1ia7cqx9ias38mnffsl7da7g1f66bcbjsi23k49sln0c6spb9zr3"))))
191 (build-system cmake-build-system)
193 `(("libgcrypt" ,libgcrypt)
199 (home-page "https://www.keepassx.org")
200 (synopsis "Password manager")
201 (description "KeePassX is a password manager or safe which helps you to
202 manage your passwords in a secure way. You can put all your passwords in one
203 database, which is locked with one master key or a key-file which can be stored
204 on an external storage device. The databases are encrypted using the
205 algorithms AES or Twofish.")
206 ;; Non functional parts use various licences.
207 (license license:gpl3)
208 (properties `((superseded . ,keepassxc)))))
210 (define-public pwsafe
214 (home-page "https://www.pwsafe.org/")
219 (url "https://github.com/pwsafe/pwsafe")
222 (base32 "1ka7xsl63v0559fzf3pwc1iqr37gwr4vq5iaxa2hzar2g28hsxvh"))
223 (file-name (git-file-name name version))))
224 (build-system cmake-build-system)
226 `(("gettext" ,gettext-minimal)
227 ("gtest" ,googletest)
230 (inputs `(("curl" ,curl)
232 ("libuuid" ,util-linux "lib")
236 ("qrencode" ,qrencode)
237 ("wxwidgets" ,wxwidgets)
238 ("xerces-c" ,xerces-c)))
239 (arguments '(#:configure-flags (list "-DNO_GTEST=YES")
240 #:phases (modify-phases %standard-phases
241 (add-after 'unpack 'add-gtest
242 (lambda* (#:key inputs #:allow-other-keys)
243 (chmod "CMakeLists.txt" #o644)
244 (let ((cmake-port (open-file "CMakeLists.txt"
246 (display "find_package(GTest)
247 add_subdirectory(src/test)\n" cmake-port)
250 (synopsis "Password safe with automatic input and key generation")
251 (description "pwsafe is a password manager originally designed by Bruce
252 Schneier. It offers a simple UI to manage passwords for different services.
253 There are other programs that support the file format on different
255 (license license:artistic2.0)))
257 (define-public shroud
263 (uri (string-append "https://files.dthompson.us/shroud/shroud-"
267 "1l2shrhvcwfzkar9qiwb75nhcqmx25iz55lzmz0c187nbjhqzi9p"))))
268 (build-system gnu-build-system)
270 `(("pkg-config" ,pkg-config)))
272 `(#:modules ((guix build gnu-build-system)
277 (modify-phases %standard-phases
278 (add-after 'install 'wrap-shroud
279 (lambda* (#:key inputs outputs #:allow-other-keys)
280 (let* ((out (assoc-ref outputs "out"))
281 (guile (assoc-ref inputs "guile"))
282 (effective (read-line
283 (open-pipe* OPEN_READ
284 (string-append guile "/bin/guile")
285 "-c" "(display (effective-version))")))
286 (ccachedir (string-append out
287 "/lib/guile/" effective "/site-ccache"))
288 (prog (string-append out "/bin/shroud")))
290 `("GUILE_LOAD_COMPILED_PATH" ":" prefix (,ccachedir)))
293 `(("guile" ,guile-2.2)
296 (synopsis "GnuPG-based secret manager")
297 (description "Shroud is a simple secret manager with a command line
298 interface. The password database is stored as a Scheme s-expression and
299 encrypted with a GnuPG key. Secrets consist of an arbitrary number of
300 key/value pairs, making Shroud suitable for more than just password storage.
301 For copying and pasting secrets into web browsers and other graphical
302 applications, there is xclip integration." )
303 (home-page "https://dthompson.us/projects/shroud.html")
304 (license license:gpl3+)))
313 (uri (string-append "https://yapet.guengel.ch/downloads/yapet-"
316 (base32 "0b1v0whf70dfjzlwqwwvfv526s828skjvm4xvwly3vcvcmpz59sh"))))
317 (build-system gnu-build-system)
321 ("openssl" ,openssl)))
323 `(("cppunit" ,cppunit)
324 ("pkg-config" ,pkg-config)))
325 (synopsis "Yet Another Password Encryption Tool")
326 (description "YAPET is a text based password manager using the Blowfish
327 encryption algorithm. Because of its small footprint and very few library
328 dependencies, it is suited for installing on desktop and server systems alike.
329 The text based user interface allows you to run YAPET easily in a Secure Shell
330 session. Two companion utilities enable users to convert CSV files to YAPET
332 (home-page "https://yapet.guengel.ch/")
333 (license license:gpl3+)))
335 (define-public cracklib
342 (uri (string-append "https://github.com/cracklib/cracklib/"
343 "releases/download/v" version "/"
344 "cracklib-" version ".tar.bz2"))
346 (base32 "1rimpjsdnmw8f5b7k558cic41p2qy2n2yrlqp5vh7mp4162hk0py"))))
347 (build-system gnu-build-system)
350 (modify-phases %standard-phases
351 (add-after 'install 'install-dict
352 (lambda* (#:key make-flags #:allow-other-keys)
354 (chmod (string-append "util/cracklib-format") #o755)
355 (apply invoke "make" "dict" make-flags)
357 (synopsis "Password checking library")
358 (home-page "https://github.com/cracklib/cracklib")
360 "CrackLib is a library containing a C function which may be used in a
361 @command{passwd}-like program. The idea is simple: try to prevent users from
362 choosing passwords that could easily be guessed (or \"cracked\") by filtering
363 them out, at the source.")
364 (license license:lgpl2.1)))
366 (define-public libpwquality
368 (name "libpwquality")
373 (string-append "https://github.com/libpwquality/libpwquality"
374 "/releases/download/libpwquality-" version
375 "/libpwquality-" version ".tar.bz2")
376 (string-append "https://launchpad.net/libpwquality/trunk/"
377 version "/+download/"
378 "libpwquality-" version ".tar.bz2")))
381 "13hw532fmzc5xjpy75d74rlfdlxf2a8ibb4hyy9c0s92wsgf0qsj"))))
382 (build-system gnu-build-system)
384 ;; XXX: have RUNPATH issue.
385 '(#:configure-flags '("--disable-python-bindings")))
387 `(("cracklib" ,cracklib)))
388 (synopsis "Password quality checker")
389 (home-page "https://github.com/libpwquality/libpwquality")
391 "Libpwquality is a library for password quality checking and generation of
392 random passwords that pass the checks.")
393 (license license:gpl2+)))
395 (define-public assword
403 "http://http.debian.net/debian/pool/main/a/assword/"
404 "assword_" version ".orig.tar.gz")))
407 "03gkb6kvsghznbcw5l7nmrc6mn3ixkjd5jcs96ni4zs9l47jf7yp"))))
409 `(;; irritatingly, tests do run but not there are two problems:
410 ;; - "import gtk" fails for unknown reasons here despite it the
411 ;; program working (indeed, I've found I have to do a logout and log
412 ;; back in in after an install order for some mumbo jumbo environment
413 ;; variable mess to work with pygtk and assword... what's up with
415 ;; - even when the tests fail, they don't return a nonzero status,
416 ;; so I'm not sure how to programmatically get that information
419 (modify-phases %standard-phases
420 (add-after 'install 'wrap-assword
421 (lambda* (#:key outputs #:allow-other-keys)
422 (let ((prog (string-append
423 (assoc-ref outputs "out")
425 (gi-typelib-path (getenv "GI_TYPELIB_PATH")))
427 `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path)))
429 (add-after 'install 'manpage
430 (lambda* (#:key outputs #:allow-other-keys)
431 ;; Without this substitution, it fails with
432 ;; ImportError: No module named 'gpg'
433 (substitute* "Makefile"
434 (("PYTHONPATH=.") ""))
435 (invoke "make" "assword.1")
438 (string-append (assoc-ref outputs "out") "/share/man/man1")))))))
439 (build-system python-build-system)
441 `(("txt2man" ,txt2man)))
444 ("python-xdo" ,python-xdo)
445 ("python-gpg" ,python-gpg)
446 ("python-pygobject" ,python-pygobject)))
449 (home-page "https://finestructure.net/assword/")
450 (synopsis "Password manager")
451 (description "assword is a simple password manager using GPG-wrapped
452 JSON files. It has a command line interface as well as a very simple
453 graphical interface, which can even \"type\" your passwords into
455 (license license:gpl3+)))
457 (define-public password-store
459 (name "password-store")
464 (string-append "https://git.zx2c4.com/password-store/snapshot/"
465 name "-" version ".tar.xz"))
468 "1x53k5dn3cdmvy8m4fqdld4hji5n676ksl0ql4armkmsds26av1b"))))
469 (build-system gnu-build-system)
472 (modify-phases %standard-phases
475 (add-before 'install 'patch-system-extension-dir
476 (lambda* (#:key outputs #:allow-other-keys)
477 (let* ((out (assoc-ref outputs "out"))
478 (extension-dir (string-append out "/lib/password-store/extensions")))
479 (substitute* "src/password-store.sh"
480 (("^SYSTEM_EXTENSION_DIR=.*$")
481 ;; lead with whitespace to prevent 'make install' from
482 ;; overwriting it again
483 (string-append " SYSTEM_EXTENSION_DIR=\""
484 "${PASSWORD_STORE_SYSTEM_EXTENSION_DIR:-"
488 (add-before 'install 'patch-passmenu-path
489 (lambda* (#:key inputs #:allow-other-keys)
490 (substitute* "contrib/dmenu/passmenu"
491 (("dmenu") (string-append (assoc-ref inputs "dmenu")
493 (("xdotool") (string-append (assoc-ref inputs "xdotool")
496 (add-after 'install 'install-passmenu
497 (lambda* (#:key outputs #:allow-other-keys)
498 (let* ((out (assoc-ref outputs "out"))
499 (bin (string-append out "/bin")))
500 (install-file "contrib/dmenu/passmenu" bin)
502 (add-after 'install 'wrap-path
503 (lambda* (#:key inputs outputs #:allow-other-keys)
504 (let ((out (assoc-ref outputs "out"))
505 (path (map (lambda (pkg)
506 (string-append (assoc-ref inputs pkg) "/bin"))
507 '("coreutils" "getopt" "git" "gnupg" "qrencode"
508 "sed" "tree" "which" "xclip"))))
509 (wrap-program (string-append out "/bin/pass")
510 `("PATH" ":" prefix (,(string-join path ":"))))
512 #:make-flags (list "CC=gcc" (string-append "PREFIX=" %output)
514 (string-append "BASHCOMPDIR="
515 %output "/etc/bash_completion.d"))
516 ;; Parallel tests may cause a race condition leading to a
517 ;; timeout in some circumstances.
519 #:test-target "test"))
521 (list (search-path-specification
522 (variable "PASSWORD_STORE_SYSTEM_EXTENSION_DIR")
523 (separator #f) ;single entry
524 (files '("lib/password-store/extensions")))))
527 ("getopt" ,util-linux)
530 ("qrencode" ,qrencode)
535 ("xdotool" ,xdotool)))
536 (home-page "https://www.passwordstore.org/")
537 (synopsis "Encrypted password manager")
538 (description "Password-store is a password manager which uses GnuPG to
539 store and retrieve passwords. The tool stores each password in its own
540 GnuPG-encrypted file, allowing the program to be simple yet secure.
541 Synchronization is possible using the integrated git support, which commits
542 changes to your password database to a git repository that can be managed
543 through the pass command.")
544 (license license:gpl2+)))
546 (define-public pass-otp
554 (string-append "https://github.com/tadfisher/pass-otp/releases/"
555 "download/v" version "/pass-otp-" version ".tar.gz"))
558 "0rrs3iazq80dn0wbl20xkh270428jd8l99m5gd7hl93s4r4sc82p"))))
559 (build-system gnu-build-system)
562 (let* ((out (assoc-ref %outputs "out"))
563 (bashcomp (string-append out "/etc/bash_completion.d")))
564 (list (string-append "PREFIX=" %output)
565 (string-append "BASHCOMPDIR=" bashcomp)))
567 (modify-phases %standard-phases
569 (add-after 'build 'patch-oath-path
570 (lambda* (#:key inputs #:allow-other-keys)
571 (substitute* "otp.bash"
575 (assoc-ref inputs "oath-toolkit")
578 #:test-target "test"))
580 `(("oath-toolkit" ,oath-toolkit)))
582 `(("password-store" ,password-store)
587 (home-page "https://github.com/tadfisher/pass-otp")
588 (synopsis "Pass extension for managing one-time-password (OTP) tokens")
590 "Pass OTP is an extension for password-store that allows adding
591 one-time-password (OTP) secrets, generating OTP codes, and displaying secret
592 key URIs using the standard otpauth:// scheme.")
593 (license license:gpl3+)))
595 (define-public qtpass
603 (url "https://github.com/IJHack/QtPass")
604 (commit (string-append "v" version))))
605 (file-name (git-file-name name version))
608 "0748hjvhjrybi33ci3c8hcr74k9pdrf5jv8npf9hrsrmdyy1kr9x"))))
609 (build-system gnu-build-system)
611 `(#:modules ((guix build gnu-build-system)
612 (guix build qt-utils)
614 #:imported-modules (,@%gnu-build-system-modules
615 (guix build qt-utils))
617 (modify-phases %standard-phases
619 (lambda* (#:key inputs outputs #:allow-other-keys)
620 (let ((out (assoc-ref outputs "out")))
621 ;; lupdate/lrelease need to find qmake.
622 (setenv "QMAKE" "qmake")
623 ;; qmake needs to find lrelease/lupdate.
625 "QMAKE_LRELEASE=lrelease"
626 "QMAKE_LUPDATE=lupdate"
627 (string-append "PREFIX=" out)))))
628 (add-after 'configure 'reset-resource-timestamps
629 ;; Reset timestamps on localization files for a reproducible build.
631 (with-directory-excursion "localization"
632 (for-each (lambda (file)
633 (let* ((base (basename file ".qm"))
634 (src (string-append base ".ts"))
636 (set-file-time file st)))
637 (find-files "." ".*\\.qm")))
639 (add-after 'install 'install-auxilliary
640 ;; Install man-page, icon and .desktop file.
641 (lambda* (#:key inputs outputs #:allow-other-keys)
642 (let* ((out (assoc-ref outputs "out"))
643 (applications (string-append out "/share/applications"))
644 (icons (string-append out "/share/icons/hicolor/scalable/apps"))
645 (man (string-append out "/share/man/man1")))
646 (install-file "qtpass.desktop" applications)
647 (install-file "artwork/icon.svg" icons)
648 (rename-file (string-append icons "/icon.svg")
649 (string-append icons "/qtpass-icon.svg"))
650 (install-file "qtpass.1" man)
652 (add-after 'install 'wrap-qt
653 (lambda* (#:key outputs #:allow-other-keys)
654 (wrap-qt-program (assoc-ref outputs "out") "qtpass")
656 (add-before 'check 'check-setup
657 ;; Make Qt render "offscreen", required for tests.
659 (setenv "QT_QPA_PLATFORM" "offscreen")
662 `(("qttools" ,qttools)))
666 (home-page "https://qtpass.org")
667 (synopsis "GUI for password manager password-store")
669 "Qt-based graphical user interface for the password manager
670 password-store also known as pass. Can use either pass or gpg to interact
671 with password-store files. Features configurable password generation,
672 templates, clipboard handling, and per folder settings for multi-recipient
674 (license license:gpl3+)))
676 (define-public rofi-pass
684 (string-append "https://raw.githubusercontent.com/carnager/rofi-pass/"
685 version "/rofi-pass"))
687 (base32 "0msldkndqp40nx1s5s7ggcr97ir4nshpmnyzvj5hqw1l7m3gvw6j"))
689 (build-system trivial-build-system)
691 `(#:modules ((guix build utils))
694 (use-modules (guix build utils))
695 (let ((source (string-append (assoc-ref %build-inputs "source")))
697 (out (assoc-ref %outputs "out")))
698 (copy-file source script)
700 (install-file script (string-append out "/bin"))))))
702 `(("password-store" ,password-store)
704 ("xdotool" ,xdotool)))
705 (home-page "https://github.com/carnager/rofi-pass")
706 (synopsis "Rofi frontend for password-store")
707 (description "Rofi-pass provides a way to manipulate information stored
708 using password-store through rofi interface:
710 @item open URLs of entries with hotkey;
711 @item type any field from entry;
712 @item auto-typing of user and/or password fields;
713 @item auto-typing username based on path;
714 @item auto-typing of more than one field, using the autotype entry;
715 @item bookmarks mode (open stored URLs in browser, default: Alt+x).
717 (license license:gpl3)))
719 (define-public browserpass-native
721 (name "browserpass-native")
727 (url "https://github.com/browserpass/browserpass-native")
729 (file-name (git-file-name name version))
732 "1jkjslbbac49xjyjkc2b07phdm3i64z40kh6h55cl22dxjmpp1nb"))))
733 (build-system go-build-system)
735 `(#:import-path "github.com/browserpass/browserpass-native"
738 (modify-phases %standard-phases
739 (add-before 'build 'patch-makefile
740 (lambda* (#:key outputs #:allow-other-keys)
741 (let ((out (assoc-ref outputs "out")))
742 ;; This doesn't go in #:make-flags because the Makefile itself
745 "src/github.com/browserpass/browserpass-native/Makefile"
746 (("PREFIX \\?= /usr")
747 (string-append "PREFIX ?= " out)))
749 (add-before 'build 'configure
751 (with-directory-excursion
752 "src/github.com/browserpass/browserpass-native"
753 (invoke "make" "configure"))
757 (with-directory-excursion
758 "src/github.com/browserpass/browserpass-native"
763 (with-directory-excursion
764 "src/github.com/browserpass/browserpass-native"
765 (invoke "make" "install"))
767 (add-after 'install 'wrap-executable
768 (lambda* (#:key inputs outputs #:allow-other-keys)
769 (let ((out (assoc-ref outputs "out"))
770 (gnupg (assoc-ref inputs "gnupg")))
771 (wrap-program (string-append out "/bin/browserpass")
773 (,(string-append gnupg "/bin"))))
779 ("go-github-com-mattn-go-zglob" ,go-github-com-mattn-go-zglob)
780 ("go-github-com-rifflock-lfshook" ,go-github-com-rifflock-lfshook)
781 ("go-github-com-sirupsen-logrus" ,go-github-com-sirupsen-logrus)
782 ("go-golang-org-x-sys" ,go-golang-org-x-sys)))
783 (home-page "https://github.com/browserpass/browserpass-native")
784 (synopsis "Browserpass native messaging host")
785 (description "Browserpass is a browser extension for pass, a
786 UNIX-based password store manager. It allows you to auto-fill or copy to
787 clipboard credentials for the current domain, protecting you from phishing
790 This package only contains the Browserpass native messaging host. You must
791 also install the browser extension for GNU IceCat or ungoogled-chromium
793 (license license:isc)))
795 (define-public argon2
803 (url "https://github.com/P-H-C/phc-winner-argon2")
805 (file-name (git-file-name name version))
808 "01rwanr4wmr9vm6c712x411wig543q195z2icn388z892a93lc7p"))))
809 (build-system gnu-build-system)
811 `(#:test-target "test"
812 #:make-flags (list "CC=gcc"
813 (string-append "PREFIX=" (assoc-ref %outputs "out"))
815 (string-append "ARGON2_VERSION=" ,version)
816 "OPTTEST=1") ; disable CPU optimization
818 (modify-phases %standard-phases
819 (delete 'configure)))) ; No configure script.
820 (home-page "https://www.argon2.com/")
821 (synopsis "Password hashing library")
822 (description "Argon2 provides a key derivation function that was declared
823 winner of the 2015 Password Hashing Competition.")
824 ;; Argon2 is dual licensed under CC0 and ASL 2.0. Some of the source
825 ;; files are CC0 only; see README.md and LICENSE for details.
826 (license (list license:cc0 license:asl2.0))))
828 (define-public pass-git-helper
830 (name "pass-git-helper")
836 (url "https://github.com/languitar/pass-git-helper")
837 (commit (string-append "v" version))))
838 (file-name (git-file-name name version))
841 "18nvwlp0w4aqj268wly60rnjzqw2d8jl0hbs6bkwp3hpzzz5g6yd"))))
842 (build-system python-build-system)
845 (modify-phases %standard-phases
846 (add-before 'build 'patch-pass-path
847 (lambda* (#:key inputs #:allow-other-keys)
848 (let* ((password-store (assoc-ref inputs "password-store"))
849 (pass (string-append password-store "/bin/pass")))
850 (substitute* '("passgithelper.py"
851 "test_passgithelper.py")
852 (("'pass'") (string-append "'" pass "'")))
856 (setenv "HOME" (getcwd))
857 (invoke "pytest"))))))
859 `(("python-pyxdg" ,python-pyxdg)
860 ("password-store" ,password-store)))
862 `(("python-pytest" ,python-pytest)
863 ("python-pytest-mock" ,python-pytest-mock)))
864 (home-page "https://github.com/languitar/pass-git-helper")
865 (synopsis "Git credential helper interfacing with pass")
866 (description "pass-git-helper is a git credential helper which
867 uses pass, the standard unix password manager, as the credential backend for
868 your git repositories. This is achieved by explicitly defining mappings
869 between hosts and entries in the password store.")
870 (license license:lgpl3+)))
872 (define-public john-the-ripper-jumbo
873 (let ((official-version "1.9.0")
876 (name "john-the-ripper-jumbo")
877 (version (string-append official-version "-" jumbo-version))
881 (uri (string-append "http://www.openwall.com/john/j/john-"
882 official-version "-jumbo-" jumbo-version ".tar.xz"))
885 "0fvz3v41hnaiv1ggpxanfykyfjq79cwp9qcqqn63vic357w27lgm"))))
886 (build-system gnu-build-system)
893 ("openssl" ,openssl-1.0)
894 ("python" ,python-2) ; For "python" and "python2" shebangs
895 ("ruby" ,ruby) ; For genincstats.rb
899 (list "--with-systemwide"
900 ;; Do not test for instruction set in configure, and do not
901 ;; pass '-march=native' to gcc:
902 "--disable-native-tests"
903 "--disable-native-march"
906 (let ((system (or (%current-target-system)
909 ((or (string-prefix? "x86_64" system)
910 (string-prefix? "i686" system)) "sse2")
911 ((string-prefix? "aarch" system) "neon")
914 (modify-phases %standard-phases
915 (add-before 'configure 'chdir-src
916 (lambda _ (chdir "src") #t))
919 (let ((bindir (string-append %output "/bin"))
920 (docdir (string-append %output "/share/doc/john"))
921 (execdir (string-append %output "/libexec/john"))
922 (datadir (string-append %output "/share/john"))
923 (install-file-to (lambda (dir)
924 (lambda (f) (install-file f dir))))
925 (symlink? (lambda (_ s) (eq? (stat:type s) 'symlink))))
926 (with-directory-excursion "../run"
927 (for-each (install-file-to bindir)
929 "john" "makechr" "cprepair" "SIPdump" "tgtsnarf"
930 "genmkvpwd" "mkvcalcproba" "calc_stat" "raw2dyna"
931 (find-files "." "(to|2)?john(-[^.]*)?$")))
932 (for-each (lambda (f) ; Install symlinked aliases
933 (let ((tgt (string-append bindir "/" (basename f))))
934 ;; The use of install-file above dereferences
935 ;; symlinks. We'd rather have the symlinks
936 ;; for clarity, so remove tgt before linking.
937 (when (file-exists? tgt) (delete-file tgt))
938 (symlink "john" tgt)))
939 (find-files "." symlink?))
940 (for-each (install-file-to execdir)
941 (cons* "mailer" "benchmark-unify" "relbench"
942 (find-files "." ".*\\.js")))
943 (for-each (lambda (f)
944 (let* ((base (basename f))
945 (name (substring base 0 (string-index base #\.)))
946 (link (string-append bindir "/" name)))
947 (install-file f execdir)
948 (when (and (executable-file? f)
949 (not (file-exists? link)))
950 (symlink (string-append execdir "/" base) link))))
951 (find-files "." ".*\\.(pl|py|rb|lua)"))
952 (for-each (install-file-to datadir)
953 (append (find-files "." "(stats|dictionary.*)")
954 (find-files "." "(.*\\.chr|.*\\.lst)")
955 (find-files "." ".*\\.conf")))
956 (copy-recursively "rules" (string-append datadir "/rules")))
957 (copy-recursively "../doc" docdir)
959 (delete 'check) ; Tests need installed .conf files; move after install
960 (add-after 'install 'check
962 (setenv "HOME" "/tmp") ; Some tests need to write to ~/.john
963 (setenv "OMP_NUM_THREADS" (number->string (parallel-job-count)))
964 (apply (assoc-ref %standard-phases 'check) args))))))
965 (home-page "http://www.openwall.com/john/")
966 (synopsis "Password cracker")
967 (description "John the Ripper is a fast password cracker. Its primary
968 purpose is to detect weak Unix passwords. Besides several @code{crypt}
969 password hash types most commonly found on various Unix systems, supported out
970 of the box are Windows LM hashes, plus lots of other hashes and ciphers. This
971 is the community-enhanced, \"jumbo\" version of John the Ripper.")
972 (license license:gpl2+))))
981 (uri (pypi-uri "sala" version))
984 "13qgmc3i2a0cqp8jqrfl93lnphfagb32pgfikc1gza2a14asxzi8"))))
985 (build-system python-build-system)
987 ;; Sala is supposed to work with Python 3.2 or higher,
988 ;; but it doesn't work with Python 3.6. Better stick
989 ;; to Python 2, which works fine.
990 `(#:python ,python-2))
994 (home-page "http://www.digip.org/sala/")
995 (synopsis "Encrypted plaintext password store")
997 "Store passwords and other bits of sensitive plain-text information
998 to encrypted files on a directory hierarchy. The information is protected
999 by GnuPG's symmetrical encryption.")
1000 (license license:expat)))
1008 (uri (string-append "https://als.regnet.cz/fpm2/download/fpm2-"
1009 version ".tar.bz2"))
1012 "19sdy1lygfhkg5nxi2w9a4d9kwvw24nxp0ix0p0lz91qpvk9qpnm"))))
1013 (build-system gnu-build-system)
1014 (inputs `(("gtk2" ,gtk+-2)
1016 ("libxml2" ,libxml2)))
1017 (native-inputs `(("pkg-config" ,pkg-config)
1018 ("intltool" ,intltool)))
1021 (modify-phases %standard-phases
1022 (add-before 'configure 'pre-configure
1023 ;; The file po/POTFILES.in ends up missing for some reason in
1024 ;; both nix and guix builds. Adding the file with contents
1025 ;; found during troubleshooting.
1027 (call-with-output-file "po/POTFILES.in"
1029 (format port "data/fpm2.desktop.in
1030 data/fpm2.desktop.in.in
1040 (synopsis "Manage, generate and store passwords encrypted")
1041 (description "FPM2 is GTK2 port from Figaro's Password Manager
1042 originally developed by John Conneely, with some new enhancements.
1044 Upstream development seems to have stopped. It is therefore recommended
1045 to use a different password manager.")
1046 (home-page "https://als.regnet.cz/fpm2/")
1047 (license license:gpl2+)))
1049 (define-public pass-rotate
1051 (name "pass-rotate")
1057 (url "https://github.com/ddevault/pass-rotate")
1059 (file-name (git-file-name name version))
1062 "1m067vvdlc85csbpkp8aw4s3ags7q8s3jszrr32kmj9qhk5c254f"))))
1063 (build-system python-build-system)
1065 `(("python-beautifulsoup4" ,python-beautifulsoup4)
1066 ("python-docopt" ,python-docopt)
1067 ("python-html5lib" ,python-html5lib)
1068 ("python-requests" ,python-requests)))
1069 (home-page "https://github.com/ddevault/pass-rotate")
1070 (synopsis "Rotate password on online services")
1071 (description "pass-rotate is a command line utility and python library for
1072 rotating passwords on various web services. It makes it easier to rotate your
1073 passwords, one at a time or in bulk, when security events or routine upkeep of
1074 your online accounts makes it necessary.")
1075 (license license:expat)))
1077 (define-public hashcat
1084 (uri (string-append "https://hashcat.net/files/hashcat-"
1088 "104z63m7lqbb0sdrxhf9yi15l4a9zwf9m6zs9dbb3gf0nfxl1h9r"))))
1090 `(("opencl-headers" ,opencl-headers)))
1091 (build-system gnu-build-system)
1093 '(#:tests? #f ;no tests
1094 #:make-flags (list (string-append "PREFIX=" %output))
1096 (modify-phases %standard-phases
1097 (delete 'configure))))
1098 (home-page "https://hashcat.net/hashcat/")
1099 (synopsis "Advanced password recovery utility")
1100 (description "Hashcat is an password recovery utility, supporting five
1101 unique modes of attack for over 200 highly-optimized hashing algorithms.
1102 Hashcat currently supports CPUs, GPUs, and other hardware accelerators on
1103 Linux, Windows, and macOS, and has facilities to help enable distributed
1104 password cracking.")
1105 (license license:expat)))
1107 (define-public hashcat-utils
1109 (name "hashcat-utils")
1114 (uri (string-append "https://github.com/hashcat/hashcat-utils/releases/"
1115 "download/v" version "/"
1116 "hashcat-utils-" version ".7z"))
1118 (base32 "0kq555kb338691qd7zjmi8vhq4km3apnsl2w63zh0igwzcjx6lx1"))))
1120 `(("p7zip" ,p7zip)))
1123 (build-system gnu-build-system)
1125 `(#:tests? #f ;no tests
1126 #:make-flags (list "CC=gcc"
1127 ;; Upstream bug(?): "make all" seems to remove the
1128 ;; Perl scripts from the source.
1131 (modify-phases %standard-phases
1133 (lambda* (#:key source #:allow-other-keys)
1134 (invoke "7z" "x" source)
1135 (chdir (string-append "hashcat-utils-" ,version "/src"))
1139 (lambda* (#:key outputs #:allow-other-keys)
1140 (let ((out (string-append (assoc-ref outputs "out") "/bin")))
1144 (copy-file file (string-append out "/"
1145 (basename file ".bin"))))
1146 (find-files "." "\\.bin$"))
1149 (copy-file file (string-append out "/"
1150 (basename file ".pl"))))
1151 (find-files "../bin" "\\.pl$"))
1153 (home-page "https://github.com/hashcat/hashcat-utils/")
1154 (synopsis "Small utilities that are useful in advanced password cracking")
1155 (description "Hashcat-utils are a set of small utilities that are useful
1156 in advanced password cracking. They all are packed into multiple stand-alone
1157 binaries. All of these utils are designed to execute only one specific
1158 function. Since they all work with @code{STDIN} and @code{STDOUT} you can
1159 group them into chains.")
1160 (license license:expat)))
1162 (define-public bruteforce-luks
1164 (name "bruteforce-luks")
1169 (uri (string-append "https://github.com/glv2/bruteforce-luks/releases/download/"
1175 (base32 "0yawrlbbklhmvwr99wm7li3r0d5kxvpkwf33a12rji7z0ya5p340"))))
1176 (build-system gnu-build-system)
1180 `(("cryptsetup" ,cryptsetup)))
1181 (synopsis "LUKS encrypted volume cracker")
1183 "This is a cracker for LUKS encrypted volumes. It can be used either in
1184 exhaustive mode to try every password given a charset or in dictionary mode to
1185 try every password contained in a file.")
1186 (home-page "https://github.com/glv2/bruteforce-luks")
1187 (license license:gpl3+)))
1189 (define-public makepasswd
1190 (let ((commit "3545d57d3a589a392d7eb0df36a5286785345c9e")
1194 (version (git-version "0.5.4" revision commit))
1199 (url "https://github.com/khorben/makepasswd")
1201 (file-name (git-file-name name version))
1203 (base32 "0lspqyyxbk6h28yxnp7pd5aib161vrkzgasam5jpzn35n1jacx2j"))))
1204 (build-system gnu-build-system)
1206 `(("pkg-config" ,pkg-config)
1207 ("libxslt" ,libxslt)
1208 ("libxml2" ,libxml2)
1209 ("docbook-xsl" ,docbook-xsl)
1210 ("docbook-xml" ,docbook-xml)))
1212 `(("openssl" ,openssl)))
1215 (modify-phases %standard-phases
1216 (delete 'configure))
1217 #:make-flags (list "CC=gcc"
1218 (string-append "PREFIX=" (assoc-ref %outputs "out")))
1219 #:tests? #f)) ;no tests
1220 (synopsis "Generate (pseudo-)random passwords and hashes")
1222 "Makepasswd is a program that generates pseudo-random passwords of a
1223 desired length. It can also generate their corresponding hashes for a given
1224 encryption algorithm if so desired.")
1225 (home-page "https://github.com/khorben/makepasswd")
1226 (license license:gpl3))))
1228 (define-public pass-tomb
1236 (url "https://github.com/roddhjav/pass-tomb")
1237 (commit (string-append "v" version))))
1238 (file-name (git-file-name name version))
1240 (base32 "1qj7vx7svk1ljwihj3kv310k17mafnf919n30n4qn1yxmmsvj924"))))
1241 (build-system gnu-build-system)
1244 (let ((out (assoc-ref %outputs "out")))
1245 (list (string-append "PREFIX=" out)
1246 (string-append "BASHCOMPDIR=" out "/etc/bash_completion.d")))
1247 #:test-target "tests"
1248 ;; tests are very dependent on system state (swap partition) and require
1249 ;; access to /tmp/zsh which is not in the build container.
1252 (modify-phases %standard-phases
1253 (add-after 'unpack 'set-tomb-path
1254 (lambda* (#:key inputs #:allow-other-keys)
1255 (let ((tomb (assoc-ref inputs "tomb")))
1256 (substitute* "tomb.bash"
1258 (string-append ":-" tomb "/bin/tomb"))))))
1259 (delete 'configure))))
1262 (home-page "https://github.com/roddhjav/pass-tomb")
1263 (synopsis "Pass extension keeping the tree of passwords encrypted")
1264 (description "Pass-tomb provides a convenient solution to put your
1265 password store in a Tomb and then keep your password tree encrypted when you
1266 are not using it. It uses the same GPG key to encrypt passwords and tomb,
1267 therefore you don't need to manage more key or secret. Moreover, you can ask
1268 pass-tomb to automatically close your store after a given time.")
1269 (license license:gpl3+)))