pub struct SecretKey { /* private fields */ }
Expand description
Secret Key
Implementations§
Source§impl SecretKey
impl SecretKey
Sourcepub fn key_gen(ikm: &[u8], key_info: &[u8]) -> Result<Self, BLST_ERROR>
pub fn key_gen(ikm: &[u8], key_info: &[u8]) -> Result<Self, BLST_ERROR>
Deterministically generate a secret key from key material
pub fn key_gen_v3(ikm: &[u8], key_info: &[u8]) -> Result<Self, BLST_ERROR>
pub fn key_gen_v4_5( ikm: &[u8], salt: &[u8], info: &[u8], ) -> Result<Self, BLST_ERROR>
pub fn key_gen_v5( ikm: &[u8], salt: &[u8], info: &[u8], ) -> Result<Self, BLST_ERROR>
pub fn derive_master_eip2333(ikm: &[u8]) -> Result<Self, BLST_ERROR>
pub fn derive_child_eip2333(&self, child_index: u32) -> Self
pub fn sk_to_pk(&self) -> PublicKey
pub fn sign(&self, msg: &[u8], dst: &[u8], aug: &[u8]) -> Signature
pub fn serialize(&self) -> [u8; 32]
pub fn deserialize(sk_in: &[u8]) -> Result<Self, BLST_ERROR>
pub fn to_bytes(&self) -> [u8; 32]
pub fn from_bytes(sk_in: &[u8]) -> Result<Self, BLST_ERROR>
Trait Implementations§
Source§impl<'a> From<&'a SecretKey> for &'a blst_scalar
impl<'a> From<&'a SecretKey> for &'a blst_scalar
Source§impl<'a> TryFrom<&'a blst_scalar> for &'a SecretKey
impl<'a> TryFrom<&'a blst_scalar> for &'a SecretKey
Source§type Error = BLST_ERROR
type Error = BLST_ERROR
The type returned in the event of a conversion error.
Auto Trait Implementations§
impl Freeze for SecretKey
impl RefUnwindSafe for SecretKey
impl Send for SecretKey
impl Sync for SecretKey
impl Unpin for SecretKey
impl UnwindSafe for SecretKey
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