Crate generic_ecies

Crate generic_ecies 

Source
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§

EncryptedMessage
Represents a parsed message. To convert to and from platform independent wire bytes use EncryptedMessage::from_bytes and EncryptedMessage::to_bytes
PrivateKey
Private key is a scalar of the elliptic curve in the chosen suite.
PublicKey
Public key is a point on the elliptic curve of the chosen suite.

Enums§

DecError
Error when encrypting message
DeserializeError
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