pub struct PublicKey { /* private fields */ }xdsa only.Expand description
PublicKey is an ML-DSA-65 public key paired with an Ed25519 public key for verifying quantum resistant digital signatures.
Implementations§
Source§impl PublicKey
impl PublicKey
Sourcepub fn from_cert_pem(
pem: &str,
signer: PublicKey,
) -> Result<(Self, u64, u64), Box<dyn Error>>
pub fn from_cert_pem( pem: &str, signer: PublicKey, ) -> Result<(Self, u64, u64), Box<dyn Error>>
from_cert_pem parses a public key out of a PEM encoded, authenticated certificate, verifying the signature and returning both the key, and the validity interval.
Sourcepub fn from_cert_der(
der: &[u8],
signer: PublicKey,
) -> Result<(Self, u64, u64), Box<dyn Error>>
pub fn from_cert_der( der: &[u8], signer: PublicKey, ) -> Result<(Self, u64, u64), Box<dyn Error>>
from_cert_der parses a public key out of a DER encoded, authenticated certificate, verifying the signature and returning both the key, and the validity interval.
Sourcepub fn to_cert_pem(
&self,
signer: &SecretKey,
params: &Params<'_>,
) -> Result<String, Box<dyn Error>>
pub fn to_cert_pem( &self, signer: &SecretKey, params: &Params<'_>, ) -> Result<String, Box<dyn Error>>
to_cert_pem generates a PEM encoded X.509 certificate for this public key, signed by an xDSA issuer.
Source§impl PublicKey
impl PublicKey
Sourcepub fn compose(ml_key: PublicKey, ed_key: PublicKey) -> Self
pub fn compose(ml_key: PublicKey, ed_key: PublicKey) -> Self
compose creates a public key from its constituent ML-DSA-65 and Ed25519 public keys.
Sourcepub fn split(self) -> (PublicKey, PublicKey)
pub fn split(self) -> (PublicKey, PublicKey)
split decomposes a public key into its constituent ML-DSA-65 and Ed25519 public keys.
Sourcepub fn from_bytes(bytes: &[u8; 1984]) -> Result<Self, Box<dyn Error>>
pub fn from_bytes(bytes: &[u8; 1984]) -> Result<Self, Box<dyn Error>>
from_bytes converts a 1984-byte array into a public key.
Sourcepub fn from_der(der: &[u8]) -> Result<Self, Box<dyn Error>>
pub fn from_der(der: &[u8]) -> Result<Self, Box<dyn Error>>
from_der parses a DER buffer into a public key.
Sourcepub fn from_pem(pem_str: &str) -> Result<Self, Box<dyn Error>>
pub fn from_pem(pem_str: &str) -> Result<Self, Box<dyn Error>>
from_pem parses a PEM string into a public key.
Sourcepub fn fingerprint(&self) -> Fingerprint
pub fn fingerprint(&self) -> Fingerprint
fingerprint returns a 256bit unique identifier for this key.