# US 2012/0254625 A1 · Protecting states of a cryptographic process using group automorphisms

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

- Number: US 2012/0254625 A1
- Document ID: US20120254625A1
- Status: Published application
- Kind: A1
- Application number: 13/076,362
- Filed: 2011-03-30
- Published: 2012-10-04
- Earliest claimed: 2011-03-30
- Assignees: Apple Inc.
- Inventors: Augustin J. FARRUGIA; Mathieu Ciet; Thomas Icart
- Web page: https://patentgrep.com/patent/US20120254625A1

## CPC

- G06F 21/602: {Providing cryptographic facilities or services}
- G06F 21/52: during program execution, e.g. stack integrity {; Preventing unwanted data erasure; Buffer overflow}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

In the field of computer enabled cryptography, such as a keyed block cipher having a plurality of rounds, the cipher is hardened against an attack by a protection process which obscures the cipher states and/or the round keys using the properties of group field automorphisms and applying multiplicative masks (instead of conventional XOR masks) to the states of the cipher, for encryption or decryption. This is especially advantageous in a “White Box” environment where an attacker has full access to the cipher algorithm, including the algorithm's internal state during its execution. This method and the associated computing apparatus are useful for protection against known attacks on “White Box” ciphers, by eliminating XOR operations with improved masking techniques and increasing complexity of reverse engineering and of attacks.

## Claims

### Claim 1

A method of performing a cryptographic process having a plurality of operations on a message, comprising the acts of:
receiving the message at a port;
storing the message in a first computer readable storage medium coupled to the port;
at a processor coupled to the first computer readable memory, applying a plurality of cipher operations sequentially to the message thereby generating a state for each operation;
applying, for at least one of the operations, an input mask value and an output mask value to respectively an input and output value of the state, wherein each mask value is applied by multiplying the mask value and the state value; and
storing each state in a second computer readable medium coupled to the processor.

### Claim 2 (depends on 1)

The method of claim 1, wherein the multiplying includes adding a logarithm of the mask value to a logarithm of the state value, modulus a predetermined number.

### Claim 3 (depends on 2)

The method of claim 2, wherein the act of applying the mask value to the state further includes determining an exponentiation of the added logarithms.

### Claim 4 (depends on 1)

The method of claim 1, wherein the cryptographic process is a block cipher which includes a plurality of rounds, each round having an associated round key, each round including the plurality of cipher operation.

### Claim 5 (depends on 1)

The method of claim 1, wherein the cryptographic process is encryption or decryption and the message is respectively a cleartext or a ciphertext.

### Claim 6 (depends on 4)

The method of claim 4, wherein each round includes at least three of an add round key operation, a mix column operation, a subbyte operation, and a shift row operation, or an inverse thereof.

### Claim 7 (depends on 2)

The method of claim 2, wherein the predetermined number is 256.

### Claim 8 (depends on 2)

The method of claim 2, wherein each of the mask values is a member of a Galois Field of the predetermined number, and wherein for each non-zero element X in the Galois field, there is a generator value g such that:
X=gx where x is in the range of 0 to the predetermined number.

### Claim 9 (depends on 3)

The method of claim 3, wherein applying the mask value to the state includes determining each logarithm and exponentiation by a table lookup.

### Claim 10 (depends on 9)

The method of claim 9, further comprising providing a plurality of tables for the table lookups, each table having a different generator value.

### Claim 11 (depends on 4)

The method of claim 4, wherein at least one of the cipher operations includes a logical exclusive-OR operation applied to a state and a round key, and further comprising masking the exclusive-OR operation by determining a difference between the state and the round key and determining a logarithm of the difference, modulus a predetermined number.

### Claim 12 (depends on 11)

The method of claim 11, wherein at least some of the masked cryptographic operations include no logical exclusive OR operations.

### Claim 13 (depends on 10)

The method of claim 10, further comprising during execution of the cryptographic process, changing between the plurality of tables.

### Claim 14 (depends on 1)

The method of claim 1, wherein at least one of the cryptographic operations includes a permutation of the state, and further comprising performing the permutation as a logarithm of a permutation of an exponentiation of the state.

### Claim 15 (depends on 1)

A computer readable medium storing computer code for carrying out the method of claim 1.

### Claim 16 (depends on 1)

A computing apparatus programmed to carry out the method of claim 1.

