AWS Security ChangesHomeSearch

AWS payment-cryptography: Correct HMAC verify example to use Algorithm=HMAC

Service: payment-cryptography · 2026-11-11 · Documentation low

File: payment-cryptography/latest/userguide/verify-mac.md

Summary

The MAC verification example was updated so the verification-attributes Algorithm is set to HMAC (matching key generation) instead of HMAC_SHA256, and the prose now explains the key's algorithm determines the HMAC variant.

Security assessment

This is an API-usage correction for MAC verification (the algorithm is derived from the key), not a fix for a vulnerability; it improves correctness of cryptographic operations but documents no new security control.

Evidence

+         --verification-attributes Algorithm=HMAC

Diff

diff --git a/payment-cryptography/latest/userguide/verify-mac.md b/payment-cryptography/latest/userguide/verify-mac.md
index a5c7698..5b4502b 100644
--- a//payment-cryptography/latest/userguide/verify-mac.md
+++ b//payment-cryptography/latest/userguide/verify-mac.md
@@ -26 +26 @@ If the value is verified, then response parameter `MacDataVerificationSuccessful
-In this example, we will verify a HMAC (Hash-Based Message Authentication Code) for card data authentication using HMAC algorithm `HMAC_SHA256` and HMAC encryption key. The key must have KeyUsage set to `TR31_M7_HMAC_KEY` and KeyModesOfUse `Verify` set to true. 
+In this example, we will verify a HMAC (Hash-Based Message Authentication Code) for card data authentication using an `HMAC_SHA256` key. The key must have KeyUsage set to `TR31_M7_HMAC_KEY` and KeyModesOfUse `Verify` set to true. As when generating, set `Algorithm` to `HMAC` for a key whose algorithm is an HMAC algorithm. 
@@ -35 +35 @@ In this example, we will verify a HMAC (Hash-Based Message Authentication Code)
-         --verification-attributes Algorithm=HMAC_SHA256
+         --verification-attributes Algorithm=HMAC