pub struct Secp256r1;Available on crate feature
secp256r1 only.Trait Implementations§
Source§impl StealthAddressOnCurve for Secp256r1
impl StealthAddressOnCurve for Secp256r1
Source§type Projective = Projective<Config>
type Projective = Projective<Config>
The projective representation of the elliptic curve point.
Source§fn derive_public_key(
private_key: &<<<Self as StealthAddressOnCurve>::Projective as CurveGroup>::Affine as AffineRepr>::ScalarField,
) -> Self::Projective
fn derive_public_key( private_key: &<<<Self as StealthAddressOnCurve>::Projective as CurveGroup>::Affine as AffineRepr>::ScalarField, ) -> Self::Projective
Derives a public key from a given private key. Read more
Source§fn random_keypair() -> (<<<Self as StealthAddressOnCurve>::Projective as CurveGroup>::Affine as AffineRepr>::ScalarField, Self::Projective)
fn random_keypair() -> (<<<Self as StealthAddressOnCurve>::Projective as CurveGroup>::Affine as AffineRepr>::ScalarField, Self::Projective)
Generates a random keypair. Read more
Source§fn generate_random_fr() -> <<<Self as StealthAddressOnCurve>::Projective as CurveGroup>::Affine as AffineRepr>::ScalarField
fn generate_random_fr() -> <<<Self as StealthAddressOnCurve>::Projective as CurveGroup>::Affine as AffineRepr>::ScalarField
Generates a random scalar field element. Read more
Source§fn hash_to_fr(
input: &[u8],
) -> <<<Self as StealthAddressOnCurve>::Projective as CurveGroup>::Affine as AffineRepr>::ScalarFieldwhere
<<<Self as StealthAddressOnCurve>::Projective as CurveGroup>::Affine as AffineRepr>::ScalarField: HasViewTag,
fn hash_to_fr(
input: &[u8],
) -> <<<Self as StealthAddressOnCurve>::Projective as CurveGroup>::Affine as AffineRepr>::ScalarFieldwhere
<<<Self as StealthAddressOnCurve>::Projective as CurveGroup>::Affine as AffineRepr>::ScalarField: HasViewTag,
Hashes an input byte slice to a scalar field element. Read more
Computes a shared elliptic curve point given a private key and a public key. Read more
Source§fn generate_stealth_address(
viewing_public_key: Self::Projective,
spending_public_key: Self::Projective,
ephemeral_private_key: <<<Self as StealthAddressOnCurve>::Projective as CurveGroup>::Affine as AffineRepr>::ScalarField,
) -> (Self::Projective, u64)where
<<<Self as StealthAddressOnCurve>::Projective as CurveGroup>::Affine as AffineRepr>::ScalarField: HasViewTag,
fn generate_stealth_address(
viewing_public_key: Self::Projective,
spending_public_key: Self::Projective,
ephemeral_private_key: <<<Self as StealthAddressOnCurve>::Projective as CurveGroup>::Affine as AffineRepr>::ScalarField,
) -> (Self::Projective, u64)where
<<<Self as StealthAddressOnCurve>::Projective as CurveGroup>::Affine as AffineRepr>::ScalarField: HasViewTag,
Generates a stealth address. Read more
Source§fn generate_stealth_private_key(
ephemeral_public_key: Self::Projective,
viewing_key: <<<Self as StealthAddressOnCurve>::Projective as CurveGroup>::Affine as AffineRepr>::ScalarField,
spending_key: <<<Self as StealthAddressOnCurve>::Projective as CurveGroup>::Affine as AffineRepr>::ScalarField,
expected_view_tag: u64,
) -> Option<<<<Self as StealthAddressOnCurve>::Projective as CurveGroup>::Affine as AffineRepr>::ScalarField>where
<<<Self as StealthAddressOnCurve>::Projective as CurveGroup>::Affine as AffineRepr>::ScalarField: HasViewTag,
fn generate_stealth_private_key(
ephemeral_public_key: Self::Projective,
viewing_key: <<<Self as StealthAddressOnCurve>::Projective as CurveGroup>::Affine as AffineRepr>::ScalarField,
spending_key: <<<Self as StealthAddressOnCurve>::Projective as CurveGroup>::Affine as AffineRepr>::ScalarField,
expected_view_tag: u64,
) -> Option<<<<Self as StealthAddressOnCurve>::Projective as CurveGroup>::Affine as AffineRepr>::ScalarField>where
<<<Self as StealthAddressOnCurve>::Projective as CurveGroup>::Affine as AffineRepr>::ScalarField: HasViewTag,
Generates a stealth private key. Read more
Auto Trait Implementations§
impl Freeze for Secp256r1
impl RefUnwindSafe for Secp256r1
impl Send for Secp256r1
impl Sync for Secp256r1
impl Unpin for Secp256r1
impl UnwindSafe for Secp256r1
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more