Struct tomcrypt::EccKey
[−]
[src]
pub struct EccKey(_);
A private or public elliptic curve key.
Methods
impl EccKey
[src]
fn new(prng: Rng, keysize: c_uint) -> Result<Self>
[src]
Create a new ecc key pair.
Supported key sizes:
keysize | #bits |
---|---|
12 | 112 |
16 | 128 |
20 | 160 |
24 | 192 |
28 | 224 |
32 | 256 |
48 | 384 |
65 | 521 |
fn import(data: &[u8]) -> Result<Self>
[src]
Import a private or public ecc key from the tomcrypt format.
fn export_public(&mut self) -> Result<Vec<u8>>
[src]
Export public ecc key in the tomcrypt format.
fn export_private(&mut self) -> Result<Vec<u8>>
[src]
Export private ecc key in the tomcrypt format.
[src]
Derive a shared secret from a private and a public key.