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