pub enum PublicKey {
Rsa(Vec<u8>),
Ecc {
x: Vec<u8>,
y: Vec<u8>,
},
}Expand description
Container for public key values
§Details
This object can be serialized and deserialized
using serde if the serde feature is enabled.
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<C> TryFrom<&PublicKey> for PublicKey<C>where
C: CurveArithmetic + AssociatedTpmCurve,
FieldBytesSize<C>: ModulusSize,
AffinePoint<C>: FromEncodedPoint<C> + ToEncodedPoint<C>,
impl<C> TryFrom<&PublicKey> for PublicKey<C>where
C: CurveArithmetic + AssociatedTpmCurve,
FieldBytesSize<C>: ModulusSize,
AffinePoint<C>: FromEncodedPoint<C> + ToEncodedPoint<C>,
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 UnsafeUnpin 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