Crate tink_hybrid

Crate tink_hybrid 

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

subtle
This module provides subtle implementations of hybrid encryption primitives.

Structs§

EciesAeadHkdfDemHelper
Generator for tink_core::Aead or tink_core::DeterministicAead primitives for the specified tink_proto::KeyTemplate and key material.

Constants§

ECIES_AEAD_HKDF_PRIVATE_KEY_KEY_VERSION
Maximal version of ECIES-AEAD-HKDF private keys.
ECIES_AEAD_HKDF_PRIVATE_KEY_TYPE_URL
Type URL of ECIES-AEAD-HKDF private keys that Tink supports.
ECIES_AEAD_HKDF_PUBLIC_KEY_KEY_VERSION
Maximal version of ECIES-AEAD-HKDF public keys.
ECIES_AEAD_HKDF_PUBLIC_KEY_TYPE_URL
Type URL of ECIES-AEAD-HKDF public keys that Tink supports.
UPSTREAM_VERSION
The upstream Tink version that this Rust port is based on.

Functions§

ecies_hkdf_aes128_ctr_hmac_sha256_key_templateaead
Return a KeyTemplate that generates an ECDH P-256 and decapsulation key AES128-CTR-HMAC-SHA256 with the following parameters:
ecies_hkdf_aes128_gcm_key_templateaead
Return a KeyTemplate that generates an ECDH P-256 and decapsulation key AES128-GCM key with the following parameters:
init
Initialize the tink-hybrid crate, registering its primitives so they are available via Tink.
new_decrypt
Returns a tink_core::HybridDecrypt primitive from the given keyset handle.
new_encrypt
Returns a tink_core::HybridEncrypt primitive from the given keyset handle.