# US 10,313,129 B2 · Keyed-hash message authentication code processors, methods, systems, and instructions

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 10,313,129 B2
- Document ID: US10313129B2
- Status: Granted
- Kind: B2
- Application number: 14/751,881
- Filed: 2015-06-26
- Published: 2016-12-29
- Granted: 2019-06-04
- Earliest claimed: 2015-06-26
- Assignees: Intel Corporation
- Applicants: Intel Corporation
- Inventors: Vinodh Gopal; Jason W. Brandt
- Web page: https://patentgrep.com/patent/US10313129B2

## CPC

- H04L 9/3242: {involving keyed hash functions, e.g. message authentication codes [MACs], CBC-MAC or HMAC}
- G06F 9/30007: {to perform operations on data operands}
- G06F 9/30036: {Instructions to perform operations on packed data, e.g. vector, tile or matrix operations}
- G06F 9/30038: {using a mask}
- G06F 21/64: Protecting data integrity, e.g. using checksums, certificates or signatures
- G09C 1/00: Apparatus or methods whereby a given sequence of signs, e.g. an intelligible text, is transformed into an unintelligible sequence of signs by transposing the signs or groups of signs or by replacing them by others according to a predetermined system (cryptographic typewriters G09C3/00)
- H04L 9/0643: {Hash functions, e.g. MD5, SHA, HMAC or f9 MAC}
- H04L 2209/04: Masking or blinding
- H04L 2209/12: Details relating to cryptographic hardware or logic circuitry
- H04L 2209/125: Parallelization or pipelining, e.g. for accelerating processing of cryptographic operations
- H04L 2209/16: Obfuscation or hiding, e.g. involving white box
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G09C: CIPHERING OR DECIPHERING APPARATUS FOR CRYPTOGRAPHIC OR OTHER PURPOSES INVOLVING THE NEED FOR SECRECY

## Abstract

A processor of an aspect includes a decode unit to decode a keyed-hash message authentication code instruction. The keyed-hash message authentication code instruction is to indicate a message, to indicate at least one value that is to represent at least one of key information and key indication information, and to indicate a destination storage location. An execution unit is coupled with the decode unit. The execution unit, in response to the keyed-hash message authentication code instruction, is to store a message authentication code corresponding to the message in the destination storage location. The message authentication code is to be consistent with a keyed-hash message authentication code algorithm that is to use a cryptographic hash algorithm. The message authentication code is to be based on a cryptographic key associated with the at least one value. Other processors, methods, systems, and instructions are disclosed.

## Claims

### Claim 1

A processor comprising:
a register file including a plurality of packed data registers;
a decode unit on a die to decode a keyed-hash message authentication code (MAC) with obfuscated key information instruction of an instruction set of the processor that is to correspond to a keyed-hash MAC algorithm that is to include a cryptographic hash algorithm, the keyed-hash MAC with obfuscated key information instruction having an opcode, to indicate a message, to indicate obfuscated key information, and having a field to specify a destination packed data register of the plurality of packed data registers in the register file, wherein the keyed-hash MAC with obfuscated key information instruction is at least one of a macroinstruction and a machine code instruction; and
an execution unit on the die and coupled with the decode unit, the execution unit including a cryptographic hash unit to perform the cryptographic hash algorithm, the execution unit, in response to the decode of the keyed-hash MAC with obfuscated key information instruction, to perform the keyed-hash MAC with obfuscated key information instruction to generate and store a message authentication code (MAC) corresponding to the indicated message in the destination packed data register of the plurality of packed data registers in the register file.

### Claim 2 (depends on 1)

The processor of claim 1, wherein the processor is a general-purpose processor, and wherein the decode unit is to decode the keyed-hash MAC with obfuscated key information instruction that is to indicate the obfuscated key information from which a cryptographic key, on which the MAC is to be based, cannot be derived without a secret of the processor that is accessible to the execution unit but that is not readable by software.

### Claim 3 (depends on 1)

The processor of claim 1, wherein the cryptographic hash algorithm is to be one of MD5, SHA-1, SHA-2, and RIPEMD, and wherein the execution unit, in response to the decode of the keyed-hash MAC with obfuscated key information instruction, is to store the MAC which cannot be derived from the message using the obfuscated key information without a secret that is accessible to the execution unit but that is protected within the processor and not readable by software.

### Claim 4 (depends on 1)

The processor of claim 1, wherein the decode unit is to decode the keyed-hash MAC with obfuscated key information instruction that is to indicate the obfuscated key information which is to include an encryption of key information, wherein the execution unit is to use the key information to generate the MAC.

### Claim 5 (depends on 4)

