Merge branch 'master' into staging
[jackhill/guix/guix.git] / gnu / packages / password-utils.scm
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, 2022 Efraim Flashner <efraim@flashner.co.il>
4 ;;; Copyright © 2015 Aljosha Papsch <misc@rpapsch.de>
5 ;;; Copyright © 2016 Christine Lemmer-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-2022 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, 2022 Marius Bakke <marius@gnu.org>
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,2022 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 © 2020 Hartmut Goebel <h.goebel@crazy-compilers.com>
33 ;;; Copyright © 2021 Stefan Reichör <stefan@xsteve.at>
34 ;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz>
35 ;;; Copyright © 2020 Hartmut Goebel <h.goebel@crazy-compilers.com>
36 ;;; Copyright © 2021 David Dashyan <mail@davie.li>
37 ;;;
38 ;;; This file is part of GNU Guix.
39 ;;;
40 ;;; GNU Guix is free software; you can redistribute it and/or modify it
41 ;;; under the terms of the GNU General Public License as published by
42 ;;; the Free Software Foundation; either version 3 of the License, or (at
43 ;;; your option) any later version.
44 ;;;
45 ;;; GNU Guix is distributed in the hope that it will be useful, but
46 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
47 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
48 ;;; GNU General Public License for more details.
49 ;;;
50 ;;; You should have received a copy of the GNU General Public License
51 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
52
53 (define-module (gnu packages password-utils)
54 #:use-module ((guix licenses) #:prefix license:)
55 #:use-module (guix build-system cmake)
56 #:use-module (guix build-system gnu)
57 #:use-module (guix build-system go)
58 #:use-module (guix build-system trivial)
59 #:use-module (guix download)
60 #:use-module (guix gexp)
61 #:use-module (guix git-download)
62 #:use-module (guix packages)
63 #:use-module (gnu packages)
64 #:use-module (gnu packages admin)
65 #:use-module (gnu packages aidc)
66 #:use-module (gnu packages authentication)
67 #:use-module (gnu packages autotools)
68 #:use-module (gnu packages base)
69 #:use-module (gnu packages check)
70 #:use-module (gnu packages compression)
71 #:use-module (gnu packages crypto)
72 #:use-module (gnu packages cryptsetup)
73 #:use-module (gnu packages curl)
74 #:use-module (gnu packages docbook)
75 #:use-module (gnu packages file)
76 #:use-module (gnu packages freedesktop)
77 #:use-module (gnu packages gettext)
78 #:use-module (gnu packages glib)
79 #:use-module (gnu packages gnupg)
80 #:use-module (gnu packages golang)
81 #:use-module (gnu packages gtk)
82 #:use-module (gnu packages guile)
83 #:use-module (gnu packages kerberos)
84 #:use-module (gnu packages libffi)
85 #:use-module (gnu packages libusb)
86 #:use-module (gnu packages linux)
87 #:use-module (gnu packages man)
88 #:use-module (gnu packages multiprecision)
89 #:use-module (gnu packages ncurses)
90 #:use-module (gnu packages nss)
91 #:use-module (gnu packages opencl)
92 #:use-module (gnu packages perl)
93 #:use-module (gnu packages pkg-config)
94 #:use-module (gnu packages python)
95 #:use-module (gnu packages python-web)
96 #:use-module (gnu packages python-xyz)
97 #:use-module (gnu packages readline)
98 #:use-module (gnu packages ruby)
99 #:use-module (gnu packages security-token)
100 #:use-module (gnu packages suckless)
101 #:use-module (gnu packages tcl)
102 #:use-module (gnu packages tls)
103 #:use-module (gnu packages qt)
104 #:use-module (gnu packages version-control)
105 #:use-module (gnu packages wxwidgets)
106 #:use-module (gnu packages xdisorg)
107 #:use-module (gnu packages xorg)
108 #:use-module (gnu packages xml)
109 #:use-module (guix build-system python))
110
111 (define-public pwgen
112 (package
113 (name "pwgen")
114 (version "2.08")
115 (source
116 (origin
117 (method url-fetch)
118 (uri (string-append "mirror://sourceforge/pwgen/pwgen/" version
119 "/pwgen-" version ".tar.gz"))
120 (sha256
121 (base32 "0yy90pqrr2pszzhb5hxjishq9qc7dqd290amiibqx9fm1b9kvc6s"))))
122 (build-system gnu-build-system)
123 (arguments
124 `(#:tests? #f)) ; no test suite
125 (home-page "http://pwgen.sourceforge.net/")
126 (synopsis "Password generator")
127 (description "Pwgen generates passwords which can be easily memorized by a
128 human.")
129 (license license:gpl2)))
130
131 (define-public keepassxc
132 (package
133 (name "keepassxc")
134 (version "2.7.1")
135 (source
136 (origin
137 (method url-fetch)
138 (uri (string-append "https://github.com/keepassxreboot/keepassxc"
139 "/releases/download/" version "/keepassxc-"
140 version "-src.tar.xz"))
141 (sha256
142 (base32 "1ryk2ndv93jb155cp7qkjm7jd8hjy0v5gqvdvbdidhrmdiibl0b0"))))
143 (build-system cmake-build-system)
144 (arguments
145 (list
146 #:modules '((guix build cmake-build-system)
147 (guix build qt-utils)
148 (guix build utils))
149 #:imported-modules `(,@%cmake-build-system-modules
150 (guix build qt-utils))
151 #:configure-flags
152 #~(list "-DWITH_XC_ALL=YES"
153 "-DWITH_XC_UPDATECHECK=NO")
154 #:phases
155 #~(modify-phases %standard-phases
156 (replace 'check
157 (lambda* (#:key tests? #:allow-other-keys)
158 (when tests?
159 ;; Fails with "TestCli::testClip() Compared values are not the
160 ;; same". That test also requires a phase with (setenv
161 ;; "QT_QPA_PLATFORM" "offscreen") in order to work.
162 (invoke "ctest" "--exclude-regex" "testcli"))))
163 (add-after 'install 'wrap-qt
164 (lambda* (#:key inputs #:allow-other-keys)
165 (wrap-qt-program "keepassxc" #:output #$output #:inputs inputs))))))
166 (native-inputs
167 (list qttools ruby-asciidoctor))
168 (inputs
169 (list argon2
170 botan
171 libgcrypt
172 libsodium ; XC_BROWSER
173 libusb
174 libyubikey ; XC_YUBIKEY
175 libxi
176 libxtst
177 minizip
178 pcsc-lite
179 qrencode
180 qtbase-5
181 qtsvg
182 qtx11extras
183 quazip-0 ; XC_KEESHARE
184 readline
185 yubikey-personalization ; XC_YUBIKEY
186 zlib))
187 (home-page "https://www.keepassxc.org")
188 (synopsis "Password manager")
189 (description "KeePassXC is a password manager or safe which helps you to
190 manage your passwords in a secure way. You can put all your passwords in one
191 database, which is locked with one master key or a key-file which can be stored
192 on an external storage device. The databases are encrypted using the
193 algorithms AES or Twofish.")
194 (properties
195 '((release-monitoring-url . "https://github.com/keepassxreboot/keepassxc/releases")))
196 ;; While various parts of the software are licensed under different licenses,
197 ;; the combined work falls under the GPLv3.
198 (license license:gpl3)))
199
200 (define-public pwsafe
201 (package
202 (name "pwsafe")
203 (version "3.54.1")
204 (home-page "https://www.pwsafe.org/")
205 (source
206 (origin
207 (method git-fetch)
208 (uri (git-reference
209 (url "https://github.com/pwsafe/pwsafe")
210 (commit version)))
211 (sha256
212 (base32 "0d51dlw98mv23nwb0b5jyji8gnb9f5cnig6kivfljl97lmr6lhvf"))
213 (file-name (git-file-name name version))))
214 (build-system cmake-build-system)
215 (native-inputs
216 `(("gettext" ,gettext-minimal)
217 ("gtest" ,googletest)
218 ("perl" ,perl)
219 ("zip" ,zip)))
220 (inputs `(("curl" ,curl)
221 ("file" ,file)
222 ("libuuid" ,util-linux "lib")
223 ("libxt" ,libxt)
224 ("libxtst" ,libxtst)
225 ("openssl" ,openssl)
226 ("qrencode" ,qrencode)
227 ("wxwidgets" ,wxwidgets)
228 ("xerces-c" ,xerces-c)))
229 (arguments '(#:configure-flags (list "-DNO_GTEST=YES")
230 #:phases (modify-phases %standard-phases
231 (add-after 'unpack 'add-gtest
232 (lambda* (#:key inputs #:allow-other-keys)
233 (chmod "CMakeLists.txt" #o644)
234 (let ((cmake-port (open-file "CMakeLists.txt"
235 "a")))
236 (display "find_package(GTest)
237 add_subdirectory(src/test)\n" cmake-port)
238 (close cmake-port)
239 #t))))))
240 (synopsis "Password safe with automatic input and key generation")
241 (description "pwsafe is a password manager originally designed by Bruce
242 Schneier. It offers a simple UI to manage passwords for different services.
243 There are other programs that support the file format on different
244 platforms.")
245 (license license:artistic2.0)))
246
247 (define-public pwsafe-cli
248 (let ((commit "c49a0541b66647ad04d19ddb351d264054c67759")
249 (revision "0"))
250 (package
251 (name "pwsafe-cli")
252 (version (git-version "0.2.0" revision commit))
253 (source
254 (origin
255 (method git-fetch)
256 (uri (git-reference
257 (url "https://github.com/nsd20463/pwsafe")
258 (commit commit)))
259 (sha256
260 (base32
261 "0ak09r1l7k57m6pdx468hhzvz0szmaq42vyr575fvsjc8rbrp8qq"))
262 (file-name (git-file-name name version))))
263 (build-system gnu-build-system)
264 (arguments
265 ;; FIXME: skip failing test suite (requires write access to /tmp),
266 ;; patching path does not help somehow.
267 `(#:tests? #f
268 #:phases
269 (modify-phases %standard-phases
270 (replace 'bootstrap
271 (lambda _
272 (invoke "aclocal")
273 (invoke "autoheader")
274 (invoke "automake" "--add-missing")
275 (invoke "autoconf")
276 #t)))))
277 (native-inputs
278 (list autoconf automake))
279 (inputs
280 (list libx11 libxmu libxt openssl))
281 (home-page "https://github.com/nsd20463/pwsafe")
282 (synopsis "CLI password manager")
283 (description
284 "@command{pwsafe} is a command line tool compatible with
285 Counterpane's Passwordsafe.")
286 (license license:gpl2+))))
287
288 (define-public shroud
289 (package
290 (name "shroud")
291 (version "0.1.2")
292 (source (origin
293 (method url-fetch)
294 (uri (string-append "https://files.dthompson.us/shroud/shroud-"
295 version ".tar.gz"))
296 (sha256
297 (base32
298 "1l2shrhvcwfzkar9qiwb75nhcqmx25iz55lzmz0c187nbjhqzi9p"))))
299 (build-system gnu-build-system)
300 (native-inputs
301 (list pkg-config))
302 (arguments
303 `(#:modules ((guix build gnu-build-system)
304 (guix build utils)
305 (ice-9 popen)
306 (ice-9 rdelim))
307 #:phases
308 (modify-phases %standard-phases
309 (add-after 'install 'wrap-shroud
310 (lambda* (#:key inputs outputs #:allow-other-keys)
311 (let* ((out (assoc-ref outputs "out"))
312 (guile (assoc-ref inputs "guile"))
313 (effective (read-line
314 (open-pipe* OPEN_READ
315 (string-append guile "/bin/guile")
316 "-c" "(display (effective-version))")))
317 (ccachedir (string-append out
318 "/lib/guile/" effective "/site-ccache"))
319 (prog (string-append out "/bin/shroud")))
320 (wrap-program prog
321 `("GUILE_LOAD_COMPILED_PATH" ":" prefix (,ccachedir)))
322 #t))))))
323 (inputs
324 (list guile-2.2 gnupg xclip))
325 (synopsis "GnuPG-based secret manager")
326 (description "Shroud is a simple secret manager with a command line
327 interface. The password database is stored as a Scheme s-expression and
328 encrypted with a GnuPG key. Secrets consist of an arbitrary number of
329 key/value pairs, making Shroud suitable for more than just password storage.
330 For copying and pasting secrets into web browsers and other graphical
331 applications, there is xclip integration." )
332 (home-page "https://dthompson.us/projects/shroud.html")
333 (license license:gpl3+)))
334
335 (define-public yapet
336 (package
337 (name "yapet")
338 (version "2.5")
339 (source
340 (origin
341 (method url-fetch)
342 (uri (string-append "https://yapet.guengel.ch/downloads/yapet-"
343 version ".tar.xz"))
344 (sha256
345 (base32 "0hpibsdry259cmvps35isr6jn9cd9fsk3r1h0ppjx9zxfrpqwldg"))))
346 (build-system gnu-build-system)
347 (arguments
348 `(#:configure-flags
349 (list (string-append "--docdir=" (assoc-ref %outputs "out")
350 "/share/doc",name "-" ,version))))
351 (inputs
352 (list argon2 ncurses openssl))
353 (native-inputs
354 (list cppunit pkg-config))
355 (synopsis "Yet Another Password Encryption Tool")
356 (description "YAPET is a text based password manager using the Blowfish
357 encryption algorithm. Because of its small footprint and very few library
358 dependencies, it is suited for installing on desktop and server systems alike.
359 The text based user interface allows you to run YAPET easily in a Secure Shell
360 session. Two companion utilities enable users to convert CSV files to YAPET
361 and vice versa.")
362 (home-page "https://yapet.guengel.ch/")
363 (license license:gpl3+)))
364
365 (define-public cracklib
366 (package
367 (name "cracklib")
368 (version "2.9.7")
369 (source
370 (origin
371 (method url-fetch)
372 (uri (string-append "https://github.com/cracklib/cracklib/"
373 "releases/download/v" version "/"
374 "cracklib-" version ".tar.bz2"))
375 (sha256
376 (base32 "1rimpjsdnmw8f5b7k558cic41p2qy2n2yrlqp5vh7mp4162hk0py"))))
377 (build-system gnu-build-system)
378 (arguments
379 `(#:phases
380 (modify-phases %standard-phases
381 (add-after 'install 'install-dict
382 (lambda* (#:key make-flags #:allow-other-keys)
383 (begin
384 (chmod (string-append "util/cracklib-format") #o755)
385 (apply invoke "make" "dict" make-flags)
386 #t))))))
387 (synopsis "Password checking library")
388 (home-page "https://github.com/cracklib/cracklib")
389 (description
390 "CrackLib is a library containing a C function which may be used in a
391 @command{passwd}-like program. The idea is simple: try to prevent users from
392 choosing passwords that could easily be guessed (or \"cracked\") by filtering
393 them out, at the source.")
394 (license license:lgpl2.1)))
395
396 (define-public libpwquality
397 (package
398 (name "libpwquality")
399 (version "1.4.4")
400 (source (origin
401 (method url-fetch)
402 (uri (list
403 (string-append "https://github.com/libpwquality/libpwquality"
404 "/releases/download/libpwquality-" version
405 "/libpwquality-" version ".tar.bz2")
406 (string-append "https://launchpad.net/libpwquality/trunk/"
407 version "/+download/"
408 "libpwquality-" version ".tar.bz2")))
409 (sha256
410 (base32
411 "0id5a8bi8xnjg11g9vzrl2xbpx65mfxclxcvis7zx1v8vhisyfyl"))))
412 (build-system gnu-build-system)
413 (arguments
414 `(#:phases
415 (modify-phases %standard-phases
416 (add-before 'configure 'set-LDFLAGS
417 (lambda* (#:key inputs outputs #:allow-other-keys)
418 (setenv "LDFLAGS"
419 (string-append
420 "-Wl,-rpath="
421 (assoc-ref outputs "out") "/lib"))
422 #t)))))
423 (native-inputs
424 `(("python" ,python-wrapper)))
425 (inputs
426 (list cracklib))
427 (synopsis "Password quality checker")
428 (home-page "https://github.com/libpwquality/libpwquality")
429 (description
430 "Libpwquality is a library for password quality checking and generation of
431 random passwords that pass the checks.")
432 (license license:gpl2+)))
433
434 (define-public assword
435 (package
436 (name "assword")
437 (version "0.11")
438 (source (origin
439 (method url-fetch)
440 (uri (list
441 (string-append
442 "http://http.debian.net/debian/pool/main/a/assword/"
443 "assword_" version ".orig.tar.gz")))
444 (sha256
445 (base32
446 "03gkb6kvsghznbcw5l7nmrc6mn3ixkjd5jcs96ni4zs9l47jf7yp"))))
447 (arguments
448 `(;; irritatingly, tests do run but not there are two problems:
449 ;; - "import gtk" fails for unknown reasons here despite it the
450 ;; program working (indeed, I've found I have to do a logout and log
451 ;; back in in after an install order for some mumbo jumbo environment
452 ;; variable mess to work with pygtk and assword... what's up with
453 ;; that?)
454 ;; - even when the tests fail, they don't return a nonzero status,
455 ;; so I'm not sure how to programmatically get that information
456 #:tests? #f
457 #:phases
458 (modify-phases %standard-phases
459 (add-after 'install 'wrap-assword
460 (lambda* (#:key outputs #:allow-other-keys)
461 (let ((prog (string-append
462 (assoc-ref outputs "out")
463 "/bin/assword"))
464 (gi-typelib-path (getenv "GI_TYPELIB_PATH")))
465 (wrap-program prog
466 `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path)))
467 #t)))
468 (add-after 'install 'manpage
469 (lambda* (#:key outputs #:allow-other-keys)
470 (invoke "make" "assword.1")
471 (install-file
472 "assword.1"
473 (string-append (assoc-ref outputs "out") "/share/man/man1")))))))
474 (build-system python-build-system)
475 (native-inputs
476 (list txt2man))
477 (inputs
478 (list gtk+ python-xdo python-gpg python-pygobject))
479 (propagated-inputs
480 (list xclip))
481 (home-page "https://finestructure.net/assword/")
482 (synopsis "Password manager")
483 (description "assword is a simple password manager using GPG-wrapped
484 JSON files. It has a command line interface as well as a very simple
485 graphical interface, which can even \"type\" your passwords into
486 any X11 window.")
487 (license license:gpl3+)))
488
489 (define-public password-store
490 (package
491 (name "password-store")
492 (version "1.7.4")
493 (source (origin
494 (method git-fetch)
495 (uri (git-reference
496 (url "git://git.zx2c4.com/password-store")
497 (commit version)))
498 (sha256
499 (base32
500 "17zp9pnb3i9sd2zn9qanngmsywrb7y495ngcqs6313pv3gb83v53"))
501 (patches (search-patches "password-store-tree-compat.patch"))
502 (file-name (git-file-name name version))))
503 (build-system gnu-build-system)
504 (arguments
505 '(#:phases
506 (modify-phases %standard-phases
507 (delete 'configure)
508 (delete 'build)
509 (add-before 'install 'patch-system-extension-dir
510 (lambda* (#:key outputs #:allow-other-keys)
511 (let* ((out (assoc-ref outputs "out"))
512 (extension-dir (string-append out "/lib/password-store/extensions")))
513 (substitute* "src/password-store.sh"
514 (("^SYSTEM_EXTENSION_DIR=.*$")
515 ;; lead with whitespace to prevent 'make install' from
516 ;; overwriting it again
517 (string-append " SYSTEM_EXTENSION_DIR=\""
518 "${PASSWORD_STORE_SYSTEM_EXTENSION_DIR:-"
519 extension-dir
520 "}\"\n"))))))
521 (add-before 'install 'patch-passmenu-path
522 ;; FIXME Wayland support requires ydotool and dmenu-wl packages
523 ;; We are ignoring part of the script that gets executed if
524 ;; WAYLAND_DISPLAY env variable is set, leaving dmenu-wl and ydotool
525 ;; commands as is.
526 (lambda* (#:key inputs #:allow-other-keys)
527 (substitute* "contrib/dmenu/passmenu"
528 (("dmenu=dmenu\n")
529 (string-append "dmenu="
530 (search-input-file inputs "/bin/dmenu")
531 "\n"))
532 (("xdotool=\"xdotool")
533 (string-append "xdotool=\""
534 (search-input-file inputs "/bin/xdotool"))))))
535 (add-after 'install 'install-passmenu
536 (lambda* (#:key outputs #:allow-other-keys)
537 (let* ((out (assoc-ref outputs "out"))
538 (bin (string-append out "/bin")))
539 (install-file "contrib/dmenu/passmenu" bin))))
540 (add-after 'install 'wrap-path
541 (lambda* (#:key inputs outputs #:allow-other-keys)
542 (let* ((out (assoc-ref outputs "out"))
543 (requisites '("getopt" "git" "gpg" "qrencode" "sed"
544 "tree" "which" "wl-copy" "xclip"))
545 (path (map (lambda (pkg)
546 (dirname (search-input-file
547 inputs (string-append "/bin/" pkg))))
548 requisites)))
549 (wrap-program (string-append out "/bin/pass")
550 `("PATH" ":" prefix (,(string-join path ":"))))))))
551 #:make-flags (list "CC=gcc" (string-append "PREFIX=" %output)
552 "WITH_ALLCOMP=yes"
553 (string-append "BASHCOMPDIR="
554 %output "/etc/bash_completion.d"))
555 ;; Parallel tests may cause a race condition leading to a
556 ;; timeout in some circumstances.
557 #:parallel-tests? #f
558 #:test-target "test"))
559 (native-search-paths
560 (list (search-path-specification
561 (variable "PASSWORD_STORE_SYSTEM_EXTENSION_DIR")
562 (separator #f) ;single entry
563 (files '("lib/password-store/extensions")))))
564 (inputs
565 (list dmenu
566 util-linux
567 git
568 gnupg
569 qrencode
570 sed
571 tree
572 which
573 wl-clipboard
574 xclip
575 xdotool))
576 (home-page "https://www.passwordstore.org/")
577 (synopsis "Encrypted password manager")
578 (description "Password-store is a password manager which uses GnuPG to
579 store and retrieve passwords. The tool stores each password in its own
580 GnuPG-encrypted file, allowing the program to be simple yet secure.
581 Synchronization is possible using the integrated git support, which commits
582 changes to your password database to a git repository that can be managed
583 through the pass command.")
584 (license license:gpl2+)))
585
586 (define-public pass-otp
587 (package
588 (name "pass-otp")
589 (version "1.2.0")
590 (source
591 (origin
592 (method url-fetch)
593 (uri
594 (string-append "https://github.com/tadfisher/pass-otp/releases/"
595 "download/v" version "/pass-otp-" version ".tar.gz"))
596 (sha256
597 (base32
598 "0rrs3iazq80dn0wbl20xkh270428jd8l99m5gd7hl93s4r4sc82p"))))
599 (build-system gnu-build-system)
600 (arguments
601 '(#:make-flags
602 (let* ((out (assoc-ref %outputs "out"))
603 (bashcomp (string-append out "/etc/bash_completion.d")))
604 (list (string-append "PREFIX=" %output)
605 (string-append "BASHCOMPDIR=" bashcomp)))
606 #:phases
607 (modify-phases %standard-phases
608 (delete 'configure)
609 (add-after 'build 'patch-oath-path
610 (lambda* (#:key inputs #:allow-other-keys)
611 (substitute* "otp.bash"
612 (("^OATH=.*$")
613 (string-append
614 "OATH="
615 (assoc-ref inputs "oath-toolkit")
616 "/bin/oathtool\n")))
617 #t)))
618 #:test-target "test"))
619 (inputs
620 (list oath-toolkit))
621 (native-inputs
622 (list password-store expect git gnupg which))
623 (home-page "https://github.com/tadfisher/pass-otp")
624 (synopsis "Pass extension for managing one-time-password (OTP) tokens")
625 (description
626 "Pass OTP is an extension for password-store that allows adding
627 one-time-password (OTP) secrets, generating OTP codes, and displaying secret
628 key URIs using the standard otpauth:// scheme.")
629 (license license:gpl3+)))
630
631 (define-public qtpass
632 (package
633 (name "qtpass")
634 (version "1.3.2")
635 (source
636 (origin
637 (method git-fetch)
638 (uri (git-reference
639 (url "https://github.com/IJHack/QtPass")
640 (commit (string-append "v" version))))
641 (file-name (git-file-name name version))
642 (sha256
643 (base32
644 "0748hjvhjrybi33ci3c8hcr74k9pdrf5jv8npf9hrsrmdyy1kr9x"))))
645 (build-system gnu-build-system)
646 (arguments
647 `(#:modules ((guix build gnu-build-system)
648 (guix build qt-utils)
649 (guix build utils))
650 #:imported-modules (,@%gnu-build-system-modules
651 (guix build qt-utils))
652 #:phases
653 (modify-phases %standard-phases
654 (replace 'configure
655 (lambda* (#:key inputs outputs #:allow-other-keys)
656 (let ((out (assoc-ref outputs "out")))
657 ;; lupdate/lrelease need to find qmake.
658 (setenv "QMAKE" "qmake")
659 ;; qmake needs to find lrelease/lupdate.
660 (invoke "qmake"
661 "QMAKE_LRELEASE=lrelease"
662 "QMAKE_LUPDATE=lupdate"
663 (string-append "PREFIX=" out)))))
664 (add-after 'configure 'reset-resource-timestamps
665 ;; Reset timestamps on localization files for a reproducible build.
666 (lambda _
667 (with-directory-excursion "localization"
668 (for-each (lambda (file)
669 (let* ((base (basename file ".qm"))
670 (src (string-append base ".ts"))
671 (st (stat src)))
672 (set-file-time file st)))
673 (find-files "." ".*\\.qm")))
674 #t))
675 (add-after 'install 'install-auxilliary
676 ;; Install man-page, icon and .desktop file.
677 (lambda* (#:key inputs outputs #:allow-other-keys)
678 (let* ((out (assoc-ref outputs "out"))
679 (applications (string-append out "/share/applications"))
680 (icons (string-append out "/share/icons/hicolor/scalable/apps"))
681 (man (string-append out "/share/man/man1")))
682 (install-file "qtpass.desktop" applications)
683 (install-file "artwork/icon.svg" icons)
684 (rename-file (string-append icons "/icon.svg")
685 (string-append icons "/qtpass-icon.svg"))
686 (install-file "qtpass.1" man)
687 #t)))
688 (add-after 'install 'wrap-qt
689 (lambda* (#:key outputs inputs #:allow-other-keys)
690 (let ((out (assoc-ref outputs "out")))
691 (wrap-qt-program "qtpass" #:output out #:inputs inputs))
692 #t))
693 (add-before 'check 'check-setup
694 ;; Make Qt render "offscreen", required for tests.
695 (lambda _
696 (setenv "QT_QPA_PLATFORM" "offscreen")
697 #t)))))
698 (native-inputs
699 (list qttools))
700 (inputs
701 (list qtbase-5 qtsvg))
702 (home-page "https://qtpass.org")
703 (synopsis "GUI for password manager password-store")
704 (description
705 "Qt-based graphical user interface for the password manager
706 password-store also known as pass. Can use either pass or gpg to interact
707 with password-store files. Features configurable password generation,
708 templates, clipboard handling, and per folder settings for multi-recipient
709 encryption.")
710 (license license:gpl3+)))
711
712 (define-public rofi-pass
713 (package
714 (name "rofi-pass")
715 (version "2.0.2")
716 (source
717 (origin
718 (method url-fetch)
719 (uri
720 (string-append "https://raw.githubusercontent.com/carnager/rofi-pass/"
721 version "/rofi-pass"))
722 (sha256
723 (base32 "0msldkndqp40nx1s5s7ggcr97ir4nshpmnyzvj5hqw1l7m3gvw6j"))
724 (file-name name)))
725 (build-system trivial-build-system)
726 (arguments
727 `(#:modules ((guix build utils))
728 #:builder
729 (begin
730 (use-modules (guix build utils))
731 (let ((source (string-append (assoc-ref %build-inputs "source")))
732 (script "rofi-pass")
733 (out (assoc-ref %outputs "out")))
734 (copy-file source script)
735 (chmod script #o555)
736 (install-file script (string-append out "/bin"))))))
737 (propagated-inputs
738 (list password-store rofi xdotool))
739 (home-page "https://github.com/carnager/rofi-pass")
740 (synopsis "Rofi frontend for password-store")
741 (description "Rofi-pass provides a way to manipulate information stored
742 using password-store through rofi interface:
743 @enumerate
744 @item open URLs of entries with hotkey;
745 @item type any field from entry;
746 @item auto-typing of user and/or password fields;
747 @item auto-typing username based on path;
748 @item auto-typing of more than one field, using the autotype entry;
749 @item bookmarks mode (open stored URLs in browser, default: Alt+x).
750 @end enumerate")
751 (license license:gpl3)))
752
753 (define-public tessen
754 (package
755 (name "tessen")
756 (version "2.1.0")
757 (source (origin
758 (method git-fetch)
759 (uri (git-reference
760 (url "https://github.com/ayushnix/tessen/")
761 (commit (string-append "v" version))))
762 (file-name (git-file-name name version))
763 (sha256
764 (base32
765 "1ddsjhzp1qy3jfhxlrzcxgp0gza234yc0sdlngwa3xdj0wr40zs0"))))
766 (build-system gnu-build-system)
767 (arguments
768 (list #:tests?
769 #f ;no tests
770 #:phases
771 #~(modify-phases %standard-phases
772 (add-after 'unpack 'patch-wtype-path
773 (lambda* (#:key inputs #:allow-other-keys)
774 (substitute* "tessen"
775 (("wtype") (search-input-file inputs "/bin/wtype")))))
776 (delete 'configure)) ;no configure script
777 #:make-flags
778 #~(list (string-append "PREFIX="
779 #$output))))
780 (native-inputs (list scdoc))
781 (inputs (list wtype))
782 (home-page "https://github.com/ayushnix/tessen")
783 (synopsis "Frontend for password-store and gopass")
784 (description "Tessen is a bash script that can autotype and copy data
785 from password-store and gopass files.")
786 (license license:gpl2+)))
787
788 (define-public browserpass-native
789 (package
790 (name "browserpass-native")
791 (version "3.0.7")
792 (source
793 (origin
794 (method git-fetch)
795 (uri (git-reference
796 (url "https://github.com/browserpass/browserpass-native")
797 (commit version)))
798 (file-name (git-file-name name version))
799 (sha256
800 (base32
801 "1jkjslbbac49xjyjkc2b07phdm3i64z40kh6h55cl22dxjmpp1nb"))))
802 (build-system go-build-system)
803 (arguments
804 `(#:import-path "github.com/browserpass/browserpass-native"
805 #:install-source? #f
806 #:phases
807 (modify-phases %standard-phases
808 (add-before 'build 'patch-makefile
809 (lambda* (#:key outputs #:allow-other-keys)
810 (let ((out (assoc-ref outputs "out")))
811 ;; This doesn't go in #:make-flags because the Makefile itself
812 ;; gets installed.
813 (substitute*
814 "src/github.com/browserpass/browserpass-native/Makefile"
815 (("PREFIX \\?= /usr")
816 (string-append "PREFIX ?= " out)))
817 #t)))
818 (add-before 'build 'configure
819 (lambda _
820 (with-directory-excursion
821 "src/github.com/browserpass/browserpass-native"
822 (invoke "make" "configure"))
823 #t))
824 (replace 'build
825 (lambda _
826 (with-directory-excursion
827 "src/github.com/browserpass/browserpass-native"
828 (invoke "make"))
829 #t))
830 (replace 'install
831 (lambda _
832 (with-directory-excursion
833 "src/github.com/browserpass/browserpass-native"
834 (invoke "make" "install"))
835 #t))
836 (add-after 'install 'wrap-executable
837 (lambda* (#:key inputs outputs #:allow-other-keys)
838 (let ((out (assoc-ref outputs "out"))
839 (gnupg (assoc-ref inputs "gnupg")))
840 (wrap-program (string-append out "/bin/browserpass")
841 `("PATH" ":" prefix
842 (,(string-append gnupg "/bin"))))
843 #t))))))
844 (native-inputs
845 (list which))
846 (inputs
847 (list gnupg go-github-com-mattn-go-zglob
848 go-github-com-rifflock-lfshook go-github-com-sirupsen-logrus
849 go-golang-org-x-sys))
850 (home-page "https://github.com/browserpass/browserpass-native")
851 (synopsis "Browserpass native messaging host")
852 (description "Browserpass is a browser extension for pass, a
853 UNIX-based password store manager. It allows you to auto-fill or copy to
854 clipboard credentials for the current domain, protecting you from phishing
855 attacks.
856
857 This package only contains the Browserpass native messaging host. You must
858 also install the browser extension for GNU IceCat or ungoogled-chromium
859 separately.")
860 (license license:isc)))
861
862 (define-public argon2
863 (package
864 (name "argon2")
865 (version "20190702")
866 (source
867 (origin
868 (method git-fetch)
869 (uri (git-reference
870 (url "https://github.com/P-H-C/phc-winner-argon2")
871 (commit version)))
872 (file-name (git-file-name name version))
873 (sha256
874 (base32
875 "01rwanr4wmr9vm6c712x411wig543q195z2icn388z892a93lc7p"))))
876 (build-system gnu-build-system)
877 (arguments
878 `(#:test-target "test"
879 #:make-flags (list "CC=gcc"
880 (string-append "PREFIX=" (assoc-ref %outputs "out"))
881 "LIBRARY_REL=lib"
882 (string-append "ARGON2_VERSION=" ,version)
883 "OPTTEST=1") ; disable CPU optimization
884 #:phases
885 (modify-phases %standard-phases
886 (delete 'configure)))) ; No configure script.
887 (home-page "https://www.argon2.com/")
888 (synopsis "Password hashing library")
889 (description "Argon2 provides a key derivation function that was declared
890 winner of the 2015 Password Hashing Competition.")
891 ;; Argon2 is dual licensed under CC0 and ASL 2.0. Some of the source
892 ;; files are CC0 only; see README.md and LICENSE for details.
893 (license (list license:cc0 license:asl2.0))))
894
895 (define-public pass-git-helper
896 (package
897 (name "pass-git-helper")
898 (version "1.1.0")
899 (source
900 (origin
901 (method git-fetch)
902 (uri (git-reference
903 (url "https://github.com/languitar/pass-git-helper")
904 (commit (string-append "v" version))))
905 (file-name (git-file-name name version))
906 (sha256
907 (base32
908 "18nvwlp0w4aqj268wly60rnjzqw2d8jl0hbs6bkwp3hpzzz5g6yd"))))
909 (build-system python-build-system)
910 (arguments
911 `(#:phases
912 (modify-phases %standard-phases
913 (add-before 'build 'patch-pass-path
914 (lambda* (#:key inputs #:allow-other-keys)
915 (let* ((password-store (assoc-ref inputs "password-store"))
916 (pass (string-append password-store "/bin/pass")))
917 (substitute* '("passgithelper.py"
918 "test_passgithelper.py")
919 (("'pass'") (string-append "'" pass "'")))
920 #t)))
921 (replace 'check
922 (lambda _
923 (setenv "HOME" (getcwd))
924 (invoke "pytest"))))))
925 (inputs
926 (list python-pyxdg password-store))
927 (native-inputs
928 (list python-pytest python-pytest-mock))
929 (home-page "https://github.com/languitar/pass-git-helper")
930 (synopsis "Git credential helper interfacing with pass")
931 (description "pass-git-helper is a git credential helper which
932 uses pass, the standard unix password manager, as the credential backend for
933 your git repositories. This is achieved by explicitly defining mappings
934 between hosts and entries in the password store.")
935 (license license:lgpl3+)))
936
937 (define-public john-the-ripper-jumbo
938 (let ((official-version "1.9.0")
939 (jumbo-version "1"))
940 (package
941 (name "john-the-ripper-jumbo")
942 (version (string-append official-version "-" jumbo-version))
943 (source
944 (origin
945 (method url-fetch)
946 (uri (string-append "http://www.openwall.com/john/j/john-"
947 official-version "-jumbo-" jumbo-version ".tar.xz"))
948 (sha256
949 (base32
950 "0fvz3v41hnaiv1ggpxanfykyfjq79cwp9qcqqn63vic357w27lgm"))))
951 (build-system gnu-build-system)
952 (native-inputs
953 (list perl))
954 (inputs
955 `(("gmp" ,gmp)
956 ("libpcap" ,libpcap)
957 ("nss" ,nss)
958 ("openssl" ,openssl)
959 ("python" ,python-2) ; For "python" and "python2" shebangs
960 ("ruby" ,ruby) ; For genincstats.rb
961 ("zlib" ,zlib)))
962 (arguments
963 `(#:configure-flags
964 (list "--with-systemwide"
965 ;; Do not test for instruction set in configure, and do not
966 ;; pass '-march=native' to gcc:
967 "--disable-native-tests"
968 "--disable-native-march"
969 ,(string-append
970 "--enable-simd="
971 (let ((system (or (%current-target-system)
972 (%current-system))))
973 (cond
974 ((or (string-prefix? "x86_64" system)
975 (string-prefix? "i686" system)) "sse2")
976 ((string-prefix? "aarch" system) "neon")
977 (else "no")))))
978 #:phases
979 (modify-phases %standard-phases
980 (add-before 'configure 'chdir-src
981 (lambda _ (chdir "src") #t))
982 (replace 'install
983 (lambda _
984 (let ((bindir (string-append %output "/bin"))
985 (docdir (string-append %output "/share/doc/john"))
986 (execdir (string-append %output "/libexec/john"))
987 (datadir (string-append %output "/share/john"))
988 (install-file-to (lambda (dir)
989 (lambda (f) (install-file f dir))))
990 (symlink? (lambda (_ s) (eq? (stat:type s) 'symlink))))
991 (with-directory-excursion "../run"
992 (for-each (install-file-to bindir)
993 (cons*
994 "john" "makechr" "cprepair" "SIPdump" "tgtsnarf"
995 "genmkvpwd" "mkvcalcproba" "calc_stat" "raw2dyna"
996 (find-files "." "(to|2)?john(-[^.]*)?$")))
997 (for-each (lambda (f) ; Install symlinked aliases
998 (let ((tgt (string-append bindir "/" (basename f))))
999 ;; The use of install-file above dereferences
1000 ;; symlinks. We'd rather have the symlinks
1001 ;; for clarity, so remove tgt before linking.
1002 (when (file-exists? tgt) (delete-file tgt))
1003 (symlink "john" tgt)))
1004 (find-files "." symlink?))
1005 (for-each (install-file-to execdir)
1006 (cons* "mailer" "benchmark-unify" "relbench"
1007 (find-files "." ".*\\.js")))
1008 (for-each (lambda (f)
1009 (let* ((base (basename f))
1010 (name (substring base 0 (string-index base #\.)))
1011 (link (string-append bindir "/" name)))
1012 (install-file f execdir)
1013 (when (and (executable-file? f)
1014 (not (file-exists? link)))
1015 (symlink (string-append execdir "/" base) link))))
1016 (find-files "." ".*\\.(pl|py|rb|lua)"))
1017 (for-each (install-file-to datadir)
1018 (append (find-files "." "(stats|dictionary.*)")
1019 (find-files "." "(.*\\.chr|.*\\.lst)")
1020 (find-files "." ".*\\.conf")))
1021 (copy-recursively "rules" (string-append datadir "/rules")))
1022 (copy-recursively "../doc" docdir)
1023 #t)))
1024 (delete 'check) ; Tests need installed .conf files; move after install
1025 (add-after 'install 'check
1026 (lambda args
1027 (setenv "HOME" "/tmp") ; Some tests need to write to ~/.john
1028 (setenv "OMP_NUM_THREADS" (number->string (parallel-job-count)))
1029 (apply (assoc-ref %standard-phases 'check) args))))))
1030 (home-page "http://www.openwall.com/john/")
1031 (synopsis "Password cracker")
1032 (description "John the Ripper is a fast password cracker. Its primary
1033 purpose is to detect weak Unix passwords. Besides several @code{crypt}
1034 password hash types most commonly found on various Unix systems, supported out
1035 of the box are Windows LM hashes, plus lots of other hashes and ciphers. This
1036 is the community-enhanced, \"jumbo\" version of John the Ripper.")
1037 (license license:gpl2+))))
1038
1039 (define-public sala
1040 (package
1041 (name "sala")
1042 (version "1.3")
1043 (source
1044 (origin
1045 (method url-fetch)
1046 (uri (pypi-uri "sala" version))
1047 (sha256
1048 (base32
1049 "13qgmc3i2a0cqp8jqrfl93lnphfagb32pgfikc1gza2a14asxzi8"))))
1050 (build-system python-build-system)
1051 (arguments
1052 ;; Sala is supposed to work with Python 3.2 or higher,
1053 ;; but it doesn't work with Python 3.6. Better stick
1054 ;; to Python 2, which works fine.
1055 `(#:python ,python-2))
1056 (propagated-inputs
1057 (list gnupg pwgen))
1058 (home-page "http://www.digip.org/sala/")
1059 (synopsis "Encrypted plaintext password store")
1060 (description
1061 "Store passwords and other bits of sensitive plain-text information
1062 to encrypted files on a directory hierarchy. The information is protected
1063 by GnuPG's symmetrical encryption.")
1064 (license license:expat)))
1065
1066 (define-public fpm2
1067 (package
1068 (name "fpm2")
1069 (version "0.79")
1070 (source (origin
1071 (method url-fetch)
1072 (uri (string-append "https://als.regnet.cz/fpm2/download/fpm2-"
1073 version ".tar.bz2"))
1074 (sha256
1075 (base32
1076 "19sdy1lygfhkg5nxi2w9a4d9kwvw24nxp0ix0p0lz91qpvk9qpnm"))))
1077 (build-system gnu-build-system)
1078 (inputs `(("gtk2" ,gtk+-2)
1079 ("gnupg" ,gnupg)
1080 ("libxml2" ,libxml2)))
1081 (native-inputs (list pkg-config intltool))
1082 (arguments
1083 `(#:configure-flags '("CFLAGS=-O2 -g -fcommon")
1084 #:phases
1085 (modify-phases %standard-phases
1086 (add-before 'configure 'pre-configure
1087 ;; The file po/POTFILES.in ends up missing for some reason in
1088 ;; both nix and guix builds. Adding the file with contents
1089 ;; found during troubleshooting.
1090 (lambda _
1091 (call-with-output-file "po/POTFILES.in"
1092 (lambda (port)
1093 (format port "data/fpm2.desktop.in
1094 data/fpm2.desktop.in.in
1095 fpm2.glade
1096 src/callbacks.c
1097 src/fpm.c
1098 src/fpm_file.c
1099 src/interface.c
1100 src/support.c
1101 fpm2.glade
1102 ")))
1103 #t)))))
1104 (synopsis "Manage, generate and store passwords encrypted")
1105 (description "FPM2 is GTK2 port from Figaro's Password Manager
1106 originally developed by John Conneely, with some new enhancements.
1107
1108 Upstream development seems to have stopped. It is therefore recommended
1109 to use a different password manager.")
1110 (home-page "https://als.regnet.cz/fpm2/")
1111 (license license:gpl2+)))
1112
1113 (define-public pass-rotate
1114 (package
1115 (name "pass-rotate")
1116 (version "0.1")
1117 (source
1118 (origin
1119 (method git-fetch)
1120 (uri (git-reference
1121 (url "https://github.com/ddevault/pass-rotate")
1122 (commit version)))
1123 (file-name (git-file-name name version))
1124 (sha256
1125 (base32
1126 "1m067vvdlc85csbpkp8aw4s3ags7q8s3jszrr32kmj9qhk5c254f"))))
1127 (build-system python-build-system)
1128 (inputs
1129 (list python-beautifulsoup4 python-docopt python-html5lib
1130 python-requests))
1131 (home-page "https://github.com/ddevault/pass-rotate")
1132 (synopsis "Rotate password on online services")
1133 (description "pass-rotate is a command line utility and python library for
1134 rotating passwords on various web services. It makes it easier to rotate your
1135 passwords, one at a time or in bulk, when security events or routine upkeep of
1136 your online accounts makes it necessary.")
1137 (license license:expat)))
1138
1139 (define-public hashcat
1140 (package
1141 (name "hashcat")
1142 (version "6.1.1")
1143 (source
1144 (origin
1145 (method url-fetch)
1146 (uri (string-append "https://hashcat.net/files/hashcat-"
1147 version ".tar.gz"))
1148 (sha256
1149 (base32
1150 "104z63m7lqbb0sdrxhf9yi15l4a9zwf9m6zs9dbb3gf0nfxl1h9r"))))
1151 (native-inputs
1152 (list opencl-headers))
1153 (build-system gnu-build-system)
1154 (arguments
1155 '(#:tests? #f ;no tests
1156 #:make-flags (list (string-append "PREFIX=" %output))
1157 #:phases
1158 (modify-phases %standard-phases
1159 (delete 'configure))))
1160 (home-page "https://hashcat.net/hashcat/")
1161 (synopsis "Advanced password recovery utility")
1162 (description "Hashcat is an password recovery utility, supporting five
1163 unique modes of attack for over 200 highly-optimized hashing algorithms.
1164 Hashcat currently supports CPUs, GPUs, and other hardware accelerators on
1165 Linux, Windows, and macOS, and has facilities to help enable distributed
1166 password cracking.")
1167 (license license:expat)))
1168
1169 (define-public hashcat-utils
1170 (package
1171 (name "hashcat-utils")
1172 (version "1.9")
1173 (source
1174 (origin
1175 (method url-fetch)
1176 (uri (string-append "https://github.com/hashcat/hashcat-utils/releases/"
1177 "download/v" version "/"
1178 "hashcat-utils-" version ".7z"))
1179 (sha256
1180 (base32 "0kq555kb338691qd7zjmi8vhq4km3apnsl2w63zh0igwzcjx6lx1"))))
1181 (native-inputs
1182 (list p7zip))
1183 (inputs
1184 (list perl))
1185 (build-system gnu-build-system)
1186 (arguments
1187 `(#:tests? #f ;no tests
1188 #:make-flags (list "CC=gcc"
1189 ;; Upstream bug(?): "make all" seems to remove the
1190 ;; Perl scripts from the source.
1191 "native")
1192 #:phases
1193 (modify-phases %standard-phases
1194 (replace 'unpack
1195 (lambda* (#:key source #:allow-other-keys)
1196 (invoke "7z" "x" source)
1197 (chdir (string-append "hashcat-utils-" ,version "/src"))
1198 #t))
1199 (delete 'configure)
1200 (replace 'install
1201 (lambda* (#:key outputs #:allow-other-keys)
1202 (let ((out (string-append (assoc-ref outputs "out") "/bin")))
1203 (mkdir-p out)
1204 (for-each
1205 (lambda (file)
1206 (copy-file file (string-append out "/"
1207 (basename file ".bin"))))
1208 (find-files "." "\\.bin$"))
1209 (for-each
1210 (lambda (file)
1211 (copy-file file (string-append out "/"
1212 (basename file ".pl"))))
1213 (find-files "../bin" "\\.pl$"))
1214 #t))))))
1215 (home-page "https://github.com/hashcat/hashcat-utils/")
1216 (synopsis "Small utilities that are useful in advanced password cracking")
1217 (description "Hashcat-utils are a set of small utilities that are useful
1218 in advanced password cracking. They all are packed into multiple stand-alone
1219 binaries. All of these utils are designed to execute only one specific
1220 function. Since they all work with @code{STDIN} and @code{STDOUT} you can
1221 group them into chains.")
1222 (license license:expat)))
1223
1224 (define-public bruteforce-luks
1225 (package
1226 (name "bruteforce-luks")
1227 (version "1.4.0")
1228 (source
1229 (origin
1230 (method url-fetch)
1231 (uri (string-append "https://github.com/glv2/bruteforce-luks/releases/download/"
1232 version
1233 "/bruteforce-luks-"
1234 version
1235 ".tar.lz"))
1236 (sha256
1237 (base32 "0yawrlbbklhmvwr99wm7li3r0d5kxvpkwf33a12rji7z0ya5p340"))))
1238 (build-system gnu-build-system)
1239 (native-inputs
1240 (list lzip))
1241 (inputs
1242 (list cryptsetup))
1243 (synopsis "LUKS encrypted volume cracker")
1244 (description
1245 "This is a cracker for LUKS encrypted volumes. It can be used either in
1246 exhaustive mode to try every password given a charset or in dictionary mode to
1247 try every password contained in a file.")
1248 (home-page "https://github.com/glv2/bruteforce-luks")
1249 (license license:gpl3+)))
1250
1251 (define-public makepasswd
1252 (let ((commit "3545d57d3a589a392d7eb0df36a5286785345c9e")
1253 (revision "1"))
1254 (package
1255 (name "makepasswd")
1256 (version (git-version "0.5.4" revision commit))
1257 (source
1258 (origin
1259 (method git-fetch)
1260 (uri (git-reference
1261 (url "https://github.com/khorben/makepasswd")
1262 (commit commit)))
1263 (file-name (git-file-name name version))
1264 (sha256
1265 (base32 "0lspqyyxbk6h28yxnp7pd5aib161vrkzgasam5jpzn35n1jacx2j"))))
1266 (build-system gnu-build-system)
1267 (native-inputs
1268 (list pkg-config libxslt libxml2 docbook-xsl docbook-xml))
1269 (inputs
1270 (list openssl))
1271 (arguments
1272 `(#:phases
1273 (modify-phases %standard-phases
1274 (delete 'configure))
1275 #:make-flags (list "CC=gcc"
1276 (string-append "PREFIX=" (assoc-ref %outputs "out")))
1277 #:tests? #f)) ;no tests
1278 (synopsis "Generate (pseudo-)random passwords and hashes")
1279 (description
1280 "Makepasswd is a program that generates pseudo-random passwords of a
1281 desired length. It can also generate their corresponding hashes for a given
1282 encryption algorithm if so desired.")
1283 (home-page "https://github.com/khorben/makepasswd")
1284 (license license:gpl3))))
1285
1286 (define-public pass-tomb
1287 (package
1288 (name "pass-tomb")
1289 (version "1.2")
1290 (source
1291 (origin
1292 (method git-fetch)
1293 (uri (git-reference
1294 (url "https://github.com/roddhjav/pass-tomb")
1295 (commit (string-append "v" version))))
1296 (file-name (git-file-name name version))
1297 (sha256
1298 (base32 "1qj7vx7svk1ljwihj3kv310k17mafnf919n30n4qn1yxmmsvj924"))))
1299 (build-system gnu-build-system)
1300 (arguments
1301 `(#:make-flags
1302 (let ((out (assoc-ref %outputs "out")))
1303 (list (string-append "PREFIX=" out)
1304 (string-append "BASHCOMPDIR=" out "/etc/bash_completion.d")))
1305 #:test-target "tests"
1306 ;; tests are very dependent on system state (swap partition) and require
1307 ;; access to /tmp/zsh which is not in the build container.
1308 #:tests? #f
1309 #:phases
1310 (modify-phases %standard-phases
1311 (add-after 'unpack 'set-tomb-path
1312 (lambda* (#:key inputs #:allow-other-keys)
1313 (let ((tomb (assoc-ref inputs "tomb")))
1314 (substitute* "tomb.bash"
1315 ((":-tomb")
1316 (string-append ":-" tomb "/bin/tomb"))))))
1317 (delete 'configure))))
1318 (inputs
1319 (list tomb))
1320 (home-page "https://github.com/roddhjav/pass-tomb")
1321 (synopsis "Pass extension keeping the tree of passwords encrypted")
1322 (description "Pass-tomb provides a convenient solution to put your
1323 password store in a Tomb and then keep your password tree encrypted when you
1324 are not using it. It uses the same GPG key to encrypt passwords and tomb,
1325 therefore you don't need to manage more key or secret. Moreover, you can ask
1326 pass-tomb to automatically close your store after a given time.")
1327 (license license:gpl3+)))