From 50150573bd1d6f05e818cc3706cfba3fe9ed490a Mon Sep 17 00:00:00 2001 From: thaidn Date: Thu, 30 Apr 2020 16:04:57 -0700 Subject: [PATCH] Fixing a typo in KMS Envelope AEAD. Updating list of primitives supported in each language. PiperOrigin-RevId: 309317968 --- docs/PRIMITIVES.md | 31 +++++++++++++++++--------- python/tink/aead/_kms_envelope_aead.py | 2 +- 2 files changed, 22 insertions(+), 11 deletions(-) diff --git a/docs/PRIMITIVES.md b/docs/PRIMITIVES.md index ba0ea91d4a..13a1b82d5f 100644 --- a/docs/PRIMITIVES.md +++ b/docs/PRIMITIVES.md @@ -26,16 +26,16 @@ describe the main properties of Tink primitives. ### Primitives supported by language -**Primitive** | **Java** | **C++** | **ObjC** | **Go** ------------------- | -------- | ------- | -------- | ------ -AEAD | yes | yes | yes | yes -Streaming AEAD | yes | yes | no | no -Deterministic AEAD | yes | yes | yes | yes -MAC | yes | yes | yes | yes -Digital signatures | yes | yes | yes | yes -Hybrid encryption | yes | yes | yes | yes +**Primitive** | **Java** | **C++** | **ObjC** | **Go** | **Python** +------------------ | -------- | ------- | -------- | ------ | ---------- +AEAD | yes | yes | yes | yes | yes +Streaming AEAD | yes | yes | no | yes | no +Deterministic AEAD | yes | yes | yes | yes | yes +MAC | yes | yes | yes | yes | yes +Digital signatures | yes | yes | yes | yes | yes +Hybrid encryption | yes | yes | yes | yes | yes -JavaScript and Python are currently under development. +JavaScript is currently under development. ### Primitive implementations supported by languege @@ -54,7 +54,7 @@ Hybrid Encryption | ECIES with AEAD and HKDF Primitive | C++ Implementations ------------------ | ----------------------------------------------------------------------------- -AEAD | AES-GCM, AES-GCM-SIV, AES-CTR-HMAC, AES-EAX, KMS Envelope, XCHACHA20-POLY1305 +AEAD | AES-GCM, AES-GCM-SIV, AES-CTR-HMAC, AES-EAX, KMS Envelope, CHACHA20-POLY1305, XCHACHA20-POLY1305 Streaming AEAD | AES-GCM-HKDF-STREAMING, AES-CTR-HMAC-STREAMING Deterministic AEAD | AES-SIV MAC | HMAC-SHA2, AES-CMAC @@ -76,11 +76,22 @@ Hybrid Encryption | ECIES with AEAD and HKDF Primitive | Go Implementations ------------------ | ------------------------------------------------------------------------ AEAD | AES-GCM, AES-CTR-HMAC, KMS Envelope, CHACHA20-POLY1305, XCHACHA-POLY1305 +Streaming AEAD | AES-GCM-HKDF-STREAMING Deterministic AEAD | AES-SIV MAC | HMAC-SHA2, AES-CMAC Digital Signatures | ECDSA over NIST curves, Ed25519 Hybrid Encryption | ECIES with AEAD and HKDF +#### Python + +Primitive | Python Implementations +------------------ | ----------------------------------------------------------------------------- +AEAD | AES-GCM, AES-CTR-HMAC, AES-EAX, KMS Envelope, CHACHA20-POLY1305, XCHACHA20-POLY1305 +Deterministic AEAD | AES-SIV +MAC | HMAC-SHA2 +Digital Signatures | ECDSA over NIST curves, Ed25519, RSA-SSA-PKCS1, RSA-SSA-PSS +Hybrid Encryption | ECIES with AEAD and HKDF + --- ## General properties of all primitives diff --git a/python/tink/aead/_kms_envelope_aead.py b/python/tink/aead/_kms_envelope_aead.py index 1573aa196b..b22d51359e 100644 --- a/python/tink/aead/_kms_envelope_aead.py +++ b/python/tink/aead/_kms_envelope_aead.py @@ -85,7 +85,7 @@ def decrypt(self, ciphertext: bytes, associated_data: bytes) -> bytes: dek = tink_pb2.KeyData() dek.type_url = self.key_template.type_url dek.value = dek_bytes - dek.key_material_type = tink_pb2.KeyData.KeyMaterialType.SYMMETRIC + dek.key_material_type = tink_pb2.KeyData.SYMMETRIC dek_aead = core.Registry.primitive(dek, _aead.Aead) # Extract ciphertext payload and decrypt