pub enum PublicKey {
Rsa(Vec<u8>),
Ecc {
x: Vec<u8>,
y: Vec<u8>,
},
}
Expand description
Container for public key values
Variants§
Rsa(Vec<u8>)
RSA public modulus (see 27.5.3.4 in the Architecture spec)
This is the value extracted from the unique
part of TPMT_PUBLIC
.
The exponent is not included here as the expectation is that the
exponent is always pinned to 65537 (2^16 + 1).
The modulus is in Big-Endian format.
Ecc
Public elliptic curve point (see 27.5.3.5 in the Architecture spec)
The x and y coordinates are given uncompressed.
Trait Implementations§
source§impl<'de> Deserialize<'de> for PublicKey
impl<'de> Deserialize<'de> for PublicKey
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
source§impl PartialEq for PublicKey
impl PartialEq for PublicKey
impl Eq for PublicKey
impl StructuralPartialEq for PublicKey
Auto Trait Implementations§
impl Freeze for PublicKey
impl RefUnwindSafe for PublicKey
impl Send for PublicKey
impl Sync for PublicKey
impl Unpin for PublicKey
impl UnwindSafe for PublicKey
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