pub struct PublicKey(pub(crate) MontgomeryPoint);Expand description
A PublicKey is a point on Curve448.
Tuple Fields§
§0: MontgomeryPointImplementations§
Source§impl PublicKey
impl PublicKey
Sourcepub fn from_bytes(bytes: &[u8]) -> Option<PublicKey>
pub fn from_bytes(bytes: &[u8]) -> Option<PublicKey>
Converts a bytes slice into a Public key Returns None if:
- The length of the slice is not 56
- The point is a low order point
Sourcepub fn from_bytes_unchecked(bytes: &[u8]) -> Option<PublicKey>
pub fn from_bytes_unchecked(bytes: &[u8]) -> Option<PublicKey>
Converts a bytes slice into a Public key Returns None if:
- The length of the slice is not 56
Trait Implementations§
Source§impl From<&EphemeralSecret> for PublicKey
Given an EphemeralSecret Key, compute the corresponding public key
using the generator specified in RFC7748
impl From<&EphemeralSecret> for PublicKey
Given an EphemeralSecret Key, compute the corresponding public key
using the generator specified in RFC7748
Source§fn from(secret: &EphemeralSecret) -> PublicKey
fn from(secret: &EphemeralSecret) -> PublicKey
Converts to this type from the input type.
Source§impl From<&StaticSecret> for PublicKey
Available on crate feature static_secrets only.
impl From<&StaticSecret> for PublicKey
Available on crate feature
static_secrets only.Source§fn from(secret: &StaticSecret) -> PublicKey
fn from(secret: &StaticSecret) -> PublicKey
Given an x448 StaticSecret key, compute its corresponding PublicKey.
impl Copy 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 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