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