https://github.com/matt-raffel-kiva/didgen
Simple tool for generating DID and VERKEY pairs
https://github.com/matt-raffel-kiva/didgen
aries-agents aries-framework cryptography encryption-algorithms hyperledger hyperledger-aries hyperledger-indy indy-node indy-sdk rust rust-lang
Last synced: 10 days ago
JSON representation
Simple tool for generating DID and VERKEY pairs
- Host: GitHub
- URL: https://github.com/matt-raffel-kiva/didgen
- Owner: matt-raffel-kiva
- License: apache-2.0
- Created: 2020-12-14T22:55:59.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2025-05-16T17:07:55.000Z (about 1 year ago)
- Last Synced: 2025-12-25T17:39:27.950Z (5 months ago)
- Topics: aries-agents, aries-framework, cryptography, encryption-algorithms, hyperledger, hyperledger-aries, hyperledger-indy, indy-node, indy-sdk, rust, rust-lang
- Language: Rust
- Homepage:
- Size: 15.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# didgen
Command line tool to generate did, verkey pairs.
Intended to follow the [specification](https://www.w3.org/TR/did-1.0/) but probably needs work.
## Building
Install rust. Built using `1.54.0`. Pull the code.
At the root of project, `cargo build`.
### Note
You need to have libsodium installed or built on your system.
## Command Line arguments
`--seed` (optional), specify the cryptographic seed for generating did and verkey. Must be 32 bytes
## Output
note: verkey is also public key. Keeping name to match [indy](https://github.com/hyperledger/indy-sdk) naming. TODO: change to public key.
```
With no arguments used
```
mattraffel@kiva-mattr:~/src/mine/didgen/target/debug$ ./didgen
did -> SR2GQxr47phoUVwajdsuyS
verkey -> ErPjftNvwrYVTjjYo7tD21uLxMhQR8udgz1QzR2WQsvj
pk -> xt19s1sp2UZCGhy9rNyb1FtxdKiDGZZX6hUkC4k8nWJKfZGbRrEG19tDjmCAKCaJLA26BN6gvZxikJFYGaqX95d
```
and with arguments, the output is the same
```
mattraffel@kiva-mattr:~/src/mine/didgen/target/debug$ ./didgen --seed=00000000000000000000000Squidward
did -> SR2GQxr47phoUVwajdsuyS
verkey -> ErPjftNvwrYVTjjYo7tD21uLxMhQR8udgz1QzR2WQsvj
pk -> xt19s1sp2UZCGhy9rNyb1FtxdKiDGZZX6hUkC4k8nWJKfZGbRrEG19tDjmCAKCaJLA26BN6gvZxikJFYGaqX95d
```
and if you run using cargo, pass command line arguments like this
```
mattraffel@kiva-mattr:~/src/mine/didgen$ cargo run -- --seed=00000000000000000000000Squidward
Compiling didgen v0.1.0 (/Users/mattraffel/src/mine/didgen)
Finished dev [unoptimized + debuginfo] target(s) in 1.72s
Running `target/debug/didgen --seed=00000000000000000000000Squidward`
did -> SR2GQxr47phoUVwajdsuyS
verkey -> ErPjftNvwrYVTjjYo7tD21uLxMhQR8udgz1QzR2WQsvj
pk -> xt19s1sp2UZCGhy9rNyb1FtxdKiDGZZX6hUkC4k8nWJKfZGbRrEG19tDjmCAKCaJLA26BN6gvZxikJFYGaqX95d
```