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>
31 ;;; This file is part of GNU Guix.
33 ;;; GNU Guix is free software; you can redistribute it and/or modify it
34 ;;; under the terms of the GNU General Public License as published by
35 ;;; the Free Software Foundation; either version 3 of the License, or (at
36 ;;; your option) any later version.
38 ;;; GNU Guix is distributed in the hope that it will be useful, but
39 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
40 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
41 ;;; GNU General Public License for more details.
43 ;;; You should have received a copy of the GNU General Public License
44 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
46 (define-module (gnu packages password-utils)
47 #:use-module ((guix licenses) #:prefix license:)
48 #:use-module (guix build-system cmake)
49 #:use-module (guix build-system gnu)
50 #:use-module (guix build-system go)
51 #:use-module (guix build-system trivial)
52 #:use-module (guix download)
53 #:use-module (guix git-download)
54 #:use-module (guix packages)
55 #:use-module (gnu packages)
56 #:use-module (gnu packages admin)
57 #:use-module (gnu packages aidc)
58 #:use-module (gnu packages authentication)
59 #:use-module (gnu packages base)
60 #:use-module (gnu packages check)
61 #:use-module (gnu packages compression)
62 #:use-module (gnu packages crypto)
63 #:use-module (gnu packages cryptsetup)
64 #:use-module (gnu packages curl)
65 #:use-module (gnu packages docbook)
66 #:use-module (gnu packages file)
67 #:use-module (gnu packages freedesktop)
68 #:use-module (gnu packages gettext)
69 #:use-module (gnu packages glib)
70 #:use-module (gnu packages gnupg)
71 #:use-module (gnu packages golang)
72 #:use-module (gnu packages gtk)
73 #:use-module (gnu packages guile)
74 #:use-module (gnu packages kerberos)
75 #:use-module (gnu packages libffi)
76 #:use-module (gnu packages linux)
77 #:use-module (gnu packages man)
78 #:use-module (gnu packages multiprecision)
79 #:use-module (gnu packages ncurses)
80 #:use-module (gnu packages nss)
81 #:use-module (gnu packages opencl)
82 #:use-module (gnu packages perl)
83 #:use-module (gnu packages pkg-config)
84 #:use-module (gnu packages python)
85 #:use-module (gnu packages python-web)
86 #:use-module (gnu packages python-xyz)
87 #:use-module (gnu packages readline)
88 #:use-module (gnu packages ruby)
89 #:use-module (gnu packages security-token)
90 #:use-module (gnu packages suckless)
91 #:use-module (gnu packages tcl)
92 #:use-module (gnu packages tls)
93 #:use-module (gnu packages qt)
94 #:use-module (gnu packages version-control)
95 #:use-module (gnu packages wxwidgets)
96 #:use-module (gnu packages xdisorg)
97 #:use-module (gnu packages xorg)
98 #:use-module (gnu packages xml)
99 #:use-module (guix build-system python))
108 (uri (string-append "mirror://sourceforge/pwgen/pwgen/" version
109 "/pwgen-" version ".tar.gz"))
111 (base32 "0yy90pqrr2pszzhb5hxjishq9qc7dqd290amiibqx9fm1b9kvc6s"))))
112 (build-system gnu-build-system)
114 `(#:tests? #f)) ; no test suite
115 (home-page "http://pwgen.sourceforge.net/")
116 (synopsis "Password generator")
117 (description "Pwgen generates passwords which can be easily memorized by a
119 (license license:gpl2)))
121 (define-public keepassxc
128 (uri (string-append "https://github.com/keepassxreboot/keepassxc"
129 "/releases/download/" version "/keepassxc-"
130 version "-src.tar.xz"))
132 (base32 "0jndssyvpl8bc5i2q3d6kq1ppynchxx9nvp1qhd2pc0qqc0hhpm5"))))
133 (build-system cmake-build-system)
135 '(#:configure-flags '("-DWITH_XC_ALL=YES"
136 "-DWITH_XC_UPDATECHECK=NO")))
139 ("libgcrypt" ,libgcrypt)
140 ("libsodium" ,libsodium) ; XC_BROWSER
141 ("libyubikey" ,libyubikey) ; XC_YUBIKEY
144 ("qrencode" ,qrencode)
147 ("qtx11extras" ,qtx11extras)
148 ("quazip" ,quazip) ; XC_KEESHARE
149 ("readline" ,readline)
150 ("yubikey-personalization" ,yubikey-personalization) ; XC_YUBIKEY
153 `(("qttools" ,qttools)))
154 (home-page "https://www.keepassxc.org")
155 (synopsis "Password manager")
156 (description "KeePassXC is a password manager or safe which helps you to
157 manage your passwords in a secure way. You can put all your passwords in one
158 database, which is locked with one master key or a key-file which can be stored
159 on an external storage device. The databases are encrypted using the
160 algorithms AES or Twofish.")
161 ;; While various parts of the software are licensed under different licenses,
162 ;; the combined work falls under the GPLv3.
163 (license license:gpl3)))
165 (define-public keepassx
172 (uri (string-append "https://www.keepassx.org/releases/" version
173 "/keepassx-" version ".tar.gz"))
176 "1ia7cqx9ias38mnffsl7da7g1f66bcbjsi23k49sln0c6spb9zr3"))))
177 (build-system cmake-build-system)
179 `(("libgcrypt" ,libgcrypt)
185 (home-page "https://www.keepassx.org")
186 (synopsis "Password manager")
187 (description "KeePassX is a password manager or safe which helps you to
188 manage your passwords in a secure way. You can put all your passwords in one
189 database, which is locked with one master key or a key-file which can be stored
190 on an external storage device. The databases are encrypted using the
191 algorithms AES or Twofish.")
192 ;; Non functional parts use various licences.
193 (license license:gpl3)
194 (properties `((superseded . ,keepassxc)))))
196 (define-public pwsafe
200 (home-page "https://www.pwsafe.org/")
205 (url "https://github.com/pwsafe/pwsafe.git")
208 (base32 "1ka7xsl63v0559fzf3pwc1iqr37gwr4vq5iaxa2hzar2g28hsxvh"))
209 (file-name (git-file-name name version))))
210 (build-system cmake-build-system)
212 `(("gettext" ,gettext-minimal)
213 ("gtest" ,googletest)
216 (inputs `(("curl" ,curl)
218 ("libuuid" ,util-linux "lib")
222 ("qrencode" ,qrencode)
223 ("wxwidgets" ,wxwidgets)
224 ("xerces-c" ,xerces-c)))
225 (arguments '(#:configure-flags (list "-DNO_GTEST=YES")
226 #:phases (modify-phases %standard-phases
227 (add-after 'unpack 'add-gtest
228 (lambda* (#:key inputs #:allow-other-keys)
229 (chmod "CMakeLists.txt" #o644)
230 (let ((cmake-port (open-file "CMakeLists.txt"
232 (display "find_package(GTest)
233 add_subdirectory(src/test)\n" cmake-port)
236 (synopsis "Password safe with automatic input and key generation")
237 (description "pwsafe is a password manager originally designed by Bruce
238 Schneier. It offers a simple UI to manage passwords for different services.
239 There are other programs that support the file format on different
241 (license license:artistic2.0)))
243 (define-public shroud
249 (uri (string-append "https://files.dthompson.us/shroud/shroud-"
253 "1l2shrhvcwfzkar9qiwb75nhcqmx25iz55lzmz0c187nbjhqzi9p"))))
254 (build-system gnu-build-system)
256 `(("pkg-config" ,pkg-config)))
258 `(#:modules ((guix build gnu-build-system)
263 (modify-phases %standard-phases
264 (add-after 'install 'wrap-shroud
265 (lambda* (#:key inputs outputs #:allow-other-keys)
266 (let* ((out (assoc-ref outputs "out"))
267 (guile (assoc-ref inputs "guile"))
268 (effective (read-line
269 (open-pipe* OPEN_READ
270 (string-append guile "/bin/guile")
271 "-c" "(display (effective-version))")))
272 (ccachedir (string-append out
273 "/lib/guile/" effective "/site-ccache"))
274 (prog (string-append out "/bin/shroud")))
276 `("GUILE_LOAD_COMPILED_PATH" ":" prefix (,ccachedir)))
279 `(("guile" ,guile-2.2)
282 (synopsis "GnuPG-based secret manager")
283 (description "Shroud is a simple secret manager with a command line
284 interface. The password database is stored as a Scheme s-expression and
285 encrypted with a GnuPG key. Secrets consist of an arbitrary number of
286 key/value pairs, making Shroud suitable for more than just password storage.
287 For copying and pasting secrets into web browsers and other graphical
288 applications, there is xclip integration." )
289 (home-page "https://dthompson.us/projects/shroud.html")
290 (license license:gpl3+)))
299 (uri (string-append "https://yapet.guengel.ch/downloads/yapet-"
302 (base32 "1fl4s7v1psl52ndd6i7716i9f493aj8ipl6lgmraadnn5h26l3pm"))))
303 (build-system gnu-build-system)
307 ("openssl" ,openssl)))
309 `(("cppunit" ,cppunit)
310 ("pkg-config" ,pkg-config)))
311 (synopsis "Yet Another Password Encryption Tool")
312 (description "YAPET is a text based password manager using the Blowfish
313 encryption algorithm. Because of its small footprint and very few library
314 dependencies, it is suited for installing on desktop and server systems alike.
315 The text based user interface allows you to run YAPET easily in a Secure Shell
316 session. Two companion utilities enable users to convert CSV files to YAPET
318 (home-page "https://yapet.guengel.ch/")
319 (license license:gpl3+)))
321 (define-public cracklib
328 (uri (string-append "https://github.com/cracklib/cracklib/"
329 "releases/download/v" version "/"
330 "cracklib-" version ".tar.bz2"))
332 (base32 "1rimpjsdnmw8f5b7k558cic41p2qy2n2yrlqp5vh7mp4162hk0py"))))
333 (build-system gnu-build-system)
336 (modify-phases %standard-phases
337 (add-after 'install 'install-dict
338 (lambda* (#:key make-flags #:allow-other-keys)
340 (chmod (string-append "util/cracklib-format") #o755)
341 (apply invoke "make" "dict" make-flags)
343 (synopsis "Password checking library")
344 (home-page "https://github.com/cracklib/cracklib")
346 "CrackLib is a library containing a C function which may be used in a
347 @command{passwd}-like program. The idea is simple: try to prevent users from
348 choosing passwords that could easily be guessed (or \"cracked\") by filtering
349 them out, at the source.")
350 (license license:lgpl2.1)))
352 (define-public libpwquality
354 (name "libpwquality")
359 (string-append "https://github.com/libpwquality/libpwquality"
360 "/releases/download/libpwquality-" version
361 "/libpwquality-" version ".tar.bz2")
362 (string-append "https://launchpad.net/libpwquality/trunk/"
363 version "/+download/"
364 "libpwquality-" version ".tar.bz2")))
367 "13hw532fmzc5xjpy75d74rlfdlxf2a8ibb4hyy9c0s92wsgf0qsj"))))
368 (build-system gnu-build-system)
370 ;; XXX: have RUNPATH issue.
371 '(#:configure-flags '("--disable-python-bindings")))
373 `(("cracklib" ,cracklib)))
374 (synopsis "Password quality checker")
375 (home-page "https://github.com/libpwquality/libpwquality")
377 "Libpwquality is a library for password quality checking and generation of
378 random passwords that pass the checks.")
379 (license license:gpl2+)))
381 (define-public assword
389 "http://http.debian.net/debian/pool/main/a/assword/"
390 "assword_" version ".orig.tar.gz")))
393 "03gkb6kvsghznbcw5l7nmrc6mn3ixkjd5jcs96ni4zs9l47jf7yp"))))
395 `(;; irritatingly, tests do run but not there are two problems:
396 ;; - "import gtk" fails for unknown reasons here despite it the
397 ;; program working (indeed, I've found I have to do a logout and log
398 ;; back in in after an install order for some mumbo jumbo environment
399 ;; variable mess to work with pygtk and assword... what's up with
401 ;; - even when the tests fail, they don't return a nonzero status,
402 ;; so I'm not sure how to programmatically get that information
405 (modify-phases %standard-phases
406 (add-after 'install 'wrap-assword
407 (lambda* (#:key outputs #:allow-other-keys)
408 (let ((prog (string-append
409 (assoc-ref outputs "out")
411 (gi-typelib-path (getenv "GI_TYPELIB_PATH")))
413 `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path)))
415 (add-after 'install 'manpage
416 (lambda* (#:key outputs #:allow-other-keys)
417 ;; Without this substitution, it fails with
418 ;; ImportError: No module named 'gpg'
419 (substitute* "Makefile"
420 (("PYTHONPATH=.") ""))
421 (invoke "make" "assword.1")
424 (string-append (assoc-ref outputs "out") "/share/man/man1")))))))
425 (build-system python-build-system)
427 `(("txt2man" ,txt2man)))
430 ("python-xdo" ,python-xdo)
431 ("python-gpg" ,python-gpg)
432 ("python-pygobject" ,python-pygobject)))
435 (home-page "https://finestructure.net/assword/")
436 (synopsis "Password manager")
437 (description "assword is a simple password manager using GPG-wrapped
438 JSON files. It has a command line interface as well as a very simple
439 graphical interface, which can even \"type\" your passwords into
441 (license license:gpl3+)))
443 (define-public password-store
445 (name "password-store")
450 (string-append "https://git.zx2c4.com/password-store/snapshot/"
451 name "-" version ".tar.xz"))
454 "1x53k5dn3cdmvy8m4fqdld4hji5n676ksl0ql4armkmsds26av1b"))))
455 (build-system gnu-build-system)
458 (modify-phases %standard-phases
461 (add-before 'install 'patch-system-extension-dir
462 (lambda* (#:key outputs #:allow-other-keys)
463 (let* ((out (assoc-ref outputs "out"))
464 (extension-dir (string-append out "/lib/password-store/extensions")))
465 (substitute* "src/password-store.sh"
466 (("^SYSTEM_EXTENSION_DIR=.*$")
467 ;; lead with whitespace to prevent 'make install' from
468 ;; overwriting it again
469 (string-append " SYSTEM_EXTENSION_DIR=\""
470 "${PASSWORD_STORE_SYSTEM_EXTENSION_DIR:-"
474 (add-before 'install 'patch-passmenu-path
475 (lambda* (#:key inputs #:allow-other-keys)
476 (substitute* "contrib/dmenu/passmenu"
477 (("dmenu") (string-append (assoc-ref inputs "dmenu")
479 (("xdotool") (string-append (assoc-ref inputs "xdotool")
482 (add-after 'install 'install-passmenu
483 (lambda* (#:key outputs #:allow-other-keys)
484 (let* ((out (assoc-ref outputs "out"))
485 (bin (string-append out "/bin")))
486 (install-file "contrib/dmenu/passmenu" bin)
488 (add-after 'install 'wrap-path
489 (lambda* (#:key inputs outputs #:allow-other-keys)
490 (let ((out (assoc-ref outputs "out"))
491 (path (map (lambda (pkg)
492 (string-append (assoc-ref inputs pkg) "/bin"))
493 '("coreutils" "getopt" "git" "gnupg" "qrencode"
494 "sed" "tree" "which" "xclip"))))
495 (wrap-program (string-append out "/bin/pass")
496 `("PATH" ":" prefix (,(string-join path ":"))))
498 #:make-flags (list "CC=gcc" (string-append "PREFIX=" %output)
500 (string-append "BASHCOMPDIR="
501 %output "/etc/bash_completion.d"))
502 ;; Parallel tests may cause a race condition leading to a
503 ;; timeout in some circumstances.
505 #:test-target "test"))
507 (list (search-path-specification
508 (variable "PASSWORD_STORE_SYSTEM_EXTENSION_DIR")
509 (separator #f) ;single entry
510 (files '("lib/password-store/extensions")))))
513 ("getopt" ,util-linux)
516 ("qrencode" ,qrencode)
521 ("xdotool" ,xdotool)))
522 (home-page "https://www.passwordstore.org/")
523 (synopsis "Encrypted password manager")
524 (description "Password-store is a password manager which uses GnuPG to
525 store and retrieve passwords. The tool stores each password in its own
526 GnuPG-encrypted file, allowing the program to be simple yet secure.
527 Synchronization is possible using the integrated git support, which commits
528 changes to your password database to a git repository that can be managed
529 through the pass command.")
530 (license license:gpl2+)))
532 (define-public pass-otp
540 (string-append "https://github.com/tadfisher/pass-otp/releases/"
541 "download/v" version "/pass-otp-" version ".tar.gz"))
544 "0rrs3iazq80dn0wbl20xkh270428jd8l99m5gd7hl93s4r4sc82p"))))
545 (build-system gnu-build-system)
548 (let* ((out (assoc-ref %outputs "out"))
549 (bashcomp (string-append out "/etc/bash_completion.d")))
550 (list (string-append "PREFIX=" %output)
551 (string-append "BASHCOMPDIR=" bashcomp)))
553 (modify-phases %standard-phases
555 (add-after 'build 'patch-oath-path
556 (lambda* (#:key inputs #:allow-other-keys)
557 (substitute* "otp.bash"
561 (assoc-ref inputs "oath-toolkit")
564 #:test-target "test"))
566 `(("oath-toolkit" ,oath-toolkit)))
568 `(("password-store" ,password-store)
573 (home-page "https://github.com/tadfisher/pass-otp")
574 (synopsis "Pass extension for managing one-time-password (OTP) tokens")
576 "Pass OTP is an extension for password-store that allows adding
577 one-time-password (OTP) secrets, generating OTP codes, and displaying secret
578 key URIs using the standard otpauth:// scheme.")
579 (license license:gpl3+)))
581 (define-public qtpass
589 (url "https://github.com/IJHack/QtPass.git")
590 (commit (string-append "v" version))))
591 (file-name (git-file-name name version))
594 "1vfhfyccrxq9snyvayqfzm5rqik8ny2gysyv7nipc91kvhq3bhky"))))
595 (build-system gnu-build-system)
598 (modify-phases %standard-phases
600 (lambda* (#:key inputs outputs #:allow-other-keys)
601 (let ((out (assoc-ref outputs "out")))
602 ;; lupdate/lrelease need to find qmake.
603 (setenv "QMAKE" "qmake")
604 ;; qmake needs to find lrelease/lupdate.
606 "QMAKE_LRELEASE=lrelease"
607 "QMAKE_LUPDATE=lupdate"
608 (string-append "PREFIX=" out)))))
609 (add-after 'configure 'reset-resource-timestamps
610 ;; Reset timestamps on localization files for a reproducible build.
612 (with-directory-excursion "localization"
613 (for-each (lambda (file)
614 (let* ((base (basename file ".qm"))
615 (src (string-append base ".ts"))
617 (set-file-time file st)))
618 (find-files "." ".*\\.qm")))
620 (add-after 'install 'install-auxilliary
621 ;; Install man-page, icon and .desktop file.
622 (lambda* (#:key inputs outputs #:allow-other-keys)
623 (let* ((out (assoc-ref outputs "out"))
624 (applications (string-append out "/share/applications"))
625 (icons (string-append out "/share/icons/hicolor/scalable/apps"))
626 (man (string-append out "/share/man/man1")))
627 (install-file "qtpass.desktop" applications)
628 (install-file "artwork/icon.svg" icons)
629 (rename-file (string-append icons "/icon.svg")
630 (string-append icons "/qtpass-icon.svg"))
631 (install-file "qtpass.1" man)
633 (add-before 'check 'check-setup
634 ;; Make Qt render "offscreen", required for tests.
636 (setenv "QT_QPA_PLATFORM" "offscreen")
639 `(("qttools" ,qttools)))
643 (home-page "https://qtpass.org")
644 (synopsis "GUI for password manager password-store")
646 "Qt-based graphical user interface for the password manager
647 password-store also known as pass. Can use either pass or gpg to interact
648 with password-store files. Features configurable password generation,
649 templates, clipboard handling, and per folder settings for multi-recipient
651 (license license:gpl3+)))
653 (define-public rofi-pass
661 (string-append "https://raw.githubusercontent.com/carnager/rofi-pass/"
662 version "/rofi-pass"))
664 (base32 "0msldkndqp40nx1s5s7ggcr97ir4nshpmnyzvj5hqw1l7m3gvw6j"))
666 (build-system trivial-build-system)
668 `(#:modules ((guix build utils))
671 (use-modules (guix build utils))
672 (let ((source (string-append (assoc-ref %build-inputs "source")))
674 (out (assoc-ref %outputs "out")))
675 (copy-file source script)
677 (install-file script (string-append out "/bin"))))))
679 `(("password-store" ,password-store)
681 ("xdotool" ,xdotool)))
682 (home-page "https://github.com/carnager/rofi-pass")
683 (synopsis "Rofi frontend for password-store")
684 (description "Rofi-pass provides a way to manipulate information stored
685 using password-store through rofi interface:
687 @item open URLs of entries with hotkey;
688 @item type any field from entry;
689 @item auto-typing of user and/or password fields;
690 @item auto-typing username based on path;
691 @item auto-typing of more than one field, using the autotype entry;
692 @item bookmarks mode (open stored URLs in browser, default: Alt+x).
694 (license license:gpl3)))
696 (define-public browserpass-native
698 (name "browserpass-native")
704 (url "https://github.com/browserpass/browserpass-native.git")
706 (file-name (git-file-name name version))
709 "0q3bsla07zjl6i69nj1axbkg2ia89pvh0jg6nlqgbm2kpzzbn0pz"))))
710 (build-system go-build-system)
712 `(#:import-path "github.com/browserpass/browserpass-native"
715 (modify-phases %standard-phases
716 (add-before 'build 'patch-makefile
717 (lambda* (#:key outputs #:allow-other-keys)
718 (let ((out (assoc-ref outputs "out")))
719 ;; This doesn't go in #:make-flags because the Makefile itself
722 "src/github.com/browserpass/browserpass-native/Makefile"
723 (("PREFIX \\?= /usr")
724 (string-append "PREFIX ?= " out)))
726 (add-before 'build 'configure
728 (with-directory-excursion
729 "src/github.com/browserpass/browserpass-native"
730 (invoke "make" "configure"))
734 (with-directory-excursion
735 "src/github.com/browserpass/browserpass-native"
740 (with-directory-excursion
741 "src/github.com/browserpass/browserpass-native"
742 (invoke "make" "install"))
744 (add-after 'install 'wrap-executable
745 (lambda* (#:key inputs outputs #:allow-other-keys)
746 (let ((out (assoc-ref outputs "out"))
747 (gnupg (assoc-ref inputs "gnupg")))
748 (wrap-program (string-append out "/bin/browserpass")
750 (,(string-append gnupg "/bin"))))
756 ("go-github-com-mattn-go-zglob" ,go-github-com-mattn-go-zglob)
757 ("go-github-com-rifflock-lfshook" ,go-github-com-rifflock-lfshook)
758 ("go-github-com-sirupsen-logrus" ,go-github-com-sirupsen-logrus)
759 ("go-golang-org-x-sys" ,go-golang-org-x-sys)))
760 (home-page "https://github.com/browserpass/browserpass-native")
761 (synopsis "Browserpass native messaging host")
762 (description "Browserpass is a browser extension for pass, a
763 UNIX-based password store manager. It allows you to auto-fill or copy to
764 clipboard credentials for the current domain, protecting you from phishing
767 This package only contains the Browserpass native messaging host. You must
768 also install the browser extension for GNU IceCat or ungoogled-chromium
770 (license license:isc)))
772 (define-public argon2
780 (url "https://github.com/P-H-C/phc-winner-argon2")
782 (file-name (git-file-name name version))
785 "01rwanr4wmr9vm6c712x411wig543q195z2icn388z892a93lc7p"))))
786 (build-system gnu-build-system)
788 `(#:test-target "test"
789 #:make-flags (list "CC=gcc"
790 (string-append "PREFIX=" (assoc-ref %outputs "out"))
792 (string-append "ARGON2_VERSION=" ,version)
793 "OPTTEST=1") ; disable CPU optimization
795 (modify-phases %standard-phases
796 (delete 'configure)))) ; No configure script.
797 (home-page "https://www.argon2.com/")
798 (synopsis "Password hashing library")
799 (description "Argon2 provides a key derivation function that was declared
800 winner of the 2015 Password Hashing Competition.")
801 ;; Argon2 is dual licensed under CC0 and ASL 2.0. Some of the source
802 ;; files are CC0 only; see README.md and LICENSE for details.
803 (license (list license:cc0 license:asl2.0))))
805 (define-public pass-git-helper
807 (name "pass-git-helper")
813 (url "https://github.com/languitar/pass-git-helper")
814 (commit (string-append "v" version))))
815 (file-name (git-file-name name version))
818 "18nvwlp0w4aqj268wly60rnjzqw2d8jl0hbs6bkwp3hpzzz5g6yd"))))
819 (build-system python-build-system)
822 (modify-phases %standard-phases
823 (add-before 'build 'patch-pass-path
824 (lambda* (#:key inputs #:allow-other-keys)
825 (let* ((password-store (assoc-ref inputs "password-store"))
826 (pass (string-append password-store "/bin/pass")))
827 (substitute* '("passgithelper.py"
828 "test_passgithelper.py")
829 (("'pass'") (string-append "'" pass "'")))
833 (setenv "HOME" (getcwd))
834 (invoke "pytest"))))))
836 `(("python-pyxdg" ,python-pyxdg)
837 ("password-store" ,password-store)))
839 `(("python-pytest" ,python-pytest)
840 ("python-pytest-mock" ,python-pytest-mock)))
841 (home-page "https://github.com/languitar/pass-git-helper")
842 (synopsis "Git credential helper interfacing with pass")
843 (description "pass-git-helper is a git credential helper which
844 uses pass, the standard unix password manager, as the credential backend for
845 your git repositories. This is achieved by explicitly defining mappings
846 between hosts and entries in the password store.")
847 (license license:lgpl3+)))
849 (define-public john-the-ripper-jumbo
850 (let ((official-version "1.9.0")
853 (name "john-the-ripper-jumbo")
854 (version (string-append official-version "-" jumbo-version))
858 (uri (string-append "http://www.openwall.com/john/j/john-"
859 official-version "-jumbo-" jumbo-version ".tar.xz"))
862 "0fvz3v41hnaiv1ggpxanfykyfjq79cwp9qcqqn63vic357w27lgm"))))
863 (build-system gnu-build-system)
870 ("openssl" ,openssl-1.0)
871 ("python" ,python-2) ; For "python" and "python2" shebangs
872 ("ruby" ,ruby) ; For genincstats.rb
876 (list "--with-systemwide"
877 ;; Do not test for instruction set in configure, and do not
878 ;; pass '-march=native' to gcc:
879 "--disable-native-tests"
880 "--disable-native-march"
883 (let ((system (or (%current-target-system)
886 ((or (string-prefix? "x86_64" system)
887 (string-prefix? "i686" system)) "sse2")
888 ((string-prefix? "aarch" system) "neon")
891 (modify-phases %standard-phases
892 (add-before 'configure 'chdir-src
893 (lambda _ (chdir "src") #t))
896 (let ((bindir (string-append %output "/bin"))
897 (docdir (string-append %output "/share/doc/john"))
898 (execdir (string-append %output "/libexec/john"))
899 (datadir (string-append %output "/share/john"))
900 (install-file-to (lambda (dir)
901 (lambda (f) (install-file f dir))))
902 (symlink? (lambda (_ s) (eq? (stat:type s) 'symlink))))
903 (with-directory-excursion "../run"
904 (for-each (install-file-to bindir)
906 "john" "makechr" "cprepair" "SIPdump" "tgtsnarf"
907 "genmkvpwd" "mkvcalcproba" "calc_stat" "raw2dyna"
908 (find-files "." "(to|2)?john(-[^.]*)?$")))
909 (for-each (lambda (f) ; Install symlinked aliases
910 (let ((tgt (string-append bindir "/" (basename f))))
911 ;; The use of install-file above dereferences
912 ;; symlinks. We'd rather have the symlinks
913 ;; for clarity, so remove tgt before linking.
914 (when (file-exists? tgt) (delete-file tgt))
915 (symlink "john" tgt)))
916 (find-files "." symlink?))
917 (for-each (install-file-to execdir)
918 (cons* "mailer" "benchmark-unify" "relbench"
919 (find-files "." ".*\\.js")))
920 (for-each (lambda (f)
921 (let* ((base (basename f))
922 (name (substring base 0 (string-index base #\.)))
923 (link (string-append bindir "/" name)))
924 (install-file f execdir)
925 (when (and (executable-file? f)
926 (not (file-exists? link)))
927 (symlink (string-append execdir "/" base) link))))
928 (find-files "." ".*\\.(pl|py|rb|lua)"))
929 (for-each (install-file-to datadir)
930 (append (find-files "." "(stats|dictionary.*)")
931 (find-files "." "(.*\\.chr|.*\\.lst)")
932 (find-files "." ".*\\.conf")))
933 (copy-recursively "rules" (string-append datadir "/rules")))
934 (copy-recursively "../doc" docdir)
936 (delete 'check) ; Tests need installed .conf files; move after install
937 (add-after 'install 'check
939 (setenv "HOME" "/tmp") ; Some tests need to write to ~/.john
940 (setenv "OMP_NUM_THREADS" (number->string (parallel-job-count)))
941 (apply (assoc-ref %standard-phases 'check) args))))))
942 (home-page "http://www.openwall.com/john/")
943 (synopsis "Password cracker")
944 (description "John the Ripper is a fast password cracker. Its primary
945 purpose is to detect weak Unix passwords. Besides several @code{crypt}
946 password hash types most commonly found on various Unix systems, supported out
947 of the box are Windows LM hashes, plus lots of other hashes and ciphers. This
948 is the community-enhanced, \"jumbo\" version of John the Ripper.")
949 (license license:gpl2+))))
958 (uri (pypi-uri "sala" version))
961 "13qgmc3i2a0cqp8jqrfl93lnphfagb32pgfikc1gza2a14asxzi8"))))
962 (build-system python-build-system)
964 ;; Sala is supposed to work with Python 3.2 or higher,
965 ;; but it doesn't work with Python 3.6. Better stick
966 ;; to Python 2, which works fine.
967 `(#:python ,python-2))
971 (home-page "http://www.digip.org/sala/")
972 (synopsis "Encrypted plaintext password store")
974 "Store passwords and other bits of sensitive plain-text information
975 to encrypted files on a directory hierarchy. The information is protected
976 by GnuPG's symmetrical encryption.")
977 (license license:expat)))
985 (uri (string-append "https://als.regnet.cz/fpm2/download/fpm2-"
989 "19sdy1lygfhkg5nxi2w9a4d9kwvw24nxp0ix0p0lz91qpvk9qpnm"))))
990 (build-system gnu-build-system)
991 (inputs `(("gtk2" ,gtk+-2)
993 ("libxml2" ,libxml2)))
994 (native-inputs `(("pkg-config" ,pkg-config)
995 ("intltool" ,intltool)))
998 (modify-phases %standard-phases
999 (add-before 'configure 'pre-configure
1000 ;; The file po/POTFILES.in ends up missing for some reason in
1001 ;; both nix and guix builds. Adding the file with contents
1002 ;; found during troubleshooting.
1004 (call-with-output-file "po/POTFILES.in"
1006 (format port "data/fpm2.desktop.in
1007 data/fpm2.desktop.in.in
1017 (synopsis "Manage, generate and store passwords encrypted")
1018 (description "FPM2 is GTK2 port from Figaro's Password Manager
1019 originally developed by John Conneely, with some new enhancements.
1021 Upstream development seems to have stopped. It is therefore recommended
1022 to use a different password manager.")
1023 (home-page "https://als.regnet.cz/fpm2/")
1024 (license license:gpl2+)))
1026 (define-public pass-rotate
1028 (name "pass-rotate")
1034 (url "https://github.com/ddevault/pass-rotate")
1036 (file-name (git-file-name name version))
1039 "1m067vvdlc85csbpkp8aw4s3ags7q8s3jszrr32kmj9qhk5c254f"))))
1040 (build-system python-build-system)
1042 `(("python-beautifulsoup4" ,python-beautifulsoup4)
1043 ("python-docopt" ,python-docopt)
1044 ("python-html5lib" ,python-html5lib)
1045 ("python-requests" ,python-requests)))
1046 (home-page "https://github.com/ddevault/pass-rotate")
1047 (synopsis "Rotate password on online services")
1048 (description "pass-rotate is a command line utility and python library for
1049 rotating passwords on various web services. It makes it easier to rotate your
1050 passwords, one at a time or in bulk, when security events or routine upkeep of
1051 your online accounts makes it necessary.")
1052 (license license:expat)))
1054 (define-public hashcat
1061 (uri (string-append "https://hashcat.net/files/hashcat-"
1065 "0f73y4cg8c7a6q7x34qvpfi4g3lw6j9bnn0a13g43aqyiskflfr8"))))
1067 `(("opencl-headers" ,opencl-headers)))
1068 (build-system gnu-build-system)
1070 '(#:tests? #f ;no tests
1071 #:make-flags (list (string-append "PREFIX=" %output))
1073 (modify-phases %standard-phases
1074 (delete 'configure))))
1075 (home-page "https://hashcat.net/hashcat/")
1076 (synopsis "Advanced password recovery utility")
1077 (description "Hashcat is an password recovery utility, supporting five
1078 unique modes of attack for over 200 highly-optimized hashing algorithms.
1079 Hashcat currently supports CPUs, GPUs, and other hardware accelerators on
1080 Linux, Windows, and macOS, and has facilities to help enable distributed
1081 password cracking.")
1082 (license license:expat)))
1084 (define-public hashcat-utils
1086 (name "hashcat-utils")
1091 (uri (string-append "https://github.com/hashcat/hashcat-utils/releases/"
1092 "download/v" version "/"
1093 "hashcat-utils-" version ".7z"))
1095 (base32 "0kq555kb338691qd7zjmi8vhq4km3apnsl2w63zh0igwzcjx6lx1"))))
1097 `(("p7zip" ,p7zip)))
1100 (build-system gnu-build-system)
1102 `(#:tests? #f ;no tests
1103 #:make-flags (list "CC=gcc"
1104 ;; Upstream bug(?): "make all" seems to remove the
1105 ;; Perl scripts from the source.
1108 (modify-phases %standard-phases
1110 (lambda* (#:key source #:allow-other-keys)
1111 (invoke "7z" "x" source)
1112 (chdir (string-append "hashcat-utils-" ,version "/src"))
1116 (lambda* (#:key outputs #:allow-other-keys)
1117 (let ((out (string-append (assoc-ref outputs "out") "/bin")))
1121 (copy-file file (string-append out "/"
1122 (basename file ".bin"))))
1123 (find-files "." "\\.bin$"))
1126 (copy-file file (string-append out "/"
1127 (basename file ".pl"))))
1128 (find-files "../bin" "\\.pl$"))
1130 (home-page "https://github.com/hashcat/hashcat-utils/")
1131 (synopsis "Small utilities that are useful in advanced password cracking")
1132 (description "Hashcat-utils are a set of small utilities that are useful
1133 in advanced password cracking. They all are packed into multiple stand-alone
1134 binaries. All of these utils are designed to execute only one specific
1135 function. Since they all work with @code{STDIN} and @code{STDOUT} you can
1136 group them into chains.")
1137 (license license:expat)))
1139 (define-public bruteforce-luks
1141 (name "bruteforce-luks")
1146 (uri (string-append "https://github.com/glv2/bruteforce-luks/releases/download/"
1152 (base32 "0yawrlbbklhmvwr99wm7li3r0d5kxvpkwf33a12rji7z0ya5p340"))))
1153 (build-system gnu-build-system)
1157 `(("cryptsetup" ,cryptsetup)))
1158 (synopsis "LUKS encrypted volume cracker")
1160 "This is a cracker for LUKS encrypted volumes. It can be used either in
1161 exhaustive mode to try every password given a charset or in dictionary mode to
1162 try every password contained in a file.")
1163 (home-page "https://github.com/glv2/bruteforce-luks")
1164 (license license:gpl3+)))
1166 (define-public makepasswd
1167 (let ((commit "3545d57d3a589a392d7eb0df36a5286785345c9e")
1171 (version (git-version "0.5.4" revision commit))
1176 (url "https://github.com/khorben/makepasswd")
1178 (file-name (git-file-name name version))
1180 (base32 "0lspqyyxbk6h28yxnp7pd5aib161vrkzgasam5jpzn35n1jacx2j"))))
1181 (build-system gnu-build-system)
1183 `(("pkg-config" ,pkg-config)
1184 ("libxslt" ,libxslt)
1185 ("libxml2" ,libxml2)
1186 ("docbook-xsl" ,docbook-xsl)
1187 ("docbook-xml" ,docbook-xml)))
1189 `(("openssl" ,openssl)))
1192 (modify-phases %standard-phases
1193 (delete 'configure))
1194 #:make-flags (list "CC=gcc"
1195 (string-append "PREFIX=" (assoc-ref %outputs "out")))
1196 #:tests? #f)) ;no tests
1197 (synopsis "Generate (pseudo-)random passwords and hashes")
1199 "Makepasswd is a program that generates pseudo-random passwords of a
1200 desired length. It can also generate their corresponding hashes for a given
1201 encryption algorithm if so desired.")
1202 (home-page "https://github.com/khorben/makepasswd")
1203 (license license:gpl3))))