pub struct PublicKey(pub [u8; 32]);Expand description
An Ed25519 public key Y = x·B, compressed per RFC 8032 §5.1.2. The same
bytes as the Solana address of the proving keypair.
Tuple Fields§
§0: [u8; 32]Implementations§
Source§impl PublicKey
impl PublicKey
Sourcepub fn validate(&self) -> Result<(), Error>
pub fn validate(&self) -> Result<(), Error>
RFC 9381 §5.3 steps 1–3 with validate_key = TRUE: on the curve and
not small-order, so the output is unique even for an adversarial key.
One validate_point syscall (159 CU) plus a seven-entry table lookup.
verify already covers this; use it when registering keys up front.
Trait Implementations§
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