pub struct Ecies<K, E, A> { /* private fields */ }
Expand description
Generic ECIES
instance
Implementations§
source§impl<K: Key, E, A> Ecies<K, E, A>
impl<K: Key, E, A> Ecies<K, E, A>
sourcepub fn new<T: IntoPublicKey<K>>(recipient_public_key: T) -> Self
pub fn new<T: IntoPublicKey<K>>(recipient_public_key: T) -> Self
Create a new ECIES<K, E, A>
instance given a recipient_public_key
compatible with K
pub fn try_new<T: TryIntoPublicKey<K>>( recipient_public_key: T ) -> Result<Self, KeyError>
source§impl<K, E, A> Ecies<K, E, A>where
K: EciesMacEncryptionSupport + Key + GenerateEphemeralKey + KeyExchange + DeriveKeyMaterial,
E: EciesMacEncryptionSupport + Encryption + GenerateNonce + TakeEncryptionKey,
A: Mac + TakeMacKey,
impl<K, E, A> Ecies<K, E, A>where K: EciesMacEncryptionSupport + Key + GenerateEphemeralKey + KeyExchange + DeriveKeyMaterial, E: EciesMacEncryptionSupport + Encryption + GenerateNonce + TakeEncryptionKey, A: Mac + TakeMacKey,
source§impl<K, E, A> Ecies<K, E, A>where
K: EciesMacDecryptionSupport + Key + TakeEphemeralKey + KeyExchange + DeriveKeyMaterial,
E: EciesMacDecryptionSupport + Encryption + TakeNonce + TakeEncryptionKey,
A: Mac + TakeMac,
impl<K, E, A> Ecies<K, E, A>where K: EciesMacDecryptionSupport + Key + TakeEphemeralKey + KeyExchange + DeriveKeyMaterial, E: EciesMacDecryptionSupport + Encryption + TakeNonce + TakeEncryptionKey, A: Mac + TakeMac,
sourcepub fn decrypt<T: IntoSecretKeyRef<K>>(
recipient_secret_key: &T,
ciphertext: &[u8]
) -> Result<Vec<u8>, EciesError>
pub fn decrypt<T: IntoSecretKeyRef<K>>( recipient_secret_key: &T, ciphertext: &[u8] ) -> Result<Vec<u8>, EciesError>
Decrypt ciphertext
using the ECIES-MAC
variant, given the recipient_secret_key
it was
encrypted for
source§impl<K, E> Ecies<K, E, Aead>where
K: EciesAeadEncryptionSupport + Key + GenerateEphemeralKey + KeyExchange + DeriveKeyMaterial,
E: EciesAeadEncryptionSupport + Encryption + GenerateNonce + TakeEncryptionKey,
impl<K, E> Ecies<K, E, Aead>where K: EciesAeadEncryptionSupport + Key + GenerateEphemeralKey + KeyExchange + DeriveKeyMaterial, E: EciesAeadEncryptionSupport + Encryption + GenerateNonce + TakeEncryptionKey,
source§impl<K, E> Ecies<K, E, Aead>where
K: EciesAeadDecryptionSupport + Key + TakeEphemeralKey + KeyExchange + DeriveKeyMaterial,
E: EciesAeadDecryptionSupport + Encryption + TakeNonce + TakeEncryptionKey,
impl<K, E> Ecies<K, E, Aead>where K: EciesAeadDecryptionSupport + Key + TakeEphemeralKey + KeyExchange + DeriveKeyMaterial, E: EciesAeadDecryptionSupport + Encryption + TakeNonce + TakeEncryptionKey,
sourcepub fn decrypt<T: IntoSecretKeyRef<K>>(
recipient_secret_key: &T,
ciphertext: &[u8]
) -> Result<Vec<u8>, EciesError>
pub fn decrypt<T: IntoSecretKeyRef<K>>( recipient_secret_key: &T, ciphertext: &[u8] ) -> Result<Vec<u8>, EciesError>
Decrypt ciphertext
using the ECIES-AEAD
variant, given the recipient_secret_key
it was
encrypted for
source§impl<K, E> Ecies<K, E, Syn>where
K: EciesSynEncryptionSupport + Key + GenerateEphemeralKey + KeyExchange + DeriveKeyMaterial,
E: EciesSynEncryptionSupport + Encryption + TakeNonce + TakeEncryptionKey,
impl<K, E> Ecies<K, E, Syn>where K: EciesSynEncryptionSupport + Key + GenerateEphemeralKey + KeyExchange + DeriveKeyMaterial, E: EciesSynEncryptionSupport + Encryption + TakeNonce + TakeEncryptionKey,
source§impl<K, E> Ecies<K, E, Syn>where
K: EciesSynDecryptionSupport + Key + TakeEphemeralKey + KeyExchange + DeriveKeyMaterial,
E: EciesSynDecryptionSupport + Encryption + TakeNonce + TakeEncryptionKey,
impl<K, E> Ecies<K, E, Syn>where K: EciesSynDecryptionSupport + Key + TakeEphemeralKey + KeyExchange + DeriveKeyMaterial, E: EciesSynDecryptionSupport + Encryption + TakeNonce + TakeEncryptionKey,
sourcepub fn decrypt<T: IntoSecretKeyRef<K>>(
recipient_secret_key: &T,
ciphertext: &[u8]
) -> Result<Vec<u8>, EciesError>
pub fn decrypt<T: IntoSecretKeyRef<K>>( recipient_secret_key: &T, ciphertext: &[u8] ) -> Result<Vec<u8>, EciesError>
Decrypt ciphertext
using the ECIES-SYN
variant, given the recipient_secret_key
it was
encrypted for