Rust implementation of the did:key
method
This crate is intended to provide basic support for did:key
methods. It has no external dependencies and can be compiled for any target.
It was originally designed for use with DIDComm Extension for gRPC, but we recognized it may be useful if this was an independent library.
Supported Key Types
- Ed25519
- X25519
- P256
- BLS12381G1/G2
Usage
To resolve a did formatted URI:
use *;
let key = resolve.unwrap;
Generate new key:
let key = new;
println!;
Sign and verify:
let key = new;
let message = b"message to be signed";
let signature = key.sign;
let valid = key.verify;
assert!;
License
Contributions
...are welcome!