Expand description
ECIES is a scheme for efficient ciphers with asymmetric key using elliptic
curves and symmetric ciphers. This implementation is generic in its
components, thanks to using generic_ec
and RustCrypto
traits. You can
use the ciphersuites defined by us in advance, like
curve25519xsalsa20hmac
and curve25519aes128_cbchmac
, or you can
define your own Suite
.
This implementation is based on SECG SEC-1
You can find examples of usage in the predefined ciphersuites:
curve25519xsalsa20hmac
and curve25519aes128_cbchmac
Modules§
- curve25519aes128_
cbchmac - Instantiation of ECIES with the following parameters:
- curve25519xsalsa20hmac
- Instantiation of ECIES with the following parameters:
Structs§
- Encrypted
Message - Represents a parsed message. To convert to and from platform independent
wire bytes use
EncryptedMessage::from_bytes
andEncryptedMessage::to_bytes
- Private
Key - Private key is a scalar of the elliptic curve in the chosen suite.
- Public
Key - Public key is a point on the elliptic curve of the chosen suite.
Enums§
- DecError
- Error when encrypting message
- Deserialize
Error - Error when deserializing the byte representation of a message
- EncError
- Error when encrypting message
Traits§
- Suite
- A suite of cryptographic protocols to use for ECIES
Functions§
- pad_
size - Amount of bytes padding of this message will take. When using
PublicKey::block_encrypt_in_place
, you will find this function useful to find out how many bytes to append to the buffer so that the padding will fit