pub struct DsaPublicKey {
pub p: Mpint,
pub q: Mpint,
pub g: Mpint,
pub y: Mpint,
}
Available on crate feature
alloc
only.Expand description
Digital Signature Algorithm (DSA) public key.
Described in FIPS 186-4 § 4.1.
Fields§
§p: Mpint
Prime modulus.
q: Mpint
Prime divisor of p - 1
.
g: Mpint
Generator of a subgroup of order q
in the multiplicative group
GF(p)
, such that 1 < g < p
.
y: Mpint
The public key, where y = gˣ mod p
.
Trait Implementations§
source§impl Clone for DsaPublicKey
impl Clone for DsaPublicKey
source§fn clone(&self) -> DsaPublicKey
fn clone(&self) -> DsaPublicKey
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for DsaPublicKey
impl Debug for DsaPublicKey
source§impl Decode for DsaPublicKey
impl Decode for DsaPublicKey
source§impl Encode for DsaPublicKey
impl Encode for DsaPublicKey
source§fn encoded_len(&self) -> Result<usize>
fn encoded_len(&self) -> Result<usize>
Get the length of this type encoded in bytes, prior to Base64 encoding.
source§fn encode(&self, writer: &mut impl Writer) -> Result<()>
fn encode(&self, writer: &mut impl Writer) -> Result<()>
Encode this value using the provided
Writer
.source§fn encoded_len_prefixed(&self) -> Result<usize, Error>
fn encoded_len_prefixed(&self) -> Result<usize, Error>
Return the length of this type after encoding when prepended with a
uint32
length prefix.source§fn encode_prefixed(&self, writer: &mut impl Writer) -> Result<(), Error>
fn encode_prefixed(&self, writer: &mut impl Writer) -> Result<(), Error>
Encode this value, first prepending a
uint32
length prefix
set to Encode::encoded_len
.source§impl From<&DsaKeypair> for DsaPublicKey
impl From<&DsaKeypair> for DsaPublicKey
source§fn from(keypair: &DsaKeypair) -> DsaPublicKey
fn from(keypair: &DsaKeypair) -> DsaPublicKey
Converts to this type from the input type.
source§impl From<DsaKeypair> for DsaPublicKey
impl From<DsaKeypair> for DsaPublicKey
source§fn from(keypair: DsaKeypair) -> DsaPublicKey
fn from(keypair: DsaKeypair) -> DsaPublicKey
Converts to this type from the input type.
source§impl From<DsaPublicKey> for KeyData
impl From<DsaPublicKey> for KeyData
source§fn from(public_key: DsaPublicKey) -> KeyData
fn from(public_key: DsaPublicKey) -> KeyData
Converts to this type from the input type.
source§impl From<DsaPublicKey> for PublicKey
impl From<DsaPublicKey> for PublicKey
source§fn from(public_key: DsaPublicKey) -> PublicKey
fn from(public_key: DsaPublicKey) -> PublicKey
Converts to this type from the input type.
source§impl Hash for DsaPublicKey
impl Hash for DsaPublicKey
source§impl Ord for DsaPublicKey
impl Ord for DsaPublicKey
source§fn cmp(&self, other: &DsaPublicKey) -> Ordering
fn cmp(&self, other: &DsaPublicKey) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for DsaPublicKey
impl PartialEq for DsaPublicKey
source§impl PartialOrd for DsaPublicKey
impl PartialOrd for DsaPublicKey
source§impl TryFrom<&DsaPublicKey> for VerifyingKey
Available on crate feature dsa
only.
impl TryFrom<&DsaPublicKey> for VerifyingKey
Available on crate feature
dsa
only.source§fn try_from(key: &DsaPublicKey) -> Result<VerifyingKey>
fn try_from(key: &DsaPublicKey) -> Result<VerifyingKey>
Performs the conversion.
source§impl TryFrom<&VerifyingKey> for DsaPublicKey
Available on crate feature dsa
only.
impl TryFrom<&VerifyingKey> for DsaPublicKey
Available on crate feature
dsa
only.source§fn try_from(key: &VerifyingKey) -> Result<DsaPublicKey>
fn try_from(key: &VerifyingKey) -> Result<DsaPublicKey>
Performs the conversion.
source§impl TryFrom<DsaPublicKey> for VerifyingKey
Available on crate feature dsa
only.
impl TryFrom<DsaPublicKey> for VerifyingKey
Available on crate feature
dsa
only.source§fn try_from(key: DsaPublicKey) -> Result<VerifyingKey>
fn try_from(key: DsaPublicKey) -> Result<VerifyingKey>
Performs the conversion.
source§impl TryFrom<VerifyingKey> for DsaPublicKey
Available on crate feature dsa
only.
impl TryFrom<VerifyingKey> for DsaPublicKey
Available on crate feature
dsa
only.source§fn try_from(key: VerifyingKey) -> Result<DsaPublicKey>
fn try_from(key: VerifyingKey) -> Result<DsaPublicKey>
Performs the conversion.
source§impl Verifier<Signature> for DsaPublicKey
Available on crate feature dsa
only.
impl Verifier<Signature> for DsaPublicKey
Available on crate feature
dsa
only.impl Eq for DsaPublicKey
impl StructuralPartialEq for DsaPublicKey
Auto Trait Implementations§
impl Freeze for DsaPublicKey
impl RefUnwindSafe for DsaPublicKey
impl Send for DsaPublicKey
impl Sync for DsaPublicKey
impl Unpin for DsaPublicKey
impl UnwindSafe for DsaPublicKey
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)