Struct p521::ecdsa::VerifyingKey
source · pub struct VerifyingKey(/* private fields */);
Available on crate features
ecdsa-core
and ecdsa
only.Expand description
ECDSA/P-521 verification key (i.e. public key)
Implementations§
source§impl VerifyingKey
impl VerifyingKey
sourcepub fn from_sec1_bytes(bytes: &[u8]) -> Result<Self>
pub fn from_sec1_bytes(bytes: &[u8]) -> Result<Self>
Initialize VerifyingKey
from a SEC1-encoded public key.
sourcepub fn from_affine(affine: AffinePoint) -> Result<Self>
pub fn from_affine(affine: AffinePoint) -> Result<Self>
Initialize VerifyingKey
from an affine point.
Returns an Error
if the given affine point is the additive identity
(a.k.a. point at infinity).
sourcepub fn from_encoded_point(public_key: &EncodedPoint) -> Result<Self>
pub fn from_encoded_point(public_key: &EncodedPoint) -> Result<Self>
Initialize VerifyingKey
from an EncodedPoint
.
sourcepub fn to_encoded_point(&self, compress: bool) -> EncodedPoint
pub fn to_encoded_point(&self, compress: bool) -> EncodedPoint
Serialize this VerifyingKey
as a SEC1 EncodedPoint
, optionally
applying point compression.
sourcepub fn as_affine(&self) -> &AffinePoint
pub fn as_affine(&self) -> &AffinePoint
Borrow the inner AffinePoint
for this public key.
Trait Implementations§
source§impl Clone for VerifyingKey
impl Clone for VerifyingKey
source§fn clone(&self) -> VerifyingKey
fn clone(&self) -> VerifyingKey
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 From<&SigningKey> for VerifyingKey
impl From<&SigningKey> for VerifyingKey
source§fn from(signing_key: &SigningKey) -> VerifyingKey
fn from(signing_key: &SigningKey) -> VerifyingKey
Converts to this type from the input type.
source§impl From<VerifyingKey<NistP521>> for VerifyingKey
impl From<VerifyingKey<NistP521>> for VerifyingKey
source§fn from(inner: VerifyingKey<NistP521>) -> VerifyingKey
fn from(inner: VerifyingKey<NistP521>) -> VerifyingKey
Converts to this type from the input type.
source§impl PrehashVerifier<Signature<NistP521>> for VerifyingKey
impl PrehashVerifier<Signature<NistP521>> for VerifyingKey
Auto Trait Implementations§
impl RefUnwindSafe for VerifyingKey
impl Send for VerifyingKey
impl Sync for VerifyingKey
impl Unpin for VerifyingKey
impl UnwindSafe for VerifyingKey
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