;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2016 David Thompson ;;; Copyright © 2016, 2019, 2020 Marius Bakke ;;; Copyright © 2017 Leo Famulari ;;; Copyright © 2018, 2020 Tobias Geerinckx-Rice ;;; Copyright © 2016 Kei Kebreau ;;; Copyright © 2019 Ricardo Wurmus ;;; Copyright © 2020 Nicolas Goaziou ;;; Copyright © 2020 Efraim Flashner ;;; ;;; This file is part of GNU Guix. ;;; ;;; GNU Guix is free software; you can redistribute it and/or modify it ;;; under the terms of the GNU General Public License as published by ;;; the Free Software Foundation; either version 3 of the License, or (at ;;; your option) any later version. ;;; ;;; GNU Guix is distributed in the hope that it will be useful, but ;;; WITHOUT ANY WARRANTY; without even the implied warranty of ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;;; GNU General Public License for more details. ;;; ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . (define-module (gnu packages speech) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix git-download) #:use-module (guix utils) #:use-module (guix build-system gnu) #:use-module (gnu packages) #:use-module (gnu packages audio) #:use-module (gnu packages autotools) #:use-module (gnu packages base) ;for 'which' #:use-module (gnu packages bison) #:use-module (gnu packages compression) #:use-module (gnu packages documentation) #:use-module (gnu packages emacs) #:use-module (gnu packages gcc) #:use-module (gnu packages glib) #:use-module (gnu packages gstreamer) #:use-module (gnu packages linux) #:use-module (gnu packages ncu;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2015 Steve Sprang <scs@stevesprang.com> ;;; Copyright © 2015-2024 Efraim Flashner <efraim@flashner.co.il> ;;; Copyright © 2015 Aljosha Papsch <misc@rpapsch.de> ;;; Copyright © 2016 Christine Lemmer-Webber <cwebber@dustycloud.org> ;;; Copyright © 2016 Jessica Tallon <tsyesika@tsyesika.se> ;;; Copyright © 2016 Andreas Enge <andreas@enge.fr> ;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org> ;;; Copyright © 2016, 2019, 2020 Alex Griffin <a@ajgrf.com> ;;; Copyright © 2017 Leo Famulari <leo@famulari.name> ;;; Copyright © 2017, 2018 Clément Lassieur <clement@lassieur.org> ;;; Copyright © 2017–2021 Tobias Geerinckx-Rice <me@tobias.gr> ;;; Copyright © 2017 Jelle Licht <jlicht@fsfe.org> ;;; Copyright © 2017, 2019 Eric Bavier <bavier@member.fsf.org> ;;; Copyright © 2017, 2020-2022, 2024 Nicolas Goaziou <mail@nicolasgoaziou.fr> ;;; Copyright © 2017 Manolis Fragkiskos Ragkousis <manolis837@gmail.com> ;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com> ;;; Copyright © 2018, 2022 Marius Bakke <marius@gnu.org> ;;; Copyright © 2018 Konrad Hinsen <konrad.hinsen@fastmail.net> ;;; Copyright © 2018 Thomas Sigurdsen <tonton@riseup.net> ;;; Copyright © 2018 Arun Isaac <arunisaac@systemreboot.net> ;;; Copyright © 2018 Pierre Neidhardt <mail@ambrevar.xyz> ;;; Copyright © 2018 Amirouche Boubekki <amirouche@hypermove.net> ;;; Copyright © 2018, 2019, 2020 Tim Gesthuizen <tim.gesthuizen@yahoo.de> ;;; Copyright © 2019 Jens Mølgaard <jens@zete.tk> ;;; Copyright © 2019,2022 Tanguy Le Carrour <tanguy@bioneland.org> ;;; Copyright © 2020, 2024 Guillaume Le Vaillant <glv@posteo.net> ;;; Copyright © 2020 Brice Waegeneire <brice@waegenei.re> ;;; Copyright © 2020 Jean-Baptiste Note <jean-baptiste.note@m4x.org> ;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de> ;;; Copyright © 2020 Vinicius Monego <monego@posteo.net> ;;; Copyright © 2020 Hartmut Goebel <h.goebel@crazy-compilers.com> ;;; Copyright © 2021 Stefan Reichör <stefan@xsteve.at> ;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz> ;;; Copyright © 2020 Hartmut Goebel <h.goebel@crazy-compilers.com> ;;; Copyright © 2021 David Dashyan <mail@davie.li> ;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com> ;;; Copyright © 2022 Maxime Devos <maximedevos@telenet.be> ;;; Copyright © 2022 ( <paren@disroot.org> ;;; Copyright © 2022 Nicolas Graves <ngraves@ngraves.fr> ;;; Copyright © 2022 Petr Hodina <phodina@protonmail.com> ;;; Copyright © 2023 Christian Miller <christian.miller@dadoes.de> ;;; Copyright © 2024 John Kehayias <john.kehayias@protonmail.com> ;;; ;;; This file is part of GNU Guix. ;;; ;;; GNU Guix is free software; you can redistribute it and/or modify it ;;; under the terms of the GNU General Public License as published by ;;; the Free Software Foundation; either version 3 of the License, or (at ;;; your option) any later version. ;;; ;;; GNU Guix is distributed in the hope that it will be useful, but ;;; WITHOUT ANY WARRANTY; without even the implied warranty of ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;;; GNU General Public License for more details. ;;; ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. (define-module (gnu packages password-utils) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix utils) #:use-module (guix build-system cmake) #:use-module (guix build-system copy) #:use-module (guix build-system gnu) #:use-module (guix build-system go) #:use-module (guix build-system python) #:use-module (guix build-system qt) #:use-module (guix build-system trivial) #:use-module (guix download) #:use-module (guix gexp) #:use-module (guix git-download) #:use-module (guix packages) #:use-module (guix utils) #:use-module (gnu packages) #:use-module (gnu packages admin) #:use-module (gnu packages aidc) #:use-module (gnu packages authentication) #:use-module (gnu packages autotools) #:use-module (gnu packages base) #:use-module (gnu packages bash) #:use-module (gnu packages check) #:use-module (gnu packages compression) #:use-module (gnu packages crypto) #:use-module (gnu packages cryptsetup) #:use-module (gnu packages curl) #:use-module (gnu packages digest) #:use-module (gnu packages docbook) #:use-module (gnu packages file) #:use-module (gnu packages freedesktop) #:use-module (gnu packages gettext) #:use-module (gnu packages glib) #:use-module (gnu packages gnome) #:use-module (gnu packages gnupg) #:use-module (gnu packages golang) #:use-module (gnu packages golang-build) #:use-module (gnu packages golang-crypto) #:use-module (gnu packages golang-xyz) #:use-module (gnu packages gtk) #:use-module (gnu packages guile) #:use-module (gnu packages kerberos) #:use-module (gnu packages libffi) #:use-module (gnu packages libusb) #:use-module (gnu packages linux) #:use-module (gnu packages man) #:use-module (gnu packages multiprecision) #:use-module (gnu packages ncurses) #:use-module (gnu packages nss) #:use-module (gnu packages opencl) #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) #:use-module (gnu packages protobuf) #:use-module (gnu packages python) #:use-module (gnu packages python-web) #:use-module (gnu packages python-xyz) #:use-module (gnu packages rdesktop) #:use-module (gnu packages readline) #:use-module (gnu packages ruby) #:use-module (gnu packages security-token) #:use-module (gnu packages suckless) #:use-module (gnu packages tcl) #:use-module (gnu packages tls) #:use-module (gnu packages qt) #:use-module (gnu packages version-control) #:use-module (gnu packages web) #:use-module (gnu packages wxwidgets) #:use-module (gnu packages xdisorg) #:use-module (gnu packages xorg) #:use-module (gnu packages xml)) (define-public pwgen (package (name "pwgen") (version "2.08") (source (origin (method url-fetch) (uri (string-append "mirror://sourceforge/pwgen/pwgen/" version "/pwgen-" version ".tar.gz")) (sha256 (base32 "0yy90pqrr2pszzhb5hxjishq9qc7dqd290amiibqx9fm1b9kvc6s")))) (build-system gnu-build-system) (arguments `(#:tests? #f)) ; no test suite (home-page "http://pwgen.sourceforge.net/") (synopsis "Password generator") (description "Pwgen generates passwords which can be easily memorized by a human.") (license license:gpl2))) (define-public keepassxc (package (name "keepassxc") (version "2.7.9") (source (origin (method url-fetch) (uri (string-append "https://github.com/keepassxreboot/keepassxc" "/releases/download/" version "/keepassxc-" version "-src.tar.xz")) (sha256 (base32 "1za6xnwnq68gswz8vh7s5wia1bdhnia11hcb7p3dl3f049gy8i1w")))) (build-system qt-build-system) (arguments (list #:configure-flags #~(append (list "-DWITH_XC_ALL=YES" "-DWITH_XC_UPDATECHECK=NO") #$(if (member (%current-system) (package-transitive-supported-systems ruby-asciidoctor)) #~'() #~(list "-DWITH_XC_DOCS=NO"))) #:phases #~(modify-phases %standard-phases (add-after 'unpack 'record-clipboard-programs (lambda* (#:key inputs #:allow-other-keys) ;; Record the file names of clipboard programs invoked by ;; 'keepassxc-cli clip' and similar. ;; ;; Note: Use 'QString::fromUtf8' rather than 'QStringLiteral' so ;; that the store reference is stored as ASCII instead of ;; UTF-16, which would be invisible to the GC's scanner. (substitute* "src/cli/Utils.cpp" (("QStringLiteral\\(\"xclip\"\\)") (string-append "QString::fromUtf8(\"" (search-input-file inputs "bin/xclip") "\")")) (("QStringLiteral\\(\"wl-copy\"\\)") (string-append "QString::fromUtf8(\"" (search-input-file inputs "bin/wl-copy") "\")"))))) (replace 'check (lambda* (#:key tests? #:allow-other-keys) (when tests? ;; "TestCli::testClip() Compared values are not the same". ;; Actual (((clipboard->text()))): "" ;; Expected (QString("Password")) : "Password" (invoke "ctest" "--exclude-regex" "testcli"))))))) (native-inputs (append (list qttools-5) (if (member (%current-system) (package-transitive-supported-systems ruby-asciidoctor)) (list ruby-asciidoctor) '()))) (inputs (list argon2 botan libgcrypt libsodium ; XC_BROWSER libusb libyubikey ; XC_YUBIKEY libxi libxtst minizip pcsc-lite qrencode qtsvg-5 qtwayland-5 qtx11extras quazip-0 ; XC_KEESHARE readline wl-clipboard ;for 'wl-copy' xclip ;for 'xclip' yubikey-personalization ; XC_YUBIKEY zlib)) (home-page "https://keepassxc.org") (synopsis "Password manager") (description "KeePassXC is a password manager or safe which helps you to manage your passwords in a secure way. You can put all your passwords in one database, which is locked with one master key or a key-file which can be stored on an external storage device. The databases are encrypted using the algorithms AES or Twofish.") (properties '((release-monitoring-url . "https://github.com/keepassxreboot/keepassxc/releases"))) ;; While various parts of the software are licensed under different licenses, ;; the combined work falls under the GPLv3. (license license:gpl3))) (define-public pwsafe (package (name "pwsafe") (version "3.60.0") (home-page "https://www.pwsafe.org/") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/pwsafe/pwsafe") (commit version))) (sha256 (base32 "064y78sqr8h9mq922spi4r13ga0a1j09mfh4kc4pn7j697nl6b5y")) (file-name (git-file-name name version)))) (build-system cmake-build-system) (native-inputs (list gettext-minimal googletest perl zip)) (inputs (list curl file `(,util-linux "lib") libxt libxtst openssl qrencode wxwidgets xerces-c)) (arguments '(#:configure-flags (list "-DNO_GTEST=YES") #:phases (modify-phases %standard-phases (add-after 'unpack 'add-gtest (lambda* (#:key inputs #:allow-other-keys) (chmod "CMakeLists.txt" #o644) (let ((cmake-port (open-file "CMakeLists.txt" "a"))) (display "find_package(GTest) add_subdirectory(src/test)\n" cmake-port) (close cmake-port) #t)))))) (synopsis "Password safe with automatic input and key generation") (description "pwsafe is a password manager originally designed by Bruce Schneier. It offers a simple UI to manage passwords for different services. There are other programs that support the file format on different platforms.") (license license:artistic2.0))) (define-public pwsafe-cli (let ((commit "c49a0541b66647ad04d19ddb351d264054c67759") (revision "0")) (package (name "pwsafe-cli") (version (git-version "0.2.0" revision commit)) (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/nsd20463/pwsafe") (commit commit))) (sha256 (base32 "0ak09r1l7k57m6pdx468hhzvz0szmaq42vyr575fvsjc8rbrp8qq")) (file-name (git-file-name name version)))) (build-system gnu-build-system) (arguments ;; FIXME: skip failing test suite (requires write access to /tmp), ;; patching path does not help somehow. `(#:tests? #f #:phases (modify-phases %standard-phases (replace 'bootstrap (lambda _ (invoke "aclocal") (invoke "autoheader") (invoke "automake" "--add-missing") (invoke "autoconf") #t))))) (native-inputs (list autoconf automake)) (inputs (list libx11 libxmu libxt openssl)) (home-page "https://github.com/nsd20463/pwsafe") (synopsis "CLI password manager") (description "@command{pwsafe} is a command line tool compatible with Counterpane's Passwordsafe.") (license license:gpl2+)))) (define-public otpclient (package (name "otpclient") (version "4.0.2") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/paolostivanin/OTPClient") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "061idzh9sz556nm7ahjrvcbnbmgvgfwmph1lfiy7bcvj1g3rf8cm")))) (build-system cmake-build-system) (arguments (list #:modules `(((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:) (guix build cmake-build-system) (guix build utils)) #:imported-modules `((guix build glib-or-gtk-build-system) ,@%cmake-build-system-modules) #:tests? #f ; No tests #:phases #~(modify-phases %standard-phases (add-after 'unpack 'generate-gdk-pixbuf-loaders-cache-file (assoc-ref glib-or-gtk:%standard-phases 'generate-gdk-pixbuf-loaders-cache-file)) (add-after 'install 'glib-or-gtk-compile-schemas (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-compile-schemas)) (add-after 'glib-or-gtk-compile-schemas 'glib-or-gtk-wrap (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap))))) (inputs (list adwaita-icon-theme libcotp libgcrypt libsecret libzip hicolor-icon-theme gtk+ jansson protobuf protobuf-c qrencode zbar)) (native-inputs (list pkg-config protobuf)) (home-page "https://github.com/paolostivanin/OTPClient") (synopsis "Two-factor authentication client") (description "OTPClient is a GTK+-based @acronym{OTP, One Time Password} client, supporting @acronym{TOTP, Time-based one time passwords} and @acronym{HOTP,HMAC-based one time passwords}.") (license license:gpl3))) (define-public shroud (package (name "shroud") (version "0.1.2") (source (origin (method url-fetch) (uri (string-append "https://files.dthompson.us/shroud/shroud-" version ".tar.gz")) (sha256 (base32 "1l2shrhvcwfzkar9qiwb75nhcqmx25iz55lzmz0c187nbjhqzi9p")))) (build-system gnu-build-system) (native-inputs (list pkg-config)) (arguments `(#:modules ((guix build gnu-build-system) (guix build utils) (ice-9 popen) (ice-9 rdelim)) #:phases (modify-phases %standard-phases (add-after 'install 'wrap-shroud (lambda* (#:key inputs outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) (guile (assoc-ref inputs "guile")) (effective (read-line (open-pipe* OPEN_READ (string-append guile "/bin/guile") "-c" "(display (effective-version))"))) (ccachedir (string-append out "/lib/guile/" effective "/site-ccache")) (prog (string-append out "/bin/shroud"))) (wrap-program prog `("GUILE_LOAD_COMPILED_PATH" ":" prefix (,ccachedir))))))))) (inputs (list bash-minimal guile-2.2 gnupg xclip)) (synopsis "GnuPG-based secret manager") (description "Shroud is a simple secret manager with a command line interface. The password database is stored as a Scheme s-expression and encrypted with a GnuPG key. Secrets consist of an arbitrary number of key/value pairs, making Shroud suitable for more than just password storage. For copying and pasting secrets into web browsers and other graphical applications, there is xclip integration." ) (home-page "https://dthompson.us/projects/shroud.html") (license license:gpl3+))) (define-public ssh-to-age (package (name "ssh-to-age") (version "1.1.7") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/Mic92/ssh-to-age") (commit version))) (file-name (git-file-name name version)) (sha256 (base32 "134gpbalyll238wvj9ci0rascgm4csayz863ci99cy5qq8266wrl")))) (build-system go-build-system) (arguments '(#:import-path "github.com/Mic92/ssh-to-age/cmd/ssh-to-age" #:unpack-path "github.com/Mic92/ssh-to-age")) (inputs (list go-golang-org-x-crypto go-filippo-io-edwards25519 go-filippo-io-age)) (home-page "https://github.com/Mic92/ssh-to-age") (synopsis "Convert SSH @code{ed25519} keys to @code{age} keys") (description "This package provides a simple command-line tool to convert SSH @code{ed25519} keys to @code{age} keys.") (license license:expat))) (define-public yapet (package (name "yapet") (version "2.6") (source (origin (method url-fetch) (uri (string-append "https://yapet.guengel.ch/downloads/yapet-" version ".tar.xz")) (sha256 (base32 "00k38n5vlxl73m11pp1v50fqf702lv86hzwgj0qca6qxqz4i3jjl")))) (build-system gnu-build-system) (arguments `(#:configure-flags (list (string-append "--docdir=" (assoc-ref %outputs "out") "/share/doc/" ,name "-" ,version)))) (inputs (list argon2 ncurses openssl)) (native-inputs (list cppunit pkg-config)) (synopsis "Yet Another Password Encryption Tool") (description "YAPET is a text based password manager using the Blowfish encryption algorithm. Because of its small footprint and very few library dependencies, it is suited for installing on desktop and server systems alike. The text based user interface allows you to run YAPET easily in a Secure Shell session. Two companion utilities enable users to convert CSV files to YAPET and vice versa.") (home-page "https://yapet.guengel.ch/") (license license:gpl3+))) (define-public cracklib (package (name "cracklib") (version "2.9.8") (source (origin (method url-fetch) (uri (string-append "https://github.com/cracklib/cracklib/" "releases/download/v" version "/" "cracklib-" version ".tar.bz2")) (sha256 (base32 "11p3f0yqg9d32g3n1qik7jfyl2l14pf8i8vzq3bpram3bqw3978z")))) (build-system gnu-build-system) (arguments `(#:phases (modify-phases %standard-phases (add-after 'install 'install-dict (lambda* (#:key make-flags #:allow-other-keys) (begin (chmod (string-append "util/cracklib-format") #o755) (apply invoke "make" "dict" make-flags) #t)))))) (synopsis "Password checking library") (home-page "https://github.com/cracklib/cracklib") (description "CrackLib is a library containing a C function which may be used in a @command{passwd}-like program. The idea is simple: try to prevent users from choosing passwords that could easily be guessed (or \"cracked\") by filtering them out, at the source.") (license license:lgpl2.1))) (define-public libpwquality (package (name "libpwquality") (version "1.4.4") (source (origin (method url-fetch) (uri (list (string-append "https://github.com/libpwquality/libpwquality" "/releases/download/libpwquality-" version "/libpwquality-" version ".tar.bz2") (string-append "https://launchpad.net/libpwquality/trunk/" version "/+download/" "libpwquality-" version ".tar.bz2"))) (sha256 (base32 "0id5a8bi8xnjg11g9vzrl2xbpx65mfxclxcvis7zx1v8vhisyfyl")))) (build-system gnu-build-system) (arguments `(#:phases (modify-phases %standard-phases (add-before 'configure 'set-LDFLAGS (lambda* (#:key inputs outputs #:allow-other-keys) (setenv "LDFLAGS" (string-append "-Wl,-rpath=" (assoc-ref outputs "out") "/lib")) #t))))) (native-inputs `(("python" ,python-wrapper))) (inputs (list cracklib)) (synopsis "Password quality checker") (home-page "https://github.com/libpwquality/libpwquality") (description "Libpwquality is a library for password quality checking and generation of random passwords that pass the checks.") (license license:gpl2+))) (define-public passwdqc (package (name "passwdqc") (version "2.0.3") (source (origin (method url-fetch) (uri (string-append "https://www.openwall.com/passwdqc/passwdqc" "-" version ".tar.gz")) (sha256 (base32 "1x4c92b3i5wmxh2111lynyndalpkryvan4wybqchd7rn96yg9c2k")))) (build-system gnu-build-system) (arguments (list #:tests? #f ; no tests provided #:make-flags #~(list (string-a