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