v1

latestOpenAPI 3.0.0Apache 2.0 License2026-07-1415176206.9 KB

Verifies a Message Authentication Code (MAC).

You can use this operation to verify MAC for message data authentication such as . In this operation, you must use the same message data, secret encryption key and MAC algorithm that was used to generate MAC. You can use this operation to verify a DUPKT, CMAC, HMAC or EMV MAC by setting generation attributes and algorithm to the associated values.

For information about valid keys for this operation, see Understanding key attributes and Key types for specific data operations in the Amazon Web Services Payment Cryptography User Guide.

Cross-account use: This operation supports cross-account use when the key has a resource-based policy that grants access. For more information, see Resource-based policies.

Related operations:

  • GenerateMac
post/mac/verify

Request body

KeyIdentifierstring required

The <code>keyARN</code> of the encryption key that Amazon Web Services Payment Cryptography uses to verify MAC data.

MessageDatastring password required

The data on for which MAC is under verification. This value must be hexBinary.

Macstring password required

The MAC being verified.

MacLengthinteger

The length of the MAC.

Response

Success

KeyArnstring required

The <code>keyARN</code> of the encryption key that Amazon Web Services Payment Cryptography uses for MAC verification.

KeyCheckValuestring required
<p>The key check value (KCV) of the encryption key. The KCV is used to check if all parties holding a given key have the same key or to detect that a key has changed.</p> <p>Amazon Web Services Payment Cryptography computes the KCV according to the CMAC specification.</p>