1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2015 Steve Sprang <scs@stevesprang.com>
3 ;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020, 2021 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–2021 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, 2021 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>
32 ;;; Copyright © 2021 Stefan Reichör <stefan@xsteve.at>
33 ;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz>
35 ;;; This file is part of GNU Guix.
37 ;;; GNU Guix is free software; you can redistribute it and/or modify it
38 ;;; under the terms of the GNU General Public License as published by
39 ;;; the Free Software Foundation; either version 3 of the License, or (at
40 ;;; your option) any later version.
42 ;;; GNU Guix is distributed in the hope that it will be useful, but
43 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
44 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
45 ;;; GNU General Public License for more details.
47 ;;; You should have received a copy of the GNU General Public License
48 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
50 (define-module (gnu packages password-utils)
51 #:use-module ((guix licenses) #:prefix license:)
52 #:use-module (guix build-system cmake)
53 #:use-module (guix build-system gnu)
54 #:use-module (guix build-system go)
55 #:use-module (guix build-system trivial)
56 #:use-module (guix download)
57 #:use-module (guix git-download)
58 #:use-module (guix packages)
59 #:use-module (gnu packages)
60 #:use-module (gnu packages admin)
61 #:use-module (gnu packages aidc)
62 #:use-module (gnu packages authentication)
63 #:use-module (gnu packages autotools)
64 #:use-module (gnu packages base)
65 #:use-module (gnu packages check)
66 #:use-module (gnu packages compression)
67 #:use-module (gnu packages crypto)
68 #:use-module (gnu packages cryptsetup)
69 #:use-module (gnu packages curl)
70 #:use-module (gnu packages docbook)
71 #:use-module (gnu packages file)
72 #:use-module (gnu packages freedesktop)
73 #:use-module (gnu packages gettext)
74 #:use-module (gnu packages glib)
75 #:use-module (gnu packages gnupg)
76 #:use-module (gnu packages golang)
77 #:use-module (gnu packages gtk)
78 #:use-module (gnu packages guile)
79 #:use-module (gnu packages kerberos)
80 #:use-module (gnu packages libffi)
81 #:use-module (gnu packages linux)
82 #:use-module (gnu packages man)
83 #:use-module (gnu packages multiprecision)
84 #:use-module (gnu packages ncurses)
85 #:use-module (gnu packages nss)
86 #:use-module (gnu packages opencl)
87 #:use-module (gnu packages perl)
88 #:use-module (gnu packages pkg-config)
89 #:use-module (gnu packages python)
90 #:use-module (gnu packages python-web)
91 #:use-module (gnu packages python-xyz)
92 #:use-module (gnu packages readline)
93 #:use-module (gnu packages ruby)
94 #:use-module (gnu packages security-token)
95 #:use-module (gnu packages suckless)
96 #:use-module (gnu packages tcl)
97 #:use-module (gnu packages tls)
98 #:use-module (gnu packages qt)
99 #:use-module (gnu packages version-control)
100 #:use-module (gnu packages wxwidgets)
101 #:use-module (gnu packages xdisorg)
102 #:use-module (gnu packages xorg)
103 #:use-module (gnu packages xml)
104 #:use-module (guix build-system python))
113 (uri (string-append "mirror://sourceforge/pwgen/pwgen/" version
114 "/pwgen-" version ".tar.gz"))
116 (base32 "0yy90pqrr2pszzhb5hxjishq9qc7dqd290amiibqx9fm1b9kvc6s"))))
117 (build-system gnu-build-system)
119 `(#:tests? #f)) ; no test suite
120 (home-page "http://pwgen.sourceforge.net/")
121 (synopsis "Password generator")
122 (description "Pwgen generates passwords which can be easily memorized by a
124 (license license:gpl2)))
126 (define-public keepassxc
133 (uri (string-append "https://github.com/keepassxreboot/keepassxc"
134 "/releases/download/" version "/keepassxc-"
135 version "-src.tar.xz"))
137 (base32 "1qm4a1k11vy35mrzbzcc7lwlpmjzw18a2zy7z93rqa4vqcdb20rn"))))
138 (build-system cmake-build-system)
140 `(#:modules ((guix build cmake-build-system)
141 (guix build qt-utils)
143 #:imported-modules (,@%cmake-build-system-modules
144 (guix build qt-utils))
145 #:configure-flags '("-DWITH_XC_ALL=YES"
146 "-DWITH_XC_UPDATECHECK=NO")
148 (modify-phases %standard-phases
149 (add-after 'install 'wrap-qt
150 (lambda* (#:key outputs #:allow-other-keys)
151 (wrap-qt-program (assoc-ref outputs "out") "keepassxc")
154 `(("asciidoctor" ,ruby-asciidoctor)
155 ("qttools" ,qttools)))
158 ("libgcrypt" ,libgcrypt)
159 ("libsodium" ,libsodium) ; XC_BROWSER
160 ("libyubikey" ,libyubikey) ; XC_YUBIKEY
163 ("qrencode" ,qrencode)
166 ("qtx11extras" ,qtx11extras)
167 ("quazip" ,quazip) ; XC_KEESHARE
168 ("readline" ,readline)
169 ("yubikey-personalization" ,yubikey-personalization) ; XC_YUBIKEY
171 (home-page "https://www.keepassxc.org")
172 (synopsis "Password manager")
173 (description "KeePassXC is a password manager or safe which helps you to
174 manage your passwords in a secure way. You can put all your passwords in one
175 database, which is locked with one master key or a key-file which can be stored
176 on an external storage device. The databases are encrypted using the
177 algorithms AES or Twofish.")
178 ;; While various parts of the software are licensed under different licenses,
179 ;; the combined work falls under the GPLv3.
180 (license license:gpl3)))
182 (define-public pwsafe
186 (home-page "https://www.pwsafe.org/")
191 (url "https://github.com/pwsafe/pwsafe")
194 (base32 "0d51dlw98mv23nwb0b5jyji8gnb9f5cnig6kivfljl97lmr6lhvf"))
195 (file-name (git-file-name name version))))
196 (build-system cmake-build-system)
198 `(("gettext" ,gettext-minimal)
199 ("gtest" ,googletest)
202 (inputs `(("curl" ,curl)
204 ("libuuid" ,util-linux "lib")
208 ("qrencode" ,qrencode)
209 ("wxwidgets" ,wxwidgets)
210 ("xerces-c" ,xerces-c)))
211 (arguments '(#:configure-flags (list "-DNO_GTEST=YES")
212 #:phases (modify-phases %standard-phases
213 (add-after 'unpack 'add-gtest
214 (lambda* (#:key inputs #:allow-other-keys)
215 (chmod "CMakeLists.txt" #o644)
216 (let ((cmake-port (open-file "CMakeLists.txt"
218 (display "find_package(GTest)
219 add_subdirectory(src/test)\n" cmake-port)
222 (synopsis "Password safe with automatic input and key generation")
223 (description "pwsafe is a password manager originally designed by Bruce
224 Schneier. It offers a simple UI to manage passwords for different services.
225 There are other programs that support the file format on different
227 (license license:artistic2.0)))
229 (define-public pwsafe-cli
230 (let ((commit "c49a0541b66647ad04d19ddb351d264054c67759")
234 (version (git-version "0.2.0" revision commit))
239 (url "https://github.com/nsd20463/pwsafe")
243 "0ak09r1l7k57m6pdx468hhzvz0szmaq42vyr575fvsjc8rbrp8qq"))
244 (file-name (git-file-name name version))))
245 (build-system gnu-build-system)
247 ;; FIXME: skip failing test suite (requires write access to /tmp),
248 ;; patching path does not help somehow.
251 (modify-phases %standard-phases
255 (invoke "autoheader")
256 (invoke "automake" "--add-missing")
260 `(("autoconf" ,autoconf)
261 ("automake" ,automake)))
266 ("openssl" ,openssl)))
267 (home-page "https://github.com/nsd20463/pwsafe")
268 (synopsis "CLI password manager")
270 "@command{pwsafe} is a command line tool compatible with
271 Counterpane's Passwordsafe.")
272 (license license:gpl2+))))
274 (define-public shroud
280 (uri (string-append "https://files.dthompson.us/shroud/shroud-"
284 "1l2shrhvcwfzkar9qiwb75nhcqmx25iz55lzmz0c187nbjhqzi9p"))))
285 (build-system gnu-build-system)
287 `(("pkg-config" ,pkg-config)))
289 `(#:modules ((guix build gnu-build-system)
294 (modify-phases %standard-phases
295 (add-after 'install 'wrap-shroud
296 (lambda* (#:key inputs outputs #:allow-other-keys)
297 (let* ((out (assoc-ref outputs "out"))
298 (guile (assoc-ref inputs "guile"))
299 (effective (read-line
300 (open-pipe* OPEN_READ
301 (string-append guile "/bin/guile")
302 "-c" "(display (effective-version))")))
303 (ccachedir (string-append out
304 "/lib/guile/" effective "/site-ccache"))
305 (prog (string-append out "/bin/shroud")))
307 `("GUILE_LOAD_COMPILED_PATH" ":" prefix (,ccachedir)))
310 `(("guile" ,guile-2.2)
313 (synopsis "GnuPG-based secret manager")
314 (description "Shroud is a simple secret manager with a command line
315 interface. The password database is stored as a Scheme s-expression and
316 encrypted with a GnuPG key. Secrets consist of an arbitrary number of
317 key/value pairs, making Shroud suitable for more than just password storage.
318 For copying and pasting secrets into web browsers and other graphical
319 applications, there is xclip integration." )
320 (home-page "https://dthompson.us/projects/shroud.html")
321 (license license:gpl3+)))
330 (uri (string-append "https://yapet.guengel.ch/downloads/yapet-"
333 (base32 "0hpibsdry259cmvps35isr6jn9cd9fsk3r1h0ppjx9zxfrpqwldg"))))
334 (build-system gnu-build-system)
337 (list (string-append "--docdir=" (assoc-ref %outputs "out")
338 "/share/doc",name "-" ,version))))
342 ("openssl" ,openssl)))
344 `(("cppunit" ,cppunit)
345 ("pkg-config" ,pkg-config)))
346 (synopsis "Yet Another Password Encryption Tool")
347 (description "YAPET is a text based password manager using the Blowfish
348 encryption algorithm. Because of its small footprint and very few library
349 dependencies, it is suited for installing on desktop and server systems alike.
350 The text based user interface allows you to run YAPET easily in a Secure Shell
351 session. Two companion utilities enable users to convert CSV files to YAPET
353 (home-page "https://yapet.guengel.ch/")
354 (license license:gpl3+)))
356 (define-public cracklib
363 (uri (string-append "https://github.com/cracklib/cracklib/"
364 "releases/download/v" version "/"
365 "cracklib-" version ".tar.bz2"))
367 (base32 "1rimpjsdnmw8f5b7k558cic41p2qy2n2yrlqp5vh7mp4162hk0py"))))
368 (build-system gnu-build-system)
371 (modify-phases %standard-phases
372 (add-after 'install 'install-dict
373 (lambda* (#:key make-flags #:allow-other-keys)
375 (chmod (string-append "util/cracklib-format") #o755)
376 (apply invoke "make" "dict" make-flags)
378 (synopsis "Password checking library")
379 (home-page "https://github.com/cracklib/cracklib")
381 "CrackLib is a library containing a C function which may be used in a
382 @command{passwd}-like program. The idea is simple: try to prevent users from
383 choosing passwords that could easily be guessed (or \"cracked\") by filtering
384 them out, at the source.")
385 (license license:lgpl2.1)))
387 (define-public libpwquality
389 (name "libpwquality")
394 (string-append "https://github.com/libpwquality/libpwquality"
395 "/releases/download/libpwquality-" version
396 "/libpwquality-" version ".tar.bz2")
397 (string-append "https://launchpad.net/libpwquality/trunk/"
398 version "/+download/"
399 "libpwquality-" version ".tar.bz2")))
402 "0id5a8bi8xnjg11g9vzrl2xbpx65mfxclxcvis7zx1v8vhisyfyl"))))
403 (build-system gnu-build-system)
406 (modify-phases %standard-phases
407 (add-before 'configure 'set-LDFLAGS
408 (lambda* (#:key inputs outputs #:allow-other-keys)
412 (assoc-ref outputs "out") "/lib"))
415 `(("python" ,python-wrapper)))
417 `(("cracklib" ,cracklib)))
418 (synopsis "Password quality checker")
419 (home-page "https://github.com/libpwquality/libpwquality")
421 "Libpwquality is a library for password quality checking and generation of
422 random passwords that pass the checks.")
423 (license license:gpl2+)))
425 (define-public assword
433 "http://http.debian.net/debian/pool/main/a/assword/"
434 "assword_" version ".orig.tar.gz")))
437 "03gkb6kvsghznbcw5l7nmrc6mn3ixkjd5jcs96ni4zs9l47jf7yp"))))
439 `(;; irritatingly, tests do run but not there are two problems:
440 ;; - "import gtk" fails for unknown reasons here despite it the
441 ;; program working (indeed, I've found I have to do a logout and log
442 ;; back in in after an install order for some mumbo jumbo environment
443 ;; variable mess to work with pygtk and assword... what's up with
445 ;; - even when the tests fail, they don't return a nonzero status,
446 ;; so I'm not sure how to programmatically get that information
449 (modify-phases %standard-phases
450 (add-after 'install 'wrap-assword
451 (lambda* (#:key outputs #:allow-other-keys)
452 (let ((prog (string-append
453 (assoc-ref outputs "out")
455 (gi-typelib-path (getenv "GI_TYPELIB_PATH")))
457 `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path)))
459 (add-after 'install 'manpage
460 (lambda* (#:key outputs #:allow-other-keys)
461 ;; Without this substitution, it fails with
462 ;; ImportError: No module named 'gpg'
463 (substitute* "Makefile"
464 (("PYTHONPATH=.") ""))
465 (invoke "make" "assword.1")
468 (string-append (assoc-ref outputs "out") "/share/man/man1")))))))
469 (build-system python-build-system)
471 `(("txt2man" ,txt2man)))
474 ("python-xdo" ,python-xdo)
475 ("python-gpg" ,python-gpg)
476 ("python-pygobject" ,python-pygobject)))
479 (home-page "https://finestructure.net/assword/")
480 (synopsis "Password manager")
481 (description "assword is a simple password manager using GPG-wrapped
482 JSON files. It has a command line interface as well as a very simple
483 graphical interface, which can even \"type\" your passwords into
485 (license license:gpl3+)))
487 (define-public password-store
489 (name "password-store")
494 (url "git://git.zx2c4.com/password-store")
498 "17zp9pnb3i9sd2zn9qanngmsywrb7y495ngcqs6313pv3gb83v53"))
499 (file-name (git-file-name name version))))
500 (build-system gnu-build-system)
503 (modify-phases %standard-phases
506 (add-before 'install 'patch-system-extension-dir
507 (lambda* (#:key outputs #:allow-other-keys)
508 (let* ((out (assoc-ref outputs "out"))
509 (extension-dir (string-append out "/lib/password-store/extensions")))
510 (substitute* "src/password-store.sh"
511 (("^SYSTEM_EXTENSION_DIR=.*$")
512 ;; lead with whitespace to prevent 'make install' from
513 ;; overwriting it again
514 (string-append " SYSTEM_EXTENSION_DIR=\""
515 "${PASSWORD_STORE_SYSTEM_EXTENSION_DIR:-"
519 (add-before 'install 'patch-passmenu-path
520 (lambda* (#:key inputs #:allow-other-keys)
521 (substitute* "contrib/dmenu/passmenu"
522 (("dmenu") (string-append (assoc-ref inputs "dmenu")
524 (("xdotool") (string-append (assoc-ref inputs "xdotool")
527 (add-after 'install 'install-passmenu
528 (lambda* (#:key outputs #:allow-other-keys)
529 (let* ((out (assoc-ref outputs "out"))
530 (bin (string-append out "/bin")))
531 (install-file "contrib/dmenu/passmenu" bin)
533 (add-after 'install 'wrap-path
534 (lambda* (#:key inputs outputs #:allow-other-keys)
535 (let ((out (assoc-ref outputs "out"))
536 (path (map (lambda (pkg)
537 (string-append (assoc-ref inputs pkg) "/bin"))
538 '("coreutils" "getopt" "git" "gnupg" "qrencode"
539 "sed" "tree" "which" "wl-clipboard" "xclip"))))
540 (wrap-program (string-append out "/bin/pass")
541 `("PATH" ":" prefix (,(string-join path ":"))))
543 #:make-flags (list "CC=gcc" (string-append "PREFIX=" %output)
545 (string-append "BASHCOMPDIR="
546 %output "/etc/bash_completion.d"))
547 ;; Parallel tests may cause a race condition leading to a
548 ;; timeout in some circumstances.
550 #:test-target "test"))
552 (list (search-path-specification
553 (variable "PASSWORD_STORE_SYSTEM_EXTENSION_DIR")
554 (separator #f) ;single entry
555 (files '("lib/password-store/extensions")))))
558 ("getopt" ,util-linux)
561 ("qrencode" ,qrencode)
565 ("wl-clipboard" ,wl-clipboard)
567 ("xdotool" ,xdotool)))
568 (home-page "https://www.passwordstore.org/")
569 (synopsis "Encrypted password manager")
570 (description "Password-store is a password manager which uses GnuPG to
571 store and retrieve passwords. The tool stores each password in its own
572 GnuPG-encrypted file, allowing the program to be simple yet secure.
573 Synchronization is possible using the integrated git support, which commits
574 changes to your password database to a git repository that can be managed
575 through the pass command.")
576 (license license:gpl2+)))
578 (define-public pass-otp
586 (string-append "https://github.com/tadfisher/pass-otp/releases/"
587 "download/v" version "/pass-otp-" version ".tar.gz"))
590 "0rrs3iazq80dn0wbl20xkh270428jd8l99m5gd7hl93s4r4sc82p"))))
591 (build-system gnu-build-system)
594 (let* ((out (assoc-ref %outputs "out"))
595 (bashcomp (string-append out "/etc/bash_completion.d")))
596 (list (string-append "PREFIX=" %output)
597 (string-append "BASHCOMPDIR=" bashcomp)))
599 (modify-phases %standard-phases
601 (add-after 'build 'patch-oath-path
602 (lambda* (#:key inputs #:allow-other-keys)
603 (substitute* "otp.bash"
607 (assoc-ref inputs "oath-toolkit")
610 #:test-target "test"))
612 `(("oath-toolkit" ,oath-toolkit)))
614 `(("password-store" ,password-store)
619 (home-page "https://github.com/tadfisher/pass-otp")
620 (synopsis "Pass extension for managing one-time-password (OTP) tokens")
622 "Pass OTP is an extension for password-store that allows adding
623 one-time-password (OTP) secrets, generating OTP codes, and displaying secret
624 key URIs using the standard otpauth:// scheme.")
625 (license license:gpl3+)))
627 (define-public qtpass
635 (url "https://github.com/IJHack/QtPass")
636 (commit (string-append "v" version))))
637 (file-name (git-file-name name version))
640 "0748hjvhjrybi33ci3c8hcr74k9pdrf5jv8npf9hrsrmdyy1kr9x"))))
641 (build-system gnu-build-system)
643 `(#:modules ((guix build gnu-build-system)
644 (guix build qt-utils)
646 #:imported-modules (,@%gnu-build-system-modules
647 (guix build qt-utils))
649 (modify-phases %standard-phases
651 (lambda* (#:key inputs outputs #:allow-other-keys)
652 (let ((out (assoc-ref outputs "out")))
653 ;; lupdate/lrelease need to find qmake.
654 (setenv "QMAKE" "qmake")
655 ;; qmake needs to find lrelease/lupdate.
657 "QMAKE_LRELEASE=lrelease"
658 "QMAKE_LUPDATE=lupdate"
659 (string-append "PREFIX=" out)))))
660 (add-after 'configure 'reset-resource-timestamps
661 ;; Reset timestamps on localization files for a reproducible build.
663 (with-directory-excursion "localization"
664 (for-each (lambda (file)
665 (let* ((base (basename file ".qm"))
666 (src (string-append base ".ts"))
668 (set-file-time file st)))
669 (find-files "." ".*\\.qm")))
671 (add-after 'install 'install-auxilliary
672 ;; Install man-page, icon and .desktop file.
673 (lambda* (#:key inputs outputs #:allow-other-keys)
674 (let* ((out (assoc-ref outputs "out"))
675 (applications (string-append out "/share/applications"))
676 (icons (string-append out "/share/icons/hicolor/scalable/apps"))
677 (man (string-append out "/share/man/man1")))
678 (install-file "qtpass.desktop" applications)
679 (install-file "artwork/icon.svg" icons)
680 (rename-file (string-append icons "/icon.svg")
681 (string-append icons "/qtpass-icon.svg"))
682 (install-file "qtpass.1" man)
684 (add-after 'install 'wrap-qt
685 (lambda* (#:key outputs #:allow-other-keys)
686 (wrap-qt-program (assoc-ref outputs "out") "qtpass")
688 (add-before 'check 'check-setup
689 ;; Make Qt render "offscreen", required for tests.
691 (setenv "QT_QPA_PLATFORM" "offscreen")
694 `(("qttools" ,qttools)))
696 `(("qtbase" ,qtbase-5)
698 (home-page "https://qtpass.org")
699 (synopsis "GUI for password manager password-store")
701 "Qt-based graphical user interface for the password manager
702 password-store also known as pass. Can use either pass or gpg to interact
703 with password-store files. Features configurable password generation,
704 templates, clipboard handling, and per folder settings for multi-recipient
706 (license license:gpl3+)))
708 (define-public rofi-pass
716 (string-append "https://raw.githubusercontent.com/carnager/rofi-pass/"
717 version "/rofi-pass"))
719 (base32 "0msldkndqp40nx1s5s7ggcr97ir4nshpmnyzvj5hqw1l7m3gvw6j"))
721 (build-system trivial-build-system)
723 `(#:modules ((guix build utils))
726 (use-modules (guix build utils))
727 (let ((source (string-append (assoc-ref %build-inputs "source")))
729 (out (assoc-ref %outputs "out")))
730 (copy-file source script)
732 (install-file script (string-append out "/bin"))))))
734 `(("password-store" ,password-store)
736 ("xdotool" ,xdotool)))
737 (home-page "https://github.com/carnager/rofi-pass")
738 (synopsis "Rofi frontend for password-store")
739 (description "Rofi-pass provides a way to manipulate information stored
740 using password-store through rofi interface:
742 @item open URLs of entries with hotkey;
743 @item type any field from entry;
744 @item auto-typing of user and/or password fields;
745 @item auto-typing username based on path;
746 @item auto-typing of more than one field, using the autotype entry;
747 @item bookmarks mode (open stored URLs in browser, default: Alt+x).
749 (license license:gpl3)))
751 (define-public browserpass-native
753 (name "browserpass-native")
759 (url "https://github.com/browserpass/browserpass-native")
761 (file-name (git-file-name name version))
764 "1jkjslbbac49xjyjkc2b07phdm3i64z40kh6h55cl22dxjmpp1nb"))))
765 (build-system go-build-system)
767 `(#:import-path "github.com/browserpass/browserpass-native"
770 (modify-phases %standard-phases
771 (add-before 'build 'patch-makefile
772 (lambda* (#:key outputs #:allow-other-keys)
773 (let ((out (assoc-ref outputs "out")))
774 ;; This doesn't go in #:make-flags because the Makefile itself
777 "src/github.com/browserpass/browserpass-native/Makefile"
778 (("PREFIX \\?= /usr")
779 (string-append "PREFIX ?= " out)))
781 (add-before 'build 'configure
783 (with-directory-excursion
784 "src/github.com/browserpass/browserpass-native"
785 (invoke "make" "configure"))
789 (with-directory-excursion
790 "src/github.com/browserpass/browserpass-native"
795 (with-directory-excursion
796 "src/github.com/browserpass/browserpass-native"
797 (invoke "make" "install"))
799 (add-after 'install 'wrap-executable
800 (lambda* (#:key inputs outputs #:allow-other-keys)
801 (let ((out (assoc-ref outputs "out"))
802 (gnupg (assoc-ref inputs "gnupg")))
803 (wrap-program (string-append out "/bin/browserpass")
805 (,(string-append gnupg "/bin"))))
811 ("go-github-com-mattn-go-zglob" ,go-github-com-mattn-go-zglob)
812 ("go-github-com-rifflock-lfshook" ,go-github-com-rifflock-lfshook)
813 ("go-github-com-sirupsen-logrus" ,go-github-com-sirupsen-logrus)
814 ("go-golang-org-x-sys" ,go-golang-org-x-sys)))
815 (home-page "https://github.com/browserpass/browserpass-native")
816 (synopsis "Browserpass native messaging host")
817 (description "Browserpass is a browser extension for pass, a
818 UNIX-based password store manager. It allows you to auto-fill or copy to
819 clipboard credentials for the current domain, protecting you from phishing
822 This package only contains the Browserpass native messaging host. You must
823 also install the browser extension for GNU IceCat or ungoogled-chromium
825 (license license:isc)))
827 (define-public argon2
835 (url "https://github.com/P-H-C/phc-winner-argon2")
837 (file-name (git-file-name name version))
840 "01rwanr4wmr9vm6c712x411wig543q195z2icn388z892a93lc7p"))))
841 (build-system gnu-build-system)
843 `(#:test-target "test"
844 #:make-flags (list "CC=gcc"
845 (string-append "PREFIX=" (assoc-ref %outputs "out"))
847 (string-append "ARGON2_VERSION=" ,version)
848 "OPTTEST=1") ; disable CPU optimization
850 (modify-phases %standard-phases
851 (delete 'configure)))) ; No configure script.
852 (home-page "https://www.argon2.com/")
853 (synopsis "Password hashing library")
854 (description "Argon2 provides a key derivation function that was declared
855 winner of the 2015 Password Hashing Competition.")
856 ;; Argon2 is dual licensed under CC0 and ASL 2.0. Some of the source
857 ;; files are CC0 only; see README.md and LICENSE for details.
858 (license (list license:cc0 license:asl2.0))))
860 (define-public pass-git-helper
862 (name "pass-git-helper")
868 (url "https://github.com/languitar/pass-git-helper")
869 (commit (string-append "v" version))))
870 (file-name (git-file-name name version))
873 "18nvwlp0w4aqj268wly60rnjzqw2d8jl0hbs6bkwp3hpzzz5g6yd"))))
874 (build-system python-build-system)
877 (modify-phases %standard-phases
878 (add-before 'build 'patch-pass-path
879 (lambda* (#:key inputs #:allow-other-keys)
880 (let* ((password-store (assoc-ref inputs "password-store"))
881 (pass (string-append password-store "/bin/pass")))
882 (substitute* '("passgithelper.py"
883 "test_passgithelper.py")
884 (("'pass'") (string-append "'" pass "'")))
888 (setenv "HOME" (getcwd))
889 (invoke "pytest"))))))
891 `(("python-pyxdg" ,python-pyxdg)
892 ("password-store" ,password-store)))
894 `(("python-pytest" ,python-pytest)
895 ("python-pytest-mock" ,python-pytest-mock)))
896 (home-page "https://github.com/languitar/pass-git-helper")
897 (synopsis "Git credential helper interfacing with pass")
898 (description "pass-git-helper is a git credential helper which
899 uses pass, the standard unix password manager, as the credential backend for
900 your git repositories. This is achieved by explicitly defining mappings
901 between hosts and entries in the password store.")
902 (license license:lgpl3+)))
904 (define-public john-the-ripper-jumbo
905 (let ((official-version "1.9.0")
908 (name "john-the-ripper-jumbo")
909 (version (string-append official-version "-" jumbo-version))
913 (uri (string-append "http://www.openwall.com/john/j/john-"
914 official-version "-jumbo-" jumbo-version ".tar.xz"))
917 "0fvz3v41hnaiv1ggpxanfykyfjq79cwp9qcqqn63vic357w27lgm"))))
918 (build-system gnu-build-system)
926 ("python" ,python-2) ; For "python" and "python2" shebangs
927 ("ruby" ,ruby) ; For genincstats.rb
931 (list "--with-systemwide"
932 ;; Do not test for instruction set in configure, and do not
933 ;; pass '-march=native' to gcc:
934 "--disable-native-tests"
935 "--disable-native-march"
938 (let ((system (or (%current-target-system)
941 ((or (string-prefix? "x86_64" system)
942 (string-prefix? "i686" system)) "sse2")
943 ((string-prefix? "aarch" system) "neon")
946 (modify-phases %standard-phases
947 (add-before 'configure 'chdir-src
948 (lambda _ (chdir "src") #t))
951 (let ((bindir (string-append %output "/bin"))
952 (docdir (string-append %output "/share/doc/john"))
953 (execdir (string-append %output "/libexec/john"))
954 (datadir (string-append %output "/share/john"))
955 (install-file-to (lambda (dir)
956 (lambda (f) (install-file f dir))))
957 (symlink? (lambda (_ s) (eq? (stat:type s) 'symlink))))
958 (with-directory-excursion "../run"
959 (for-each (install-file-to bindir)
961 "john" "makechr" "cprepair" "SIPdump" "tgtsnarf"
962 "genmkvpwd" "mkvcalcproba" "calc_stat" "raw2dyna"
963 (find-files "." "(to|2)?john(-[^.]*)?$")))
964 (for-each (lambda (f) ; Install symlinked aliases
965 (let ((tgt (string-append bindir "/" (basename f))))
966 ;; The use of install-file above dereferences
967 ;; symlinks. We'd rather have the symlinks
968 ;; for clarity, so remove tgt before linking.
969 (when (file-exists? tgt) (delete-file tgt))
970 (symlink "john" tgt)))
971 (find-files "." symlink?))
972 (for-each (install-file-to execdir)
973 (cons* "mailer" "benchmark-unify" "relbench"
974 (find-files "." ".*\\.js")))
975 (for-each (lambda (f)
976 (let* ((base (basename f))
977 (name (substring base 0 (string-index base #\.)))
978 (link (string-append bindir "/" name)))
979 (install-file f execdir)
980 (when (and (executable-file? f)
981 (not (file-exists? link)))
982 (symlink (string-append execdir "/" base) link))))
983 (find-files "." ".*\\.(pl|py|rb|lua)"))
984 (for-each (install-file-to datadir)
985 (append (find-files "." "(stats|dictionary.*)")
986 (find-files "." "(.*\\.chr|.*\\.lst)")
987 (find-files "." ".*\\.conf")))
988 (copy-recursively "rules" (string-append datadir "/rules")))
989 (copy-recursively "../doc" docdir)
991 (delete 'check) ; Tests need installed .conf files; move after install
992 (add-after 'install 'check
994 (setenv "HOME" "/tmp") ; Some tests need to write to ~/.john
995 (setenv "OMP_NUM_THREADS" (number->string (parallel-job-count)))
996 (apply (assoc-ref %standard-phases 'check) args))))))
997 (home-page "http://www.openwall.com/john/")
998 (synopsis "Password cracker")
999 (description "John the Ripper is a fast password cracker. Its primary
1000 purpose is to detect weak Unix passwords. Besides several @code{crypt}
1001 password hash types most commonly found on various Unix systems, supported out
1002 of the box are Windows LM hashes, plus lots of other hashes and ciphers. This
1003 is the community-enhanced, \"jumbo\" version of John the Ripper.")
1004 (license license:gpl2+))))
1013 (uri (pypi-uri "sala" version))
1016 "13qgmc3i2a0cqp8jqrfl93lnphfagb32pgfikc1gza2a14asxzi8"))))
1017 (build-system python-build-system)
1019 ;; Sala is supposed to work with Python 3.2 or higher,
1020 ;; but it doesn't work with Python 3.6. Better stick
1021 ;; to Python 2, which works fine.
1022 `(#:python ,python-2))
1026 (home-page "http://www.digip.org/sala/")
1027 (synopsis "Encrypted plaintext password store")
1029 "Store passwords and other bits of sensitive plain-text information
1030 to encrypted files on a directory hierarchy. The information is protected
1031 by GnuPG's symmetrical encryption.")
1032 (license license:expat)))
1040 (uri (string-append "https://als.regnet.cz/fpm2/download/fpm2-"
1041 version ".tar.bz2"))
1044 "19sdy1lygfhkg5nxi2w9a4d9kwvw24nxp0ix0p0lz91qpvk9qpnm"))))
1045 (build-system gnu-build-system)
1046 (inputs `(("gtk2" ,gtk+-2)
1048 ("libxml2" ,libxml2)))
1049 (native-inputs `(("pkg-config" ,pkg-config)
1050 ("intltool" ,intltool)))
1053 (modify-phases %standard-phases
1054 (add-before 'configure 'pre-configure
1055 ;; The file po/POTFILES.in ends up missing for some reason in
1056 ;; both nix and guix builds. Adding the file with contents
1057 ;; found during troubleshooting.
1059 (call-with-output-file "po/POTFILES.in"
1061 (format port "data/fpm2.desktop.in
1062 data/fpm2.desktop.in.in
1072 (synopsis "Manage, generate and store passwords encrypted")
1073 (description "FPM2 is GTK2 port from Figaro's Password Manager
1074 originally developed by John Conneely, with some new enhancements.
1076 Upstream development seems to have stopped. It is therefore recommended
1077 to use a different password manager.")
1078 (home-page "https://als.regnet.cz/fpm2/")
1079 (license license:gpl2+)))
1081 (define-public pass-rotate
1083 (name "pass-rotate")
1089 (url "https://github.com/ddevault/pass-rotate")
1091 (file-name (git-file-name name version))
1094 "1m067vvdlc85csbpkp8aw4s3ags7q8s3jszrr32kmj9qhk5c254f"))))
1095 (build-system python-build-system)
1097 `(("python-beautifulsoup4" ,python-beautifulsoup4)
1098 ("python-docopt" ,python-docopt)
1099 ("python-html5lib" ,python-html5lib)
1100 ("python-requests" ,python-requests)))
1101 (home-page "https://github.com/ddevault/pass-rotate")
1102 (synopsis "Rotate password on online services")
1103 (description "pass-rotate is a command line utility and python library for
1104 rotating passwords on various web services. It makes it easier to rotate your
1105 passwords, one at a time or in bulk, when security events or routine upkeep of
1106 your online accounts makes it necessary.")
1107 (license license:expat)))
1109 (define-public hashcat
1116 (uri (string-append "https://hashcat.net/files/hashcat-"
1120 "104z63m7lqbb0sdrxhf9yi15l4a9zwf9m6zs9dbb3gf0nfxl1h9r"))))
1122 `(("opencl-headers" ,opencl-headers)))
1123 (build-system gnu-build-system)
1125 '(#:tests? #f ;no tests
1126 #:make-flags (list (string-append "PREFIX=" %output))
1128 (modify-phases %standard-phases
1129 (delete 'configure))))
1130 (home-page "https://hashcat.net/hashcat/")
1131 (synopsis "Advanced password recovery utility")
1132 (description "Hashcat is an password recovery utility, supporting five
1133 unique modes of attack for over 200 highly-optimized hashing algorithms.
1134 Hashcat currently supports CPUs, GPUs, and other hardware accelerators on
1135 Linux, Windows, and macOS, and has facilities to help enable distributed
1136 password cracking.")
1137 (license license:expat)))
1139 (define-public hashcat-utils
1141 (name "hashcat-utils")
1146 (uri (string-append "https://github.com/hashcat/hashcat-utils/releases/"
1147 "download/v" version "/"
1148 "hashcat-utils-" version ".7z"))
1150 (base32 "0kq555kb338691qd7zjmi8vhq4km3apnsl2w63zh0igwzcjx6lx1"))))
1152 `(("p7zip" ,p7zip)))
1155 (build-system gnu-build-system)
1157 `(#:tests? #f ;no tests
1158 #:make-flags (list "CC=gcc"
1159 ;; Upstream bug(?): "make all" seems to remove the
1160 ;; Perl scripts from the source.
1163 (modify-phases %standard-phases
1165 (lambda* (#:key source #:allow-other-keys)
1166 (invoke "7z" "x" source)
1167 (chdir (string-append "hashcat-utils-" ,version "/src"))
1171 (lambda* (#:key outputs #:allow-other-keys)
1172 (let ((out (string-append (assoc-ref outputs "out") "/bin")))
1176 (copy-file file (string-append out "/"
1177 (basename file ".bin"))))
1178 (find-files "." "\\.bin$"))
1181 (copy-file file (string-append out "/"
1182 (basename file ".pl"))))
1183 (find-files "../bin" "\\.pl$"))
1185 (home-page "https://github.com/hashcat/hashcat-utils/")
1186 (synopsis "Small utilities that are useful in advanced password cracking")
1187 (description "Hashcat-utils are a set of small utilities that are useful
1188 in advanced password cracking. They all are packed into multiple stand-alone
1189 binaries. All of these utils are designed to execute only one specific
1190 function. Since they all work with @code{STDIN} and @code{STDOUT} you can
1191 group them into chains.")
1192 (license license:expat)))
1194 (define-public bruteforce-luks
1196 (name "bruteforce-luks")
1201 (uri (string-append "https://github.com/glv2/bruteforce-luks/releases/download/"
1207 (base32 "0yawrlbbklhmvwr99wm7li3r0d5kxvpkwf33a12rji7z0ya5p340"))))
1208 (build-system gnu-build-system)
1212 `(("cryptsetup" ,cryptsetup)))
1213 (synopsis "LUKS encrypted volume cracker")
1215 "This is a cracker for LUKS encrypted volumes. It can be used either in
1216 exhaustive mode to try every password given a charset or in dictionary mode to
1217 try every password contained in a file.")
1218 (home-page "https://github.com/glv2/bruteforce-luks")
1219 (license license:gpl3+)))
1221 (define-public makepasswd
1222 (let ((commit "3545d57d3a589a392d7eb0df36a5286785345c9e")
1226 (version (git-version "0.5.4" revision commit))
1231 (url "https://github.com/khorben/makepasswd")
1233 (file-name (git-file-name name version))
1235 (base32 "0lspqyyxbk6h28yxnp7pd5aib161vrkzgasam5jpzn35n1jacx2j"))))
1236 (build-system gnu-build-system)
1238 `(("pkg-config" ,pkg-config)
1239 ("libxslt" ,libxslt)
1240 ("libxml2" ,libxml2)
1241 ("docbook-xsl" ,docbook-xsl)
1242 ("docbook-xml" ,docbook-xml)))
1244 `(("openssl" ,openssl)))
1247 (modify-phases %standard-phases
1248 (delete 'configure))
1249 #:make-flags (list "CC=gcc"
1250 (string-append "PREFIX=" (assoc-ref %outputs "out")))
1251 #:tests? #f)) ;no tests
1252 (synopsis "Generate (pseudo-)random passwords and hashes")
1254 "Makepasswd is a program that generates pseudo-random passwords of a
1255 desired length. It can also generate their corresponding hashes for a given
1256 encryption algorithm if so desired.")
1257 (home-page "https://github.com/khorben/makepasswd")
1258 (license license:gpl3))))
1260 (define-public pass-tomb
1268 (url "https://github.com/roddhjav/pass-tomb")
1269 (commit (string-append "v" version))))
1270 (file-name (git-file-name name version))
1272 (base32 "1qj7vx7svk1ljwihj3kv310k17mafnf919n30n4qn1yxmmsvj924"))))
1273 (build-system gnu-build-system)
1276 (let ((out (assoc-ref %outputs "out")))
1277 (list (string-append "PREFIX=" out)
1278 (string-append "BASHCOMPDIR=" out "/etc/bash_completion.d")))
1279 #:test-target "tests"
1280 ;; tests are very dependent on system state (swap partition) and require
1281 ;; access to /tmp/zsh which is not in the build container.
1284 (modify-phases %standard-phases
1285 (add-after 'unpack 'set-tomb-path
1286 (lambda* (#:key inputs #:allow-other-keys)
1287 (let ((tomb (assoc-ref inputs "tomb")))
1288 (substitute* "tomb.bash"
1290 (string-append ":-" tomb "/bin/tomb"))))))
1291 (delete 'configure))))
1294 (home-page "https://github.com/roddhjav/pass-tomb")
1295 (synopsis "Pass extension keeping the tree of passwords encrypted")
1296 (description "Pass-tomb provides a convenient solution to put your
1297 password store in a Tomb and then keep your password tree encrypted when you
1298 are not using it. It uses the same GPG key to encrypt passwords and tomb,
1299 therefore you don't need to manage more key or secret. Moreover, you can ask
1300 pass-tomb to automatically close your store after a given time.")
1301 (license license:gpl3+)))