[−][src]Struct nettle::dsa::Params
Public parameters for DSA signatures.
DSA uses the ring Z/pqZ (p,q are primes) and a generator g
of that group.
Implementations
impl Params
[src]
pub fn new(p: &[u8], q: &[u8], g: &[u8]) -> Params
[src]
Create a new DSA parameter structure with primes p
and q
and generator g
.
pub fn generate<R: Random>(
random: &mut R,
p_bits: usize,
q_bits: usize
) -> Result<Params>
[src]
random: &mut R,
p_bits: usize,
q_bits: usize
) -> Result<Params>
Generates a fresh set of parameters.
p_bits
and q_bits
are the size of the primes. FIPS-186 expects q_bits = 160
and p_bits = 512 + 64l
for l = [0-8]
. The Nettle documentation recommends 1024.
pub fn primes(&self) -> (Box<[u8]>, Box<[u8]>)
[src]
Returns the primes p
and q
ad big endian integers.
pub fn g(&self) -> Box<[u8]>
[src]
Returns the generator g
as big endian integer.
Trait Implementations
impl Clone for Params
[src]
fn clone(&self) -> Self
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Drop for Params
[src]
Auto Trait Implementations
impl RefUnwindSafe for Params
impl !Send for Params
impl !Sync for Params
impl Unpin for Params
impl UnwindSafe for Params
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,