Hash functions are used in cryptography with digital signatures and for ensuring data integrity.
When used with digital signatures, a publicly available hash function hashes the message and signs the resulting hash value. The party who receives the message can then hash the message and check if the block size is authentic for the given hash value.
Hash functions are also referred to as “message digests” and “one-way encryption functions”. Both terms are appropriate since hash algorithms do not have a key like symmetric and asymmetric algorithms and you can recover neither the length nor the contents of the plaintext message from the ciphertext.
To ensure data integrity, hash functions are used to compute the hash value that corresponds to a particular input. Then, if necessary, you can check if the input data has remained unmodified; you can re-compute the hash value again using the available input and compare it to the original hash value.
The Hash Functions section describes functions that implement the following hash algorithms for streaming messages: MD5 [RFC 1321] , SHA-1, SHA-224, SHA-256, SHA-384, and SHA-512 [FIPS PUB 180-2]. These algorithms are widely used in enterprise applications nowadays.
Subsequent sections describe Generalized Hash Functions for Non-Streaming Messages, which apply hash algorithms to entire (non-streaming) messages, and Mask Generation Functions, whose algorithms are often based on hash computations.
Each of the above algorithms is implemented as a set of primitive functions.
The full list of Intel® Integrated Performance Primitives (Intel® IPP) Hash Primitive Functions is given in Table “One-way Hash Primitive Functions”.
Function Base Name | Operation |
---|---|
Hash Functions | |
MD5GetSize | Gets the size of the IppsMD5State context. |
MD5Init | Initializes user-supplied memory as IppsMD5State context for future use. |
MD5Pack, MD5Unpack | Packs/unpacks the IppsMD5State context into/from a user-defined buffer. |
MD5Duplicate | Copies one IppsMD5State context to another. |
MD5Update | Digests the current input message stream of the specified length. |
MD5Final | Completes computation of the MD5 digest value. |
MD5GetTag | Computes the current MD5 digest value of the processed part of the message. |
SHA1GetSize | Gets the size of the IppsSHA1State context. |
SHA1Init | Initializes user-supplied memory as IppsSHA1State context for future use. |
SHA1Pack, SHA1Unpack | Packs/unpacks the IppsSHA1State context into/from a user-defined buffer. |
SHA1Duplicate | Copies one IppsSHA1State context to another. |
SHA1Update | Digests the current input message stream of the specified length. |
SHA1Final | Completes computation of the SHA-1 digest value. |
SHA1GetTag | Computes the current SHA-1 digest value of the processed part of the message. |
SHA224GetSize | Gets the size of the IppsSHA224State context. |
SHA224Init | Initializes user-supplied memory as IppsSHA224State context for future use. |
SHA224Pack, SHA224Unpack | Packs/unpacks the IppsSHA224State context into/from a user-defined buffer. |
SHA224Duplicate | Copies one IppsSHA224State context to another. |
SHA224Update | Digests the current input message stream of the specified length. |
SHA224Final | Completes computation of the SHA-224 digest value. |
SHA224GetTag | Computes the current SHA-224 digest value of the processed part of the message. |
SHA256GetSize | Gets the size of the IppsSHA256State context. |
SHA256Init | Initializes user-supplied memory as IppsSHA256State context for future use. |
SHA256Pack, SHA256Unpack | Packs/unpacks the IppsSHA256State context into/from a user-defined buffer. |
SHA256Duplicate | Copies one IppsSHA256State context to another. |
SHA256Update | Digests the current input message stream of the specified length. |
SHA256Final | Completes computation of the SHA-256 digest value. |
SHA256GetTag | Computes the current SHA-256 digest value of the processed part of the message. |
SHA384GetSize | Gets the size of the IppsSHA384State context. |
SHA384Init | Initializes user-supplied memory as IppsSHA384State context for future use. |
SHA384Pack, SHA384Unpack | Packs/unpacks the IppsSHA384State context into/from a user-defined buffer. |
SHA384Duplicate | Copies one IppsSHA384State context to another. |
SHA384Update | Digests the current input message stream of the specified length. |
SHA384Final | Completes computation of the SHA-384 digest value. |
SHA384GetTag | Computes the current SHA-384 digest value of the processed part of the message. |
SHA512GetSize | Gets the size of the IppsSHA512State context. |
SHA512Init | Initializes user-supplied memory as IppsSHA512State context for future use. |
SHA512Pack, SHA512Unpack | Packs/unpacks the IppsSHA512State context into/from a user-defined buffer. |
SHA512Duplicate | Copies one IppsSHA512State context to another. |
SHA512Update | Digests the current input message stream of the specified length. |
SHA512Final | Completes computation of the SHA-512 digest value. |
SHA512GetTag | Computes the current SHA-512 digest value of the processed part of the message. |
Generalized Hash Functions for Non-Streaming Messages | |
MD5MessageDigest | Computes MD5 digest value of the input message. |
SHA1MessageDigest | Computes SHA-1 digest value of the input message. |
SHA224MessageDigest | Computes SHA-224 digest value of the input message. |
SHA256MessageDigest | Computes SHA-256 digest value of the input message. |
SHA384MessageDigest | Computes SHA-384 digest value of the input message. |
SHA512MessageDigest | Computes SHA-512 digest value of the input message. |
Mask Generation Functions | |
MGF_MD5 | Generates a pseudorandom mask of the specified length using MD5 hash function. |
MGF_SHA1 | Generates a pseudorandom mask of the specified length using SHA-1 hash function. |
MGF_SHA224 | Generates a pseudorandom mask of the specified length using SHA-224 hash function. |
MGF_SHA256 | Generates a pseudorandom mask of the specified length using SHA-256 hash function. |
MGF_SHA384 | Generates a pseudorandom mask of the specified length using SHA-384 hash function. |
MGF_SHA512 | Generates a pseudorandom mask of the specified length using SHA-512 hash function. |
Copyright © 2000 - 2011, Intel Corporation. All rights reserved.