pub enum RsaImportFormat {
Standard,
StandardWithModulus,
Crt,
CrtWithModulus,
}Expand description
The RSA private-key import format a card accepts, taken from byte 5 of its
algorithm-attributes object (C1/C2/C3; OpenPGP Card spec v3.4 §4.4.3.10).
The card dictates this — the host must send the matching component set or the card rejects the import. (GnuPG reads the same byte and branches on it.)
Variants§
Standard
0x00 — standard: e, p, q only (card recomputes the rest).
StandardWithModulus
0x01 — standard plus the modulus n.
Crt
0x02 — CRT: e, p, q, u, dp, dq.
CrtWithModulus
0x03 — CRT plus the modulus n.
Implementations§
Source§impl RsaImportFormat
impl RsaImportFormat
Sourcepub const fn from_attr_byte(b: u8) -> Option<Self>
pub const fn from_attr_byte(b: u8) -> Option<Self>
Decode the import-format byte (byte 5 of the RSA algorithm attributes).
Sourcepub const fn includes_crt(self) -> bool
pub const fn includes_crt(self) -> bool
Whether this format carries the CRT components u, dp, dq.
Sourcepub const fn includes_modulus(self) -> bool
pub const fn includes_modulus(self) -> bool
Whether this format carries the modulus n (tag 97).
Trait Implementations§
Source§impl Clone for RsaImportFormat
impl Clone for RsaImportFormat
Source§fn clone(&self) -> RsaImportFormat
fn clone(&self) -> RsaImportFormat
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for RsaImportFormat
Source§impl Debug for RsaImportFormat
impl Debug for RsaImportFormat
impl Eq for RsaImportFormat
Source§impl PartialEq for RsaImportFormat
impl PartialEq for RsaImportFormat
Source§fn eq(&self, other: &RsaImportFormat) -> bool
fn eq(&self, other: &RsaImportFormat) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for RsaImportFormat
Auto Trait Implementations§
impl Freeze for RsaImportFormat
impl RefUnwindSafe for RsaImportFormat
impl Send for RsaImportFormat
impl Sync for RsaImportFormat
impl Unpin for RsaImportFormat
impl UnsafeUnpin for RsaImportFormat
impl UnwindSafe for RsaImportFormat
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