Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/awakesecurity/gen-ed25-keypair
Ed25519 key generation, message signing, and signature verification CLI tools
https://github.com/awakesecurity/gen-ed25-keypair
command-line crypto ed25519 haskell
Last synced: about 8 hours ago
JSON representation
Ed25519 key generation, message signing, and signature verification CLI tools
- Host: GitHub
- URL: https://github.com/awakesecurity/gen-ed25-keypair
- Owner: awakesecurity
- License: apache-2.0
- Created: 2017-05-10T21:59:28.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2021-10-05T18:19:14.000Z (over 3 years ago)
- Last Synced: 2023-08-19T20:21:15.367Z (over 1 year ago)
- Topics: command-line, crypto, ed25519, haskell
- Language: Haskell
- Homepage:
- Size: 19.5 KB
- Stars: 4
- Watchers: 19
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Welcome!
This is a small Haskell CLI utility and library for generating an Ed25519
keypair, signing and verifying messages with an Ed25519 keypair.## Example Usage
```shell
$ gen-ed25-keypair --help
Generate a base64 encoded, Ed25519 keypairUsage: gen-ed25-keypair [--secretKey FILEPATH] [--publicKey FILEPATH]
Available options:
-h,--help Show this help text
--secretKey FILEPATH Filepath to write the secret key to, if not provided,
key will be written to the current working dir
--publicKey FILEPATH Filepath to write the public key to, if not provided,
key will be written to the current working dir
```The keypair is generated using `getRandomBytes` from [Cryptonite.Random](https://hackage.haskell.org/package/cryptonite-0.22/docs/Crypto-Random.html) and the keys are base64 encoded.
Another convenience utility is also provided for signing messages with a generated keypair and verifying message signatures:
```shell
$ sign-ed25 --help
Sign a message with a Ed25519 keypairUsage: sign-ed25 --secretKey FILEPATH --publicKey FILEPATH --msg TEXT
Available options:
-h,--help Show this help text
--secretKey FILEPATH Path to the secret key
--publicKey FILEPATH Path to the public key
--msg TEXT Message to sign
```Another tool can be used to verify the signature:
```shell
$ verify-ed25 --help
Verify a message signature with an Ed25519 public keyUsage: verify-ed25 --publickey PublicKey --sig Signature --msg TEXT
Available options:
-h,--help Show this help text
--publickey PublicKey Public key to verify a message signature
--sig Signature Message signature to verify
--msg TEXT Message to verify signature
``````shell
$ verify-ed25 --publickey 'zoOk/5Fpnbdu3DJ4V0/dGzde+xjdDD2L+WQkJpxOALQ=' --msg 'lorem ipsum dolor set, balbalbalbalbalbalbal' --sig 'vqiIWLc+ZXyjUg10CWXv2VAI1Q25mcUl4GpXpJYlOBU9oWc832AbYtizXnalpqlAVqmRJxLETXIa7zxEQJzADg=='
True
```