- GFpECSetPointHash, GFpECSetPointHashBackCompatible, GFpECSetPointHash_rmf, GFpECSetPointHashBackCompatible_rmf
Keyed Hash Functions
The Intel IPP HMAC primitive functions, described in this section, use various HMAC schemes based on one-way hash functions described in One-Way Hash Primitives.
Usage model of the generalized HMAC functions is similar to the model explained below.
Each HMAC scheme is implemented as a set of the primitive functions. Each primitive implementing HMAC uses the HashState context as an operational vehicle to carry all necessary variables to manage computation of the chaining digest value.
The following example illustrates how the application code can apply the implemented HMAC-SHA1 hash standard to digest the input message stream:
Call the function HMAC_GetSize to get the size required to configure the HashState context.
Ensure that the required memory space is properly allocated. With the allocated memory, call the function HMAC_Init with the value of hashAlg equal to ippHashAlg_SHA1 to set up key material and the initial context state with the SHA-1 specified initialization vectors.
Keep calling the function HMAC_Update to digest incoming message stream in the queue till its completion. To determine the current value of the message digest, call HMAC_GetTag between the two calls to HMACUpdate.
Call the function HMAC_Final to pad the partial block into a final SHA-1 message block and transform it into a resulting HMAC value.
- Clean up secret data stored in the context.
Call the operating system memory free service function to release the HashState context.
The HashState context is position-dependent. The HMACPack, HMACUnpack functions transform it to a position-independent form and vice versa:
The crypto community does not consider HMACSHA1 or HMACMD5 secure anymore.
Recommendation: use a more secure hash algorithm (for example, any algorithm from the SHA-2 family) instead of HMACSHA1 or HMACMD5.
Gets the size of the IppsHMACState or IppsHMACState_rmf context.
Initializes user-supplied memory as IppsHMACState or IppsHMACState_rmf context for future use.
- HMAC_Pack, HMAC_Unpack
Packs/unpacks the IppsHMACState or IppsHMACState_rmf context into/from a user-defined buffer.
Copies one IppsHMACState or IppsHMACState_rmf context to another.
Digests the current input message stream of the specified length.
Completes computation of the HMAC value.
Computes the current HMAC value of the processed part of the message.
Computes the HMAC value of an entire message.
Did you find the information on this page useful?