pub struct BlindedPublicKey<K: KeyPair> {
pub inner: K::PublicKey,
pub blinding_factor: K::PublicKey,
}Expand description
An ECDH public key that has been blinded, enabling a third party to send a message without knowing the cryptographic identity of the recipient.
Fields§
§inner: K::PublicKeyThe blinded public key that can be used to perform a normal Diffie-Hellman key agreement.
blinding_factor: K::PublicKeyBlinding factor used to create the blinded public key.
Carrying this piece of information is necessary because we want a third party to be able to share a secret of its choosing with the party controlling the secret key of the blinded public key.
Trait Implementations§
Source§impl<C: CurveArithmetic + PointCompression> Blinded for BlindedPublicKey<EllipticCurve<C>>where
<C as Curve>::FieldBytesSize: ModulusSize,
<C as CurveArithmetic>::AffinePoint: ToEncodedPoint<C> + FromEncodedPoint<C>,
impl<C: CurveArithmetic + PointCompression> Blinded for BlindedPublicKey<EllipticCurve<C>>where
<C as Curve>::FieldBytesSize: ModulusSize,
<C as CurveArithmetic>::AffinePoint: ToEncodedPoint<C> + FromEncodedPoint<C>,
Source§type BytesArray = [u8; 66]
type BytesArray = [u8; 66]
A bytes array type with the size of the serialized
BlindedPublicKey.Source§fn from_bytes(bytes: &Self::BytesArray) -> Result<Self, Error>
fn from_bytes(bytes: &Self::BytesArray) -> Result<Self, Error>
Parse a
BlindedPublicKey from a BytesArray.Source§impl Blinded for BlindedPublicKey<X25519>
impl Blinded for BlindedPublicKey<X25519>
Source§type BytesArray = [u8; 64]
type BytesArray = [u8; 64]
A bytes array type with the size of the serialized
BlindedPublicKey.Source§fn from_bytes(bytes: &Self::BytesArray) -> Result<Self, Error>
fn from_bytes(bytes: &Self::BytesArray) -> Result<Self, Error>
Parse a
BlindedPublicKey from a BytesArray.Source§fn to_bytes(&self) -> Self::BytesArray
fn to_bytes(&self) -> Self::BytesArray
Serialize
BlindedPublicKey to a BytesArray.Source§impl<K: Clone + KeyPair> Clone for BlindedPublicKey<K>
impl<K: Clone + KeyPair> Clone for BlindedPublicKey<K>
Source§fn clone(&self) -> BlindedPublicKey<K>
fn clone(&self) -> BlindedPublicKey<K>
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 moreAuto Trait Implementations§
impl<K> Freeze for BlindedPublicKey<K>
impl<K> RefUnwindSafe for BlindedPublicKey<K>
impl<K> Send for BlindedPublicKey<K>
impl<K> Sync for BlindedPublicKey<K>
impl<K> Unpin for BlindedPublicKey<K>
impl<K> UnwindSafe for BlindedPublicKey<K>
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