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