[−]Struct recrypt::api_480::Recrypt480
Recrypt public API - 480-bit
If you are looking better performance, you might consider the 256-bit API in api.rs
Implementations
impl Recrypt480<Sha256, Ed25519, RandomBytes<DefaultRng>>
pub fn new() -> Recrypt480<Sha256, Ed25519, RandomBytes<DefaultRng>>
Construct a new Recrypt480 with pre-selected CSPRNG implementation.
The RNG will periodically reseed itself from the system's best entropy source.
impl<CR: CryptoRng + RngCore> Recrypt480<Sha256, Ed25519, RandomBytes<CR>>
pub fn new_with_rand(r: CR) -> Recrypt480<Sha256, Ed25519, RandomBytes<CR>>
Construct a Recrypt480 with the given RNG. Unless you have specific needs using new()
is recommended.
Trait Implementations
impl<R: RandomBytesGen, H: Sha256Hashing, S: Ed25519Signing> CryptoOps for Recrypt480<H, S, R>
pub fn gen_plaintext(&self) -> Plaintext
pub fn derive_symmetric_key(
&self,
decrypted_value: &Plaintext
) -> DerivedSymmetricKey
&self,
decrypted_value: &Plaintext
) -> DerivedSymmetricKey
pub fn derive_private_key(&self, plaintext: &Plaintext) -> PrivateKey
pub fn encrypt(
&self,
plaintext: &Plaintext,
to_public_key: &PublicKey,
signing_keypair: &SigningKeypair
) -> Result<EncryptedValue, RecryptErr>
&self,
plaintext: &Plaintext,
to_public_key: &PublicKey,
signing_keypair: &SigningKeypair
) -> Result<EncryptedValue, RecryptErr>
pub fn decrypt(
&self,
encrypted_value: EncryptedValue,
private_key: &PrivateKey
) -> Result<Plaintext, RecryptErr>
&self,
encrypted_value: EncryptedValue,
private_key: &PrivateKey
) -> Result<Plaintext, RecryptErr>
pub fn transform(
&self,
encrypted_value: EncryptedValue,
transform_key: TransformKey,
signing_keypair: &SigningKeypair
) -> Result<EncryptedValue, RecryptErr>
&self,
encrypted_value: EncryptedValue,
transform_key: TransformKey,
signing_keypair: &SigningKeypair
) -> Result<EncryptedValue, RecryptErr>
impl<H: Debug, S: Debug, R: Debug> Debug for Recrypt480<H, S, R>
impl Default for Recrypt480<Sha256, Ed25519, RandomBytes<DefaultRng>>
pub fn default() -> Self
impl<H, S, CR: RngCore + CryptoRng> Ed25519Ops for Recrypt480<H, S, RandomBytes<CR>>
pub fn generate_ed25519_key_pair(&self) -> SigningKeypair
Generate a signing key pair for use with the Ed25519Signing
trait using the random number generator
used to back the RandomBytes
struct.
impl<R: RandomBytesGen, H: Sha256Hashing, S: Ed25519Signing> KeyGenOps for Recrypt480<H, S, R>
pub fn compute_public_key(
&self,
private_key: &PrivateKey
) -> Result<PublicKey, RecryptErr>
&self,
private_key: &PrivateKey
) -> Result<PublicKey, RecryptErr>
pub fn random_private_key(&self) -> PrivateKey
pub fn generate_key_pair(&self) -> Result<(PrivateKey, PublicKey), RecryptErr>
pub fn generate_transform_key(
&self,
from_private_key: &PrivateKey,
to_public_key: &PublicKey,
signing_keypair: &SigningKeypair
) -> Result<TransformKey, RecryptErr>
&self,
from_private_key: &PrivateKey,
to_public_key: &PublicKey,
signing_keypair: &SigningKeypair
) -> Result<TransformKey, RecryptErr>
impl<H: Sha256Hashing, S, CR: RngCore + CryptoRng> SchnorrOps for Recrypt480<H, S, RandomBytes<CR>>
pub fn schnorr_sign<A: Hashable>(
&self,
priv_key: &PrivateKey,
pub_key: &PublicKey,
message: &A
) -> SchnorrSignature
&self,
priv_key: &PrivateKey,
pub_key: &PublicKey,
message: &A
) -> SchnorrSignature
pub fn schnorr_verify<A: Hashable>(
&self,
pub_key: &PublicKey,
augmenting_priv_key: Option<&PrivateKey>,
message: &A,
signature: SchnorrSignature
) -> bool
&self,
pub_key: &PublicKey,
augmenting_priv_key: Option<&PrivateKey>,
message: &A,
signature: SchnorrSignature
) -> bool
Auto Trait Implementations
impl<H, S, R> RefUnwindSafe for Recrypt480<H, S, R> where
H: RefUnwindSafe,
R: RefUnwindSafe,
S: RefUnwindSafe,
H: RefUnwindSafe,
R: RefUnwindSafe,
S: RefUnwindSafe,
impl<H, S, R> Send for Recrypt480<H, S, R> where
H: Send,
R: Send,
S: Send,
H: Send,
R: Send,
S: Send,
impl<H, S, R> Sync for Recrypt480<H, S, R> where
H: Sync,
R: Sync,
S: Sync,
H: Sync,
R: Sync,
S: Sync,
impl<H, S, R> Unpin for Recrypt480<H, S, R> where
H: Unpin,
R: Unpin,
S: Unpin,
H: Unpin,
R: Unpin,
S: Unpin,
impl<H, S, R> UnwindSafe for Recrypt480<H, S, R> where
H: UnwindSafe,
R: UnwindSafe,
S: UnwindSafe,
H: UnwindSafe,
R: UnwindSafe,
S: UnwindSafe,
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,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Clear for T where
T: InitializableFromZeroed + ?Sized,
[src]
T: InitializableFromZeroed + ?Sized,
impl<T> From<T> for T
[src]
impl<T> InitializableFromZeroed for T where
T: Default,
[src]
T: Default,
pub unsafe fn initialize(place: *mut T)
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
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.
pub 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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,