The processor of claim 4, wherein the processor is a general-purpose processor, wherein the cryptographic hash algorithm is to be one of MD5, SHA-1, SHA-2, and RIPEMD, and wherein the encryption of the key information is to include an encryption of a cryptographic key.

### Claim 6 (depends on 4)

The processor of claim 4, wherein the cryptographic hash algorithm is to be one of MD5, SHA-1, SHA-2, and RIPEMD, wherein the encryption of the key information is to include an encryption of at least one evaluation of a portion of the keyed-hash MAC algorithm that is to involve a cryptographic key.

### Claim 7 (depends on 6)

The processor of claim 6, wherein the encryption of the evaluation of the portion of the keyed-hash MAC algorithm that is to involve the cryptographic key is to include at least one of:
an encryption of an evaluation of the cryptographic hash algorithm with both an initial state of the keyed-hash MAC algorithm and an exclusive OR (XOR) of the cryptographic key and an inner pad value; and
an encryption of an evaluation of the cryptographic hash algorithm with both the initial state of the keyed-hash MAC algorithm and an exclusive OR of the cryptographic key and an outer pad value.

### Claim 8 (depends on 4)

The processor of claim 4, wherein the processor is a general-purpose processor, further comprising a secret key that is accessible to the execution unit but that is not readable by software, and wherein the execution unit includes a decryption unit that in response to the decode of the keyed-hash MAC with obfuscated key information instruction is to use the secret key to decrypt the encryption of the key information.

### Claim 9 (depends on 1)

The processor of claim 1, wherein the decode unit is to decode the keyed-hash MAC with obfuscated key information instruction that is to indicate the obfuscated key information that is to include a key information indication value.

### Claim 10 (depends on 9)

The processor of claim 9, wherein the key information indication value is to be one of a key information index, a key information number, and a key information identifier.

### Claim 11 (depends on 1)

The processor of claim 1, wherein the cryptographic hash algorithm is to be one of MD5, SHA-1, SHA-2, and RIPEMD, and wherein the decode unit is to decode the keyed-hash MAC with obfuscated key information instruction that is to indicate the obfuscated key information which is to include authenticatable key information, and wherein the execution unit is operative to:
attempt to authenticate the authenticatable key information; and
signal a fault if the attempt to authenticate the authenticatable key information does not succeed.

### Claim 12 (depends on 1)

The processor of claim 1, wherein the cryptographic hash algorithm is to be one of MD5, SHA-1, SHA-2, and RIPEMD, and wherein the execution unit, in response to a decode of a second keyed-hash MAC with obfuscated key information instruction, is to:
stop performing the second keyed-hash MAC with obfuscated key information instruction after an interruption;
encrypt an intermediate state associated with performance of the second keyed-hash MAC with obfuscated key information instruction with a secret key of the processor that is accessible to the execution unit but that is not readable by software; and
store the encrypted intermediate state in a storage location.

### Claim 13 (depends on 1)

The processor of claim 1, wherein the execution unit, in response to a decode of a second keyed-hash MAC with obfuscated key information instruction, is to:
stop performing the second keyed-hash MAC with obfuscated key information instruction after an interruption; and
discard an intermediate state associated with performance of the second keyed-hash MAC with obfuscated key information instruction.

### Claim 14 (depends on 1)

The processor of claim 1, wherein the cryptographic hash algorithm is to be one of MD5, SHA-1, SHA-2, and RIPEMD.

### Claim 15 (depends on 14)

The processor of claim 14, wherein the processor is a general-purpose processor, and wherein the cryptographic hash algorithm is to be one of said MD5 and said SHA-1.

### Claim 16 (depends on 1)

The processor of claim 1, wherein the decode unit is to decode the keyed-hash MAC with obfuscated key information instruction that is to have a field to indicate the cryptographic hash algorithm as any one of a plurality of different cryptographic hash algorithms.

### Claim 17 (depends on 1)

The processor of claim 1, wherein the decode unit is to decode the keyed-hash MAC with obfuscated key information instruction that is to indicate a length of the message.

### Claim 18 (depends on 1)

The processor of claim 1, wherein the decode unit is to decode the keyed-hash MAC with obfuscated key information instruction that is to indicate a length of the MAC that is to be stored in the destination packed data register.

### Claim 19 (depends on 1)

The processor of claim 1, wherein the decode unit is to decode the keyed-hash MAC with obfuscated key information instruction that is to indicate the obfuscated key information from which a cryptographic key, on which the MAC is to be based, cannot be derived without a secret of the processor that is accessible to the execution unit but that is not readable by software, and wherein the execution unit, in response to a decode of a second keyed-hash MAC with obfuscated key information instruction, is to:
stop performing the second keyed-hash MAC with obfuscated key information instruction after an interruption;
encrypt an intermediate state associated with performance of the second keyed-hash MAC with obfuscated key information instruction with a secret key of the processor that is accessible to the execution unit but that is not readable by software; and
store the encrypted intermediate state in a storage location.

