Skip to main content

P384

Struct P384 

Source
pub struct P384;
Expand description

The P-384 curve.

Trait Implementations§

Source§

impl Clone for P384

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for P384

Source§

impl Curve for P384

Source§

const B: Fp

b = 0xb3312fa7e23ee7e4988e056be3f82d19181d9c6efe8141120314088f5013875a c656398d8a2ed19d2a85c8edd3ec2aef

Source§

fn sqrt(x: &Fp) -> Fp

p = 3 mod 4, so a square root is x^((p+1)/4).

Source§

const NAME: &'static str = "P-384"

Display name, e.g. "P-256".
Source§

const FIELD_BYTES: usize = 48

Width of an encoded field element.
Source§

const SCALAR_BYTES: usize = 48

Width of an encoded scalar.
Source§

const ORDER_BITS: usize = 384

Bit length of the group order, qlen in RFC 6979. Read more
Source§

const GX: Fp

The base point x-coordinate.
Source§

const GY: Fp

The base point y-coordinate.
Source§

type Field = Fp

The coordinate field, GF(p).
Source§

type Scalar = Fn

The scalar ring, Z/nZ.
Source§

fn field_from_slice(bytes: &[u8]) -> Option<Fp>

Decode a field element from exactly Self::FIELD_BYTES bytes.
Source§

fn scalar_from_slice(bytes: &[u8]) -> Option<Fn>

Decode a scalar from exactly Self::SCALAR_BYTES bytes, rejecting a non-canonical encoding.
Source§

fn scalar_reduce_slice(bytes: &[u8]) -> Fn

Decode a scalar, reducing rather than rejecting. Read more
Source§

impl Debug for P384

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl EcdsaCurve for P384

Source§

const SIGNATURE_ID: &'static str = "ecdsa-p384-sha384"

The ontology identifier of this signature scheme.
Source§

type Digest = Sha384

The message digest, at the curve’s security level.
Source§

type Hmac = Hmac<Sha384>

HMAC over the same digest, for RFC 6979.
Source§

impl HasGeneratorTable for P384

Source§

fn mul_generator(scalar: &<Self as Curve>::Scalar) -> Point<Self>

scalar * G.

Auto Trait Implementations§

§

impl Freeze for P384

§

impl RefUnwindSafe for P384

§

impl Send for P384

§

impl Sync for P384

§

impl Unpin for P384

§

impl UnsafeUnpin for P384

§

impl UnwindSafe for P384

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.