### Claim 17 (depends on 4)

The method of claim 4, further comprising:
masking at least one of the round keys by applying a multiplicative mask value to the round key.

### Claim 18 (depends on 17)

The method of claim 17, wherein an input mask value and an output mask value are each applied to the round key.

### Claim 19 (depends on 18)

The method of claim 18, further comprising, for each round of the cipher, applying a different input mask value to the round key.

### Claim 20 (depends on 19)

The method of claim 19, wherein for each round, the input mask value is a composition of the output mask value for the previous round with an affine function.

### Claim 21 (depends on 8)

The method of claim 8, further including unmasking the resulting masked value of the state by multiplying the masked value of the state by an inverse of the member of the Galois Field.

### Claim 22

An apparatus for performing a cryptographic process having a plurality of operations on a message, comprising:
a port adapted for receiving the message;
a first computer readable storage coupled to the port and adapted to store the received message;
a processor coupled to the first computer readable memory and which applies a plurality of cipher operation sequentially to the message, thereby generating a state for each operation;
the processor applying, for at least one of the operations, an input mask value and an output mask value respectively to an input and output value of the state, wherein each mask value is multiplying the mask value and the state value; and
a second computer readable storage coupled to the processor and adapted to store each state value.

### Claim 23 (depends on 22)

The apparatus of claim 22, wherein the multiplying includes adding a logarithm of the logarithm of the mask value to logarithm of the state value, modulus a predetermined number.

### Claim 24 (depends on 23)

The apparatus of claim 23, wherein applying the mask value to the state further includes determining an exponentiation of the added logarithms.

### Claim 25 (depends on 22)

The apparatus of claim 22, wherein the cryptographic process is a block cipher which includes a plurality of rounds, each round having an associated round key, each round including the plurality of cipher operation.

### Claim 26 (depends on 22)

The apparatus of claim 22, wherein the cryptographic process is encryption or decryption and the message is respectively a cleartext or a ciphertext.

### Claim 27 (depends on 25)

The apparatus of claim 25, wherein each round includes at least three of an add round key operation, a mix column operation, a subbyte operation, and a shift row operation, or an inverse thereof.

### Claim 28 (depends on 23)

The apparatus of claim 23, wherein the predetermined number is 256.

### Claim 29 (depends on 23)

The apparatus of claim 23, wherein each of the mask values is a member of the Galois Field of the predetermined number, and wherein for each non-zero element X in the Galois field, there is a generator value g such that:
X=gx where x is in the range of 0 to the predetermined number.

### Claim 30 (depends on 24)

The apparatus of claim 24, wherein applying the mask value to the state includes determining each logarithm and exponentiation by a table lookup.

### Claim 31 (depends on 30)

The apparatus of claim 30, further comprising providing a plurality of tables for the table lookups, each table having a different generator value.

### Claim 32 (depends on 23)

The apparatus of claim 23, wherein at least one of the cipher operations includes a logical exclusive-OR operation applied to a state and a round key, and further comprising the processor masking the exclusive-OR operation by determining a difference between the state and the round key and determining a logarithm of the difference, modulus a predetermined number.

### Claim 33 (depends on 32)

The apparatus of claim 32, wherein at least some of the masked cryptographic operations include no logical exclusive OR operations.

### Claim 34 (depends on 31)

The apparatus of claim 31, further comprising during execution of the cryptographic process, changing between the plurality of tables.

### Claim 35 (depends on 22)

The apparatus of claim 22, wherein at least one of the cryptographic operations includes a permutation of the state, and further comprising performing the permutation as a logarithm of a permutation of an exponentiation of the state.

### Claim 36 (depends on 25)

The method of claim 25, further comprising:
masking at least one of the round keys by applying a multiplicative mask value to the round key.

### Claim 37 (depends on 36)

The apparatus of claim 36, wherein an input mask value and an output mask value are each applied to the round key.

### Claim 38 (depends on 37)

The apparatus of claim 37, further comprising, for each round of the cipher, applying a different input mask value to the round key.

### Claim 39 (depends on 38)

The apparatus of claim 38, wherein for each round, the input mask value is a composition of the output mask value for the previous round with an affine function.

### Claim 40 (depends on 29)

The apparatus of claim 29, further including unmasking the resulting masked value of the state by multiplying the masked value of the state by an inverse of the member of the Galois Field.