### Claim 20 (depends on 1)

The processor of claim 1, wherein the decode unit is to decode the keyed-hash MAC with obfuscated key information instruction that is to indicate the obfuscated key information which is to include an encryption of key information, wherein the execution unit is to use the key information to generate the MAC, and wherein the execution unit, in response to a decode of a second keyed-hash MAC with obfuscated key information instruction, is to:
stop performing the second keyed-hash MAC with obfuscated key information instruction after an interruption; and
discard an intermediate state associated with performance of the second keyed-hash MAC with obfuscated key information instruction.

### Claim 21

A method in a general-purpose processor comprising:
decoding, with a decode unit of the general-purpose processor, a keyed-hash message authentication code (MAC) with obfuscated key information instruction of an instruction set of the processor that corresponds to a keyed-hash MAC algorithm that uses a cryptographic hash algorithm, the keyed-hash MAC with obfuscated key information instruction having an opcode, indicating a message, indicating obfuscated key information, and having a field specifying a destination architectural packed data register of a set of architectural packed data registers of the processor, wherein the keyed-hash MAC with obfuscated key information instruction is at least one of a macroinstruction and a machine code instruction; and
performing, with an execution unit of the general-purpose processor that includes a cryptographic hash unit to perform the cryptographic hash algorithm, the keyed-hash MAC with obfuscated key information instruction including generating and storing a message authentication code (MAC) corresponding to the indicated message in the specified destination architectural packed data register of the set of architectural packed data registers of the processor.

### Claim 22 (depends on 21)

The method of claim 21, wherein said decoding comprises decoding the keyed-hash MAC with obfuscated key information instruction that indicates the obfuscated key information from which a cryptographic key, on which the MAC is based, cannot be derived without a secret of the processor that is accessible to the execution unit but that is not readable by software.

### Claim 23 (depends on 21)

The method of claim 21, wherein said decoding comprises decoding the keyed-hash MAC with obfuscated key information instruction that indicates the obfuscated key information that includes one of:
an encryption of key information; and
a key information indication value that indicates key information but does not include key information and does not include an encryption of key information.

### Claim 24

A system to process instructions comprising:
an interconnect;
a processor coupled with the interconnect, the processor including a plurality of packed data registers, the processor to perform a keyed-hash message authentication code (MAC) with obfuscated key information instruction of an instruction set of the processor that is to correspond to a keyed-hash MAC algorithm that is to include a cryptographic hash algorithm, the keyed-hash MAC with obfuscated key information instruction having an opcode, to indicate a message, to indicate obfuscated key information, and having a field to specify a destination packed data register of a set of packed data registers of a register file of the processor, wherein the keyed-hash MAC with obfuscated key information instruction is at least one of a macroinstruction and a machine code instruction, the processor including a cryptographic hash unit to perform the cryptographic hash algorithm, the processor, in response to the performance of the keyed-hash MAC with obfuscated key information instruction, to generate and store a message authentication code (MAC) corresponding to the indicated message in the destination packed data register of the register file of the processor; and
a dynamic random access memory (DRAM) coupled with the interconnect.

### Claim 25 (depends on 24)

The system of claim 24, wherein the keyed-hash MAC with obfuscated key information instruction is to indicate the obfuscated key information which is to include an encryption of key information, wherein the key information is to be used to generate the MAC.

### Claim 26

An article of manufacture comprising a non-transitory machine-readable storage medium, the non-transitory machine-readable storage medium storing instructions including a keyed-hash message authentication code (MAC) with obfuscated key information instruction of an instruction set of a processor, the keyed-hash MAC with obfuscated key information instruction being at least one of a macroinstruction and a machine code instruction,
the keyed-hash MAC with obfuscated key information instruction to correspond to a keyed-hash MAC algorithm that is to use a cryptographic hash algorithm, the keyed-hash MAC with obfuscated key information instruction having an opcode, to indicate a message, to indicate obfuscated key information, and having a field to specify a destination architectural packed data register of a set of architectural packed data registers of the processor, the keyed-hash MAC with obfuscated key information instruction when executed by a machine, which includes a cryptographic hash unit to perform the cryptographic hash algorithm, is to cause the machine to perform operations comprising to:
generate a message authentication code (MAC) corresponding to the indicated message; and
store the MAC in the specified destination architectural packed data register of the set of architectural packed data registers of the processor.

### Claim 27 (depends on 26)

The article of manufacture of claim 26, wherein the keyed-hash MAC with obfuscated key information instruction is to indicate the obfuscated key information which is to include a key information indication value.
