6 ms·
Show HN: Creds – manage API keys with GPG on the command line
- yoo1I 11y agoThis seems to be the same functionality that pass[0] offers. [0] https://www.passwordstore.org/ https://www.passwordstore.org/
- mrkidd 11y agopass doesn't have a command to directly source contents of a stored password into shell variables. But it would be great to bring that functionality from this tool into pass.
- irickt 11y agoAlso consider https://github.com/StackExchange/blackbox https://github.com/StackExchange/blackbox
- vdfs 11y agoSimilar tool that use asymmetric GPG encryption: https://github.com/boussouira/bash-pass https://github.com/boussouira/bash-pass
- m6w6 11y agoNice, must have been a fun project! I'm not sure, though, whether it adds enough distinct functionality to warrant a project? Lazy version: $ encfs $HOME/Dropbox/creds $HOME/.creds $ cat >~/bin/creds <<<'EOF' #!/bin/sh $CREDS=$HOME/.creds/$2.sh case "$1" in add|edit) $EDITOR $CREDS [ -f $CREDS ] && chmod +x $CREDS ;; list) echo $HOME/.creds/*.sh \ | xargs -I '{}' -n1 basename {} .sh \ | less -SRFX ;; esac EOF $ chmod +x ~/bin/creds EDIT: lessen <pre> width
- JoelJacobson 11y agoI wish there was an alternative to GPG or at least some bare-minimum implementation with a decent API. The only "libraries" are wrappers on top of the gpg executable. Maybe there is an alternative that I don't know of?
- m6w6 11y agoLibrary? Do you mean something like gpgme? https://www.gnupg.org/documentation/manuals/gpgme/ https://www.gnupg.org/documentation/manuals/gpgme/
- tristor 11y agoGPGME is a wrapper on top of the GPG executable. It also has a horrendous API. I'm still currently fighting with it just to simply encrypt/decrypt a tarball going to S3. It's really badly designed.
- JoelJacobson 11y agoI know exactly what you are going though. Don't look at the source code of GPG, it will give you nightmares.
- JoelJacobson 11y agoGPGME is still just a wrapper around the gpg exeutable and the source code is 961 kB (!). It's not a real "library".
- phunge 11y agoYeah this is a common complaint. I don't have direct experience with NaCL/libsodium or Keyczar but check them out. Do you mean a bitstream-compatible thing, or a GPG/PGP alternative?
- iheartmemcache 11y agolibsodium is pretty GPG compatible. Diffie-Hellman key exchange function[X25519]: int crypto_scalarmult(unsigned char q, const unsigned char n, const unsigned char p); crypto_secretbox_easy() for both encrypting + signing in the traditional public-key fashion. AES-256-GCM is there for symmetric sessions. Even OTP's are supported. I don't think there's the full PKI/WoT implementation in there, at the moment, but it's definitely sufficient to do most of the heavy lifting. (N.b. the documentation is only like 70 pages long, read the relevant sections on: sodium_memzero(), sodium_mlock(), the notes on VMs, the notes if you have swapon, the notes on disabling coredumps, don't use malloc, use sodium_malloc() (and with that, the appropriate padding precautions should be taken if you use sodium_allocarray()), and source your entropy properly. All of this is covered in the API guide. Consult it, because I'm likely misremembering one or two things.)
- bunkydoo 11y agoDopesauce. I always welcome a new command line tool - it's the most effective place to do things.