From e8312e7b7d07cf2e916a36e01b31a05860e18eee Mon Sep 17 00:00:00 2001 From: Ryan Scott Date: Tue, 23 Apr 2024 15:04:24 -0400 Subject: [PATCH] Document preconditions, postconditions, and limitations of AES-GCM proofs --- README.md | 1 + SPEC.md | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/README.md b/README.md index ae66e364..934aa395 100644 --- a/README.md +++ b/README.md @@ -40,6 +40,7 @@ AWS libcrypto includes many cryptographic algorithm implementations for several | [SHA-2](SPEC.md#SHA-2) | 384 | EVP_DigestInit, EVP_DigestUpdate, EVP_DigestFinal | neoverse-n1, neoverse-v1 | NoEngine, MemCorrect, ArmSpecGap, ToolGap | SAW, NSym | | [HMAC](SPEC.md#HMAC-with-SHA-384) | with SHA-384 | HMAC_CTX_init, HMAC_Init_ex, HMAC_Update, HMAC_Final, HMAC | SandyBridge+ | NoEngine, MemCorrect, InitZero, NoInline, CRYPTO_once_Correct | SAW | | [AES-KW(P)](SPEC.md#AES-KWP) | 256 | AES_wrap_key, AES_unwrap_key, AES_wrap_key_padded, AES_unwrap_key_padded | SandyBridge+ | InputLength, MemCorrect, NoInline | SAW | +| [AES-GCM](SPEC.md#AES-GCM) | 256 | gcm_ghash_avx, aes_hw_ctr32_encrypt_blocks, aesni_gcm_encrypt, aesni_gcm_decrypt | SandyBridge+ | MemCorrect, NoInline | SAW | | [Elliptic Curve Keys and Parameters](SPEC.md#Elliptic-Curve-Keys-and-Parameters) | with P-384 | EVP_PKEY_CTX_new_id, EVP_PKEY_CTX_new, EVP_PKEY_paramgen_init, EVP_PKEY_CTX_set_ec_paramgen_curve_nid, EVP_PKEY_paramgen, EVP_PKEY_keygen_init, EVP_PKEY_keygen | SandyBridge+ | SAWCore_Coq, EC_Fiat_Crypto, ToolGap, NoEngine, MemCorrect, CRYPTO_refcount_Correct, CRYPTO_once_Correct, OptNone, SAWBreakpoint | SAW, Coq | | [ECDSA](SPEC.md#ECDSA) | with P-384, SHA-384 | EVP_DigestSignInit, EVP_DigestVerifyInit, EVP_DigestSignUpdate, EVP_DigestVerifyUpdate, EVP_DigestSignFinal, EVP_DigestVerifyFinal, EVP_DigestSign, EVP_DigestVerify | SandyBridge+ | EC_Pub_Mul_Correct, EC_Constants_Correct, EC_Conversion_Correct, SAWCore_Coq, EC_Fiat_Crypto, NoEngine, MemCorrect, ECDSA_k_Valid, ECDSA_SignatureLength, CRYPTO_refcount_Correct, CRYPTO_once_Correct, ERR_put_error_Correct, NoInline | SAW, Coq | | [ECDH](SPEC.md#ECDH) | with P-384 | EVP_PKEY_derive_init, EVP_PKEY_derive | SandyBridge+ | SAWCore_Coq, EC_Fiat_Crypto, ECDH_InfinityTestCorrect, ToolGap, MemCorrect, NoEngine, CRYPTO_refcount_Correct, PubKeyValid | SAW, Coq | diff --git a/SPEC.md b/SPEC.md index 4543c6de..893b3b27 100644 --- a/SPEC.md +++ b/SPEC.md @@ -35,6 +35,17 @@ The AES_(un)wrap_key_* functions are verified to have the following properties r | AES_wrap_key_padded | | | | AES_unwrap_key_padded | | | +## AES-GCM + +These functions are verified to have the following properties related to AES-GCM using AES-256. These functions are defined in [NIST SP 800-38D](https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-38d.pdf). For more detailed specifications, see [AES-GCM.saw](SAW/proof/AES/AES-GCM.saw). + +| Function | Preconditions | Postconditions | +| ---------------| -------------| --------------- | +| gcm_ghash_avx | | | +| aes_hw_ctr32_encrypt_blocks | | | +| aesni_gcm_encrypt | | | +| aesni_gcm_decrypt | | | + ## Elliptic Curve Keys and Parameters The EVP_PKEY_* functions are verified to have the following properties related to EC using P-384. For more detailed specifications, see [evp-function-specs.saw](SAW/proof/ECDH/evp-function-specs.saw).