gnu: Add enet.
[jackhill/guix/guix.git] / gnu / packages / password-utils.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2015 Steve Sprang <scs@stevesprang.com>
3 ;;; Copyright © 2015, 2016 Efraim Flashner <efraim@flashner.co.il>
4 ;;; Copyright © 2015 Aljosha Papsch <misc@rpapsch.de>
5 ;;; Copyright © 2016 Christopher Allan Webber <cwebber@dustycloud.org>
6 ;;; Copyright © 2016 Jessica Tallon <tsyesika@tsyesika.se>
7 ;;; Copyright © 2016 Andreas Enge <andreas@enge.fr>
8 ;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
9 ;;; Copyright © 2016 Alex Griffin <a@ajgrf.com>
10 ;;;
11 ;;; This file is part of GNU Guix.
12 ;;;
13 ;;; GNU Guix is free software; you can redistribute it and/or modify it
14 ;;; under the terms of the GNU General Public License as published by
15 ;;; the Free Software Foundation; either version 3 of the License, or (at
16 ;;; your option) any later version.
17 ;;;
18 ;;; GNU Guix is distributed in the hope that it will be useful, but
19 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
20 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 ;;; GNU General Public License for more details.
22 ;;;
23 ;;; You should have received a copy of the GNU General Public License
24 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
25
26 (define-module (gnu packages password-utils)
27 #:use-module ((guix licenses) #:prefix license:)
28 #:use-module (guix build-system cmake)
29 #:use-module (guix build-system gnu)
30 #:use-module (guix download)
31 #:use-module (guix packages)
32 #:use-module (gnu packages)
33 #:use-module (gnu packages admin)
34 #:use-module (gnu packages base)
35 #:use-module (gnu packages compression)
36 #:use-module (gnu packages gnupg)
37 #:use-module (gnu packages gtk)
38 #:use-module (gnu packages guile)
39 #:use-module (gnu packages linux)
40 #:use-module (gnu packages man)
41 #:use-module (gnu packages ncurses)
42 #:use-module (gnu packages pkg-config)
43 #:use-module (gnu packages python)
44 #:use-module (gnu packages tls)
45 #:use-module (gnu packages qt)
46 #:use-module (gnu packages version-control)
47 #:use-module (gnu packages xdisorg)
48 #:use-module (gnu packages xorg)
49 #:use-module (guix build-system python))
50
51 (define-public pwgen
52 (package
53 (name "pwgen")
54 (version "2.07")
55 (source
56 (origin
57 (method url-fetch)
58 (uri (string-append "mirror://sourceforge/pwgen/pwgen/" version
59 "/pwgen-" version ".tar.gz"))
60 (sha256
61 (base32 "0mhmw700kkh238fzivcwnwi94bj9f3h36yfh3k3j2v19b0zmjx7b"))))
62 (build-system gnu-build-system)
63 (arguments
64 `(#:tests? #f)) ; no test suite
65 (home-page "http://pwgen.sourceforge.net/")
66 (synopsis "Password generator")
67 (description "Pwgen generates passwords which can be easily memorized by a
68 human.")
69 (license license:gpl2)))
70
71 (define-public keepassx
72 (package
73 (name "keepassx")
74 (version "2.0.2")
75 (source
76 (origin
77 (method url-fetch)
78 (uri (string-append "https://www.keepassx.org/releases/" version
79 "/keepassx-" version ".tar.gz"))
80 (sha256
81 (base32
82 "1f1nlbd669rmpzr52d9dgfgclg4jcaq2jkrby3b8q1vjkksdqjr0"))))
83 (build-system cmake-build-system)
84 (inputs
85 `(("libgcrypt" ,libgcrypt)
86 ("libxtst" ,libxtst)
87 ("qt" ,qt-4)))
88 (native-inputs
89 `(("zlib" ,zlib)))
90 (home-page "https://www.keepassx.org")
91 (synopsis "Password manager")
92 (description "KeePassX is a password manager or safe which helps you to
93 manage your passwords in a secure way. You can put all your passwords in one
94 database, which is locked with one master key or a key-file which can be stored
95 on an external storage device. The databases are encrypted using the
96 algorithms AES or Twofish.")
97 ;; Non functional parts use various licences.
98 (license license:gpl3)))
99
100 (define-public shroud
101 (package
102 (name "shroud")
103 (version "0.1.1")
104 (source (origin
105 (method url-fetch)
106 (uri (string-append "http://files.dthompson.us/shroud/shroud-"
107 version ".tar.gz"))
108 (sha256
109 (base32
110 "1y43yhgy2zbrk5bqj3qyx9rkcz2bma9sinlrg7dip3jqms9gq4lr"))))
111 (build-system gnu-build-system)
112 (inputs
113 `(("guile" ,guile-2.0)
114 ("gnupg" ,gnupg)
115 ("xclip" ,xclip)))
116 (synopsis "GnuPG-based secret manager")
117 (description "Shroud is a simple secret manager with a command line
118 interface. The password database is stored as a Scheme s-expression and
119 encrypted with a GnuPG key. Secrets consist of an arbitrary number of
120 key/value pairs, making Shroud suitable for more than just password storage.
121 For copying and pasting secrets into web browsers and other graphical
122 applications, there is xclip integration." )
123 (home-page "http://dthompson.us/pages/software/shroud.html")
124 (license license:gpl3+)))
125
126 (define-public yapet
127 (package
128 (name "yapet")
129 (version "1.0")
130 (source (origin
131 (method url-fetch)
132 (uri (string-append "http://www.guengel.ch/myapps/yapet/downloads/yapet-"
133 version
134 ".tar.bz2"))
135 (sha256
136 (base32
137 "0ydbnqw6icdh07pnv2w6dhvq501bdfvrklv4xmyr8znca9d753if"))))
138 (build-system gnu-build-system)
139 (inputs
140 `(("ncurses" ,ncurses)
141 ("openssl" ,openssl)))
142 (native-inputs
143 `(("pkg-config" ,pkg-config)))
144 (synopsis "Yet Another Password Encryption Tool")
145 (description "YAPET is a text based password manager using the Blowfish
146 encryption algorithm. Because of its small footprint and very few library
147 dependencies, it is suited for installing on desktop and server systems alike.
148 The text based user interface allows you to run YAPET easily in a Secure Shell
149 session. Two companion utilities enable users to convert CSV files to YAPET
150 and vice versa.")
151 (home-page "http://www.guengel.ch/myapps/yapet/")
152 (license license:gpl3+)))
153
154 (define-public cracklib
155 (package
156 (name "cracklib")
157 (version "2.9.6")
158 (source (origin
159 (method url-fetch)
160 (uri (string-append "https://github.com/cracklib/cracklib/"
161 "releases/download/" name "-" version "/"
162 name "-" version ".tar.gz"))
163 (patches (search-patches "cracklib-CVE-2016-6318.patch"))
164 (sha256
165 (base32
166 "0hrkb0prf7n92w6rxgq0ilzkk6rkhpys2cfqkrbzswp27na7dkqp"))))
167 (build-system gnu-build-system)
168 (synopsis "Password checking library")
169 (home-page "https://github.com/cracklib/cracklib")
170 (description
171 "CrackLib is a library containing a C function which may be used in a
172 passwd like program. The idea is simple: try to prevent users from choosing
173 passwords that could be guessed by crack by filtering them out, at source.")
174 (license license:lgpl2.1)))
175
176 (define-public libpwquality
177 (package
178 (name "libpwquality")
179 (version "1.3.0")
180 (source (origin
181 (method url-fetch)
182 (uri (list
183 (string-append "https://fedorahosted.org/releases/l/i/"
184 name "/" name "-" version ".tar.bz2")
185 (string-append "https://launchpad.net/libpwquality/trunk/"
186 version "/+download/"
187 name "-" version ".tar.bz2")))
188 (sha256
189 (base32
190 "0aidriag6h0syfm33nzdfdsqgrnsgihwjv3a5lgkqch3w68fmlkl"))))
191 (build-system gnu-build-system)
192 (arguments
193 ;; XXX: have RUNPATH issue.
194 '(#:configure-flags '("--disable-python-bindings")))
195 (inputs
196 `(("cracklib" ,cracklib)))
197 (synopsis "Password quality checker")
198 (home-page "https://fedorahosted.org/libpwquality/")
199 (description
200 "Libpwquality is a library for password quality checking and generation of
201 random passwords that pass the checks.")
202 (license license:gpl2+)))
203
204 (define-public assword
205 (package
206 (name "assword")
207 (version "0.8")
208 (source (origin
209 (method url-fetch)
210 (uri (list
211 (string-append
212 "http://http.debian.net/debian/pool/main/a/assword/"
213 "assword_" version ".orig.tar.gz")))
214 (sha256
215 (base32
216 "0dl4wizbi0r21wxzykm8s445xbvqim5nabi799dmpkdnnh8i546i"))))
217 (arguments
218 `(#:python ,python-2
219 ;; irritatingly, tests do run but not there are two problems:
220 ;; - "import gtk" fails for unknown reasons here despite it the
221 ;; program working (indeed, I've found I have to do a logout and log
222 ;; back in in after an install order for some mumbo jumbo environment
223 ;; variable mess to work with pygtk and assword... what's up with
224 ;; that?)
225 ;; - even when the tests fail, they don't return a nonzero status,
226 ;; so I'm not sure how to programmatically get that information
227 #:tests? #f
228 #:phases
229 (modify-phases %standard-phases
230 (add-after 'install 'manpage
231 (lambda* (#:key outputs #:allow-other-keys)
232 (and
233 (zero? (system* "make" "assword.1"))
234 (install-file
235 "assword.1"
236 (string-append (assoc-ref outputs "out") "/share/man/man1"))))))))
237 (build-system python-build-system)
238 (native-inputs
239 `(("help2man" ,help2man)))
240 (inputs
241 `(("python-setuptools" ,python2-setuptools)
242 ("python2-xdo" ,python2-xdo)
243 ("python2-pygpgme" ,python2-pygpgme)
244 ("python2-pygtk" ,python2-pygtk)))
245 (propagated-inputs
246 `(("xclip" ,xclip)))
247 (home-page "https://finestructure.net/assword/")
248 (synopsis "Password manager")
249 (description "assword is a simple password manager using GPG-wrapped
250 JSON files. It has a command line interface as well as a very simple
251 graphical interface, which can even \"type\" your passwords into
252 any X11 window.")
253 (license license:gpl3+)))
254
255 (define-public password-store
256 (package
257 (name "password-store")
258 (version "1.6.5")
259 (source (origin
260 (method url-fetch)
261 (uri
262 (string-append "https://git.zx2c4.com/password-store/snapshot/"
263 name "-" version ".tar.xz"))
264 (sha256
265 (base32
266 "05bk3lrp5jwg0v338lvylp7glpliydzz4jf5pjr6k3kagrv3jyik"))))
267 (build-system gnu-build-system)
268 (arguments
269 '(#:phases
270 (modify-phases %standard-phases
271 (delete 'configure)
272 (add-after 'install 'wrap-path
273 (lambda* (#:key inputs outputs #:allow-other-keys)
274 (let ((out (assoc-ref outputs "out"))
275 (path (map (lambda (pkg)
276 (string-append (assoc-ref inputs pkg) "/bin"))
277 '("coreutils" "getopt" "git" "gnupg" "pwgen"
278 "sed" "tree" "which" "xclip"))))
279 (wrap-program (string-append out "/bin/pass")
280 `("PATH" ":" prefix (,(string-join path ":"))))))))
281 #:make-flags (list "CC=gcc" (string-append "PREFIX=" %output))
282 #:test-target "test"))
283 (inputs
284 `(("getopt" ,util-linux)
285 ("git" ,git)
286 ("gnupg" ,gnupg)
287 ("pwgen" ,pwgen)
288 ("sed" ,sed)
289 ("tree" ,tree)
290 ("which" ,which)
291 ("xclip" ,xclip)))
292 (home-page "http://www.passwordstore.org/")
293 (synopsis "Encrypted password manager")
294 (description "Password-store is a password manager which uses GnuPG to
295 store and retrieve passwords. The tool stores each password in its own
296 GnuPG-encrypted file, allowing the program to be simple yet secure.
297 Synchronization is possible using the integrated git support, which commits
298 changes to your password database to a git repository that can be managed
299 through the pass command.")
300 (license license:gpl2+)))
301
302 (define-public argon2
303 (package
304 (name "argon2")
305 (version "20160406")
306 (source
307 (origin
308 (method url-fetch)
309 (uri
310 (string-append
311 "https://codeload.github.com/P-H-C/phc-winner-"
312 name "/tar.gz/" version))
313 (file-name (string-append name "-" version ".tar.gz"))
314 (sha256
315 (base32
316 "0g6wa94sh639xl1qc8z21q43r1mp8y77r1zf8nwx5pfsxd8fmyzv"))))
317 (build-system gnu-build-system)
318 (arguments
319 `(#:test-target "test"
320 #:make-flags '("CC=gcc")
321 #:phases
322 (modify-phases %standard-phases
323 (delete 'configure)
324 (replace 'install
325 (lambda _
326 (let ((out (assoc-ref %outputs "out")))
327 (install-file "argon2" (string-append out "/bin"))
328 (install-file "libargon2.a" (string-append out "/lib"))
329 (install-file "libargon2.so" (string-append out "/lib"))
330 (copy-recursively "include"
331 (string-append out "/include"))))))))
332 (home-page "https://www.argon2.com/")
333 (synopsis "Password hashing library")
334 (description "Argon2 provides a key derivation function that was declared
335 winner of the 2015 Password Hashing Competition.")
336 (license license:cc0)))
337
338 (define-public python-bcrypt
339 (package
340 (name "python-bcrypt")
341 (version "3.1.0")
342 (source
343 (origin
344 (method url-fetch)
345 (uri (pypi-uri "bcrypt" version))
346 (sha256
347 (base32
348 "1giy0dvd8gvq6flxh44np1v2nqwsji5qsnrz038mgwzgp7c20j75"))))
349 (build-system python-build-system)
350 (native-inputs
351 `(("python-pycparser" ,python-pycparser)
352 ("python-pytest" ,python-pytest)))
353 (inputs
354 `(("python-cffi" ,python-cffi)
355 ("python-six" ,python-six)))
356 (home-page "https://github.com/pyca/bcrypt/")
357 (synopsis
358 "Modern password hashing library")
359 (description
360 "Bcrypt is a Python module which provides a password hashing method based
361 on the Blowfish password hashing algorithm, as described in
362 @url{http://static.usenix.org/events/usenix99/provos.html,\"A Future-Adaptable
363 Password Scheme\"} by Niels Provos and David Mazieres.")
364 (license license:asl2.0)))
365
366 (define-public python2-bcrypt
367 (let ((bcrypt (package-with-python2 python-bcrypt)))
368 (package (inherit bcrypt)
369 (native-inputs
370 `(("python2-setuptools" ,python2-setuptools)
371 ,@(package-native-inputs bcrypt))))))