pub struct TpmEccExternalKey { /* private fields */ }Expand description
ECC public key parameters.
Implementations§
Source§impl TpmEccExternalKey
impl TpmEccExternalKey
Sourcepub fn try_new(
curve: TpmEllipticCurve,
unique: TpmsEccPoint,
) -> Result<Self, TpmCryptoError>
pub fn try_new( curve: TpmEllipticCurve, unique: TpmsEccPoint, ) -> Result<Self, TpmCryptoError>
Creates ECC public key parameters after validating the curve and point shape.
§Errors
Returns InvalidEccCurve
when the curve is not supported by this crate’s OpenSSL backend.
Returns InvalidEccPoint
when the affine point coordinate sizes do not match the curve.
Returns Crypto when libcrypto fails.
Sourcepub fn curve(&self) -> TpmEllipticCurve
pub fn curve(&self) -> TpmEllipticCurve
Returns the curve of the ECC key.
Sourcepub fn unique(&self) -> &TpmsEccPoint
pub fn unique(&self) -> &TpmsEccPoint
Returns the unique point of the ECC key.
Trait Implementations§
Source§impl Clone for TpmEccExternalKey
impl Clone for TpmEccExternalKey
Source§impl Debug for TpmEccExternalKey
impl Debug for TpmEccExternalKey
impl Eq for TpmEccExternalKey
Source§impl PartialEq for TpmEccExternalKey
impl PartialEq for TpmEccExternalKey
impl StructuralPartialEq for TpmEccExternalKey
Source§impl TpmExternalKey for TpmEccExternalKey
impl TpmExternalKey for TpmEccExternalKey
Source§type Sensitive = TpmBuffer<tpm2_protocol::::data::Tpm2bEccParameter::{constant#0}>
type Sensitive = TpmBuffer<tpm2_protocol::::data::Tpm2bEccParameter::{constant#0}>
TPM buffer type holding the sensitive private component.
Source§fn from_der(bytes: &[u8]) -> Result<(Self, Self::Sensitive), TpmCryptoError>
fn from_der(bytes: &[u8]) -> Result<(Self, Self::Sensitive), TpmCryptoError>
Parses a DER-encoded private key. Read more
Source§fn to_public(&self, template: &TpmPublicTemplate) -> TpmtPublic
fn to_public(&self, template: &TpmPublicTemplate) -> TpmtPublic
Converts the public key to a
TpmtPublic structure. Populates
objectAttributes nameALg and symmetric fields from the provided
template.Source§fn to_seed(
&self,
name_alg: TpmHash,
) -> Result<(Tpm2bDigest, Tpm2bEncryptedSecret), TpmCryptoError>
fn to_seed( &self, name_alg: TpmHash, ) -> Result<(Tpm2bDigest, Tpm2bEncryptedSecret), TpmCryptoError>
Source§impl TryFrom<&TpmtPublic> for TpmEccExternalKey
impl TryFrom<&TpmtPublic> for TpmEccExternalKey
Source§type Error = TpmCryptoError
type Error = TpmCryptoError
The type returned in the event of a conversion error.
Auto Trait Implementations§
impl Freeze for TpmEccExternalKey
impl RefUnwindSafe for TpmEccExternalKey
impl Send for TpmEccExternalKey
impl Sync for TpmEccExternalKey
impl Unpin for TpmEccExternalKey
impl UnsafeUnpin for TpmEccExternalKey
impl UnwindSafe for TpmEccExternalKey
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