Expand description
§Zemi Identity
Identity tools that can be used to create credentials without a trusted third party. This library can deterministically produce an asymmetric keypair from user credentials. It also generates a consistent public identity tied to the provided username that cannot easily be used to discover the username.
§Important Exports
§Version 1 (current)
§Example: From Credentials
let identity = Identity::from_credentials("username", "password", "salt", Version::V1)?;
let signature = identity.sign(b"message")?;
let verify_op = identity.verify(b"message", &signature);
assert!(verify_op.is_ok());
§Example: To Public Identity
let identity = Identity::from_credentials("username", "password", "salt", Version::V1)?;
let public = identity.to_public_identity();
let verify_op = public.verify(b"message", &signature);
assert!(verify_op.is_ok());
Structs§
- Identity
- An identity that includes public and private key components. This can be used to both sign and verify.
- Keypair
- An ed25519 keypair.
- Public
Identity - Identity that includes only public components. This can be used to verify, but not sign.
- Public
Key - An ed25519 public key.
- Secret
Key - An EdDSA secret key.
- Signature
- Ed25519 signature.
Enums§
- Error
- Possible errors thrown by methods implemented for Identity and it’s public counterpart.
- Version
- The version of the derivation algorithm that turns credentials into keys.