Expand description

Implementations of the HybridEncrypt and HybridDecrypt primitives.

The functionality of Hybrid Encryption is represented as a pair of primitives (interfaces):

  • HybridEncrypt for encryption of data
  • HybridDecrypt for decryption of data

Implementations of these interfaces are secure against adaptive chosen ciphertext attacks. In addition to plaintext the encryption takes an extra parameter contextInfo, which usually is public data implicit from the context, but should be bound to the resulting ciphertext, i.e. the ciphertext allows for checking the integrity of context_info (but there are no guarantees wrt. the secrecy or authenticity of context_info).

Modules

This module provides subtle implementations of hybrid encryption primitives.

Structs

Generator for tink_core::Aead or tink_core::DeterministicAead primitives for the specified tink_proto::KeyTemplate and key material. in order to implement the subtle::EciesAeadHkdfDemHelper interface.

Constants

Maximal version of ECIES-AEAD-HKDF private keys.

Type URL of ECIES-AEAD-HKDF private keys that Tink supports.

Maximal version of ECIES-AEAD-HKDF public keys.

Type URL of ECIES-AEAD-HKDF public keys that Tink supports.

The upstream Tink version that this Rust port is based on.

Functions

Return a KeyTemplate that generates an ECDH P-256 and decapsulation key AES128-CTR-HMAC-SHA256 with the following parameters:

Return a KeyTemplate that generates an ECDH P-256 and decapsulation key AES128-GCM key with the following parameters:

Initialize the tink-hybrid crate, registering its primitives so they are available via Tink.

Returns a tink_core::HybridDecrypt primitive from the given keyset handle.

Returns a tink_core::HybridEncrypt primitive from the given keyset handle.