pub enum CurveType {
Ed25519,
P256,
}Expand description
Supported elliptic curve types for identity and signing operations.
P-256 is the default for all operations (identity keys, ephemeral CI keys). Ed25519 is available for compatibility with existing KERI deployments.
Usage:
ⓘ
let curve = CurveType::P256; // default
let (seed, pubkey) = provider.generate_keypair(curve).await?;Variants§
Ed25519
Ed25519 (RFC 8032). 32-byte keys, 64-byte signatures.
P256
ECDSA P-256 / secp256r1. 33-byte compressed keys, 64-byte r||s signatures. Default for all operations.
Implementations§
Source§impl CurveType
impl CurveType
Sourcepub fn public_key_len(&self) -> usize
pub fn public_key_len(&self) -> usize
Returns the expected public key length for this curve.
Sourcepub fn signature_len(&self) -> usize
pub fn signature_len(&self) -> usize
Returns the expected signature length for this curve.
Trait Implementations§
impl Copy for CurveType
Source§impl<'de> Deserialize<'de> for CurveType
impl<'de> Deserialize<'de> for CurveType
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for CurveType
impl StructuralPartialEq for CurveType
Auto Trait Implementations§
impl Freeze for CurveType
impl RefUnwindSafe for CurveType
impl Send for CurveType
impl Sync for CurveType
impl Unpin for CurveType
impl UnsafeUnpin for CurveType
impl UnwindSafe for CurveType
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.