pub struct ExpandedSecretKey {
pub(crate) seed: SecretKey,
pub(crate) scalar: EdwardsScalar,
pub(crate) public_key: VerifyingKey,
pub(crate) hash_prefix: EdwardsScalarBytes,
}Fields§
§seed: SecretKey§scalar: EdwardsScalar§public_key: VerifyingKey§hash_prefix: EdwardsScalarBytesImplementations§
Source§impl ExpandedSecretKey
impl ExpandedSecretKey
pub fn from_seed(seed: &SecretKey) -> Self
Sourcepub fn sign_raw(&self, m: &[u8]) -> Result<InnerSignature, SigningError>
pub fn sign_raw(&self, m: &[u8]) -> Result<InnerSignature, SigningError>
Signs a message.
This is the “Ed448” mode of RFC 8032 (no pre-hashing),
also known as “PureEdDSA on Curve448”. No context is provided;
this is equivalent to sign_ctx() with an empty (zero-length)
context.
Sourcepub fn sign_ctx(
&self,
ctx: &[u8],
m: &[u8],
) -> Result<InnerSignature, SigningError>
pub fn sign_ctx( &self, ctx: &[u8], m: &[u8], ) -> Result<InnerSignature, SigningError>
Signs a message (with context).
This is the “Ed448” mode of RFC 8032 (no pre-hashing), also known as “PureEdDSA on Curve448”. A context string is also provided; it MUST have length at most 255 bytes.
Sourcepub fn sign_prehashed(
&self,
ctx: &[u8],
m: &[u8],
) -> Result<InnerSignature, SigningError>
pub fn sign_prehashed( &self, ctx: &[u8], m: &[u8], ) -> Result<InnerSignature, SigningError>
Signs a pre-hashed message.
This is the “Ed448ph” mode of RFC 8032 (message is pre-hashed),
also known as “HashEdDSA on Curve448”. The hashed message hm
is provided (presumably, that hash value was obtained with
SHAKE256 and an output of 64 bytes; the caller does the hashing
itself). A context string is also provided; it MUST have length
at most 255 bytes.
fn sign_inner( &self, phflag: u8, ctx: &[u8], m: &[u8], ) -> Result<InnerSignature, SigningError>
Trait Implementations§
Source§impl Clone for ExpandedSecretKey
impl Clone for ExpandedSecretKey
Source§fn clone(&self) -> ExpandedSecretKey
fn clone(&self) -> ExpandedSecretKey
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more