HMAC Verify

This MotoHawk™ block is part of the Cryptography Blockset and allows to verify an HMAC (Hash-based Message Authentication Code) signature.

Block ID

HMAC Verify

Library

motohawk_crypto_lib

Description

This MotoHawk™ block is part of the Cryptography Blockset and allows to verify an HMAC (Hash-based Message Authentication Code) signature. The signature is verified against the provided data using a reference to a defined key (Crypto Key Definition) and the selected hashing algorithm.

For the verification to be valid, the provided data, key value, and hash algorithm must match those used to generate (HMAC Sign) the signature.

Input Ports

Plain[N] (uint8)

An array of data based on which the HMAC signature is to be verified. The length (N) of the array must match the value passed in the 'Length' port.

Length (uint32)

The length of the data array passed to the 'Plain' port. By default, there is no limit on the length of the data used to the HMAC related operations.

HMAC[L] (uint8)

An array containing the verified HMAC value. The expected length (L) of the signature depends on the selected hashing algorithm.

Hash algorithm HMAC expected length (bytes)
SHA_120
SHA2_22428
SHA2_25632
SHA2_38448
SHA2_51264
SHA2_512_22428
SHA2_512_25632
SHA3_22428
SHA3_25632
SHA3_38448
SHA3_51264

Output Ports

Status (boolean)

Indicates whether the signature verification process was successful: true if the HMAC was verified successfully; otherwise false.

Failure may occur for several reasons:

Block Parameters

Parameter Field Values Comments/Description
Reference Key Name Single quote enclosed c-legal alpha-numeric text The name of the associated Crypto Key Definition of the 'HMAC' type.
Hash Algorithm Dropdown The hashing algorithm used to verify the HMAC signature.