# US 8,578,172 B2 · Information processing device for obtaining an HMAC

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

- Number: US 8,578,172 B2
- Document ID: US8578172B2
- Status: Granted
- Kind: B2
- Application number: 13/050,332
- Filed: 2011-03-17
- Published: 2011-12-08
- Granted: 2013-11-05
- Earliest claimed: 2010-06-04
- Assignees: Kabushiki Kaisha Toshiba
- Applicants: Koichi Fujisaki
- Inventors: Koichi Fujisaki
- Web page: https://patentgrep.com/patent/US8578172B2

## CPC

- H04L 9/0816: {Key establishment, i.e. cryptographic processes or cryptographic protocols whereby a shared secret becomes available to two or more parties, for subsequent use}
- H04L 9/0643: {Hash functions, e.g. MD5, SHA, HMAC or f9 MAC}
- H04L 9/3242: {involving keyed hash functions, e.g. message authentication codes [MACs], CBC-MAC or HMAC}
- H04L 2209/20: Manipulating the length of blocks of bits, e.g. padding or block truncation
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)

## Abstract

One embodiment is an information processing device for obtaining an HMAC, including a padding circuit for generating first key data by adding a first constant with respect to secret key data, setting the secret key data as second key data when the secret key length is equal to the block length, generating third key data by adding the first constant with respect to a first digest value; a hash calculation circuit for obtaining the first digest value; and a control unit for managing a processing state for calculating the HMAC, wherein the hash calculation circuit outputs a first midway progress value when interrupting a calculation process of the first digest value, and resumes the calculation process of the first digest using the first midway progress value when a signal indicating resuming instruction of the calculation process of the first digest value is input to the control unit.

## Claims

### Claim 1

An information processing device for obtaining an HMAC, comprising:
a padding circuit to generate first key data K0 by adding 0 with respect to secret key data K when a secret key length (Length(K)) of input secret key data K is shorter than a block length (Length(B)) of a hash function, to set the secret key data K as second key data K0 when the secret key length (Length(K)) is equal to the block length (Length(B)) of the hash function, to generate third key data K0 by adding 0 with respect to a first digest value H(K), which is a digest value of the secret key data K, when the secret key length (Length(K)) is longer than the block length (Length(B)) of the hash function, and to perform an exclusive OR operation with a first constant ipad with respect to one of the first key data K0, the second key data K0, and the third key data K0 to calculate first data (K0 xor ipad);
a hash calculation circuit to obtain the first digest value H(K), and obtaining a second digest value H(K0 xor ipad)∥M), which is a digest value of data (K0 xor ipad)∥M) in which the first data (K0 xor pad) and the input message data M are connected;
a holding circuit to store the secret key data K or the first digest value H(K); and
a control unit to manage a processing state for calculating the HMAC, wherein
the hash calculation circuit outputs a midway progress of the first digest value H(K) calculated before the interruption to outside when interrupting a calculation process of the first digest value H(K) in the middle, and is input with the midway progress of the first digest value H(K) to calculate the first digest value H(K) using the midway progress of the first digest value H(K) when resuming the calculation process of the first digest value H(K),
the hash calculation circuit outputs a midway progress of the second digest value H(K0 xor ipad)∥M) calculated before the interruption to outside when interrupting a calculation process of the second digest value H(K0 xor ipad)∥M) in the middle, and is input with the midway progress of the second digest value H(K0 xor ipad)∥M) to calculate the second digest value H(K0 xor ipad)∥M) using the midway progress of the second digest value H(K0 xor ipad)∥M) when resuming the calculation process of the second digest value H(K0 xor ipad)∥M),
the holding circuit outputs the secrete key data K or the first digest value H(K) to outside when the hash calculation circuit interrupts the calculation process of the second digest value H(K0 xor ipad)∥M) in the middle, and is input with the secret key data K or the first digest value H(K) when the hash calculation circuit resumes the calculation process of the second digest value H(K0 xor ipad)∥M),
the hash calculation circuit resumes the calculation process of the first digest value H(K) when a signal indicating resuming instruction of the calculation process of the first digest value H(K) is input to the control unit, and
the hash calculation circuit resumes the calculation process of the second digest value H(K0 xor ipad)∥M) when a signal indicating resuming instruction of the calculation process of the second digest value H(K0 xor ipad)∥M) is input to the control unit.

### Claim 2 (depends on 1)

The device according to claim 1, wherein the midway progress of the first digest value H(K) is input to the hash calculation circuit when a signal instructing the input of the midway progress of the first digest value H(K) is input.

### Claim 3 (depends on 2)

The information processing device according to claim 2, wherein the midway progress of the second digest value H(K0 xor ipad)∥M) is input to the hash calculation circuit when a signal instructing the input of the midway progress of the second digest value H(K0 xor ipad)∥M) is input.

### Claim 4 (depends on 3)

The device according to claim 3, wherein
the hash calculation circuit repeatedly carries out a hash calculation in order of K0, K1, K2, . . . Kn−1, Kn (or data in which 0 is added to Kn) with respect to divided secret key (K0, K1, K2, . . . , Kn) obtained by dividing the secret key data K by n when obtaining the first digest value H(K) to calculate the first digest value H(K) (=H(K0, K1, K2, . . . , Kn)),
the hash calculation circuit outputs H(K0, K1, K2, . . . , Ki) as the midway progress of the calculation process of the first digest value H(K0, K1, K2, . . . , Kn) when interrupting the calculation process of the first digest value H(K0, K1, K2, . . . Kn) in the middle and when carrying out the hash calculation for the divided secret key K0, K1, K2, . . . Ki in the calculation process, and
when resuming the calculation process of the first digest value H(K), the midway progress H(K0, K1, K2, . . . , Ki) is input to the hash calculation circuit, and the divided secret keys Ki+1, . . . Kn are input to calculate the first digest value H(K0, K1, K2, . . . , Kn)).

### Claim 5 (depends on 4)

The device according to claim 4, wherein
the hash calculation circuit repeatedly carries out a hash calculation in order of M0, M1, . . . , Mn (or data in which 0 is added to Mn) with respect to divided message data blocks (M0, M1, M2, . . . , Mn) obtained by dividing the message data by n when obtaining the second digest value H(K0 xor ipad)∥M) to calculate the second digest value H(K0 xor ipad)∥M) (=H((K0 xor ipad)∥M0, M1, M2, . . . , Mn)),
the hash calculation circuit outputs H((K0 xor ipad)∥M0, M1, M2, . . . , Mi) as the midway progress of the calculation process of the second digest value when interrupting the calculation process of the second digest value H(K0 xor ipad)∥M) in the middle and when carrying out the hash calculation for the message data blocks (M0, M1, M2, . . . , Mi) in the calculation process, and
when resuming the calculation process of the second digest value, the midway progress H((K0 xor ipad)∥M0, M1, M2, . . . , Mi) is input, and the message data blocks Mi+1, . . . , Mn are input to calculate the second digest value H((K0 xor ipad)∥M0, M1, M2, . . . , Mn).
