# US 2010/0246813 A1 · Method and system for accelerating the deterministic enciphering of data in a small domain

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

- Number: US 2010/0246813 A1
- Document ID: US20100246813A1
- Status: Published application
- Kind: A1
- Application number: 12/750,528
- Filed: 2010-03-30
- Published: 2010-09-30
- Earliest claimed: 2009-03-30
- Assignees: The Regents of the University of California
- Inventors: Benjamin J. Morris; Phillip Rogaway; Till Stegers
- Web page: https://patentgrep.com/patent/US20100246813A1

## CPC

- H04L 9/0631: {Substitution permutation network [SPN], i.e. cipher composed of a number of stages or rounds each involving linear and nonlinear transformations, e.g. AES algorithms}
- H04L 9/0656: {Pseudorandom key sequence combined element-for-element with data sequence, e.g. one-time-pad [OTP] or Vernam's cipher}
- H04L 2209/56: Financial cryptography, e.g. electronic payment or e-cash
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)

## Abstract

Conventional block ciphers that traffic in 128-bit block sizes are ill-suited for operating in small domains like credit card numbers. Some embodiments relate to techniques for constructing and speeding up practical and provably secure schemes for deterministically enciphering data from a small domain like credit card numbers using a conventional block cipher or other pseudorandom function.

## Claims

### Claim 1

A method for enciphering an input string to produce an output string, comprising:
receiving the input string;
storing the input string into a register;
modifying the register in a sequence of phases, wherein each phase involves:
invoking a pseudorandom function that outputs a pseudorandom string;
iteratively modifying the register in a sequence of two or more rounds, wherein each round entails using a different portion of the pseudorandom string to direct the modification of the register; and
providing the contents of the register as an output, after the sequence of phases completes.

### Claim 2 (depends on 1)

The method of claim 1,
wherein receiving the input string also involves receiving a key and a tweak; and
wherein applying the pseudorandom function involves using the key and the tweak to determine the pseudorandom function.

### Claim 3 (depends on 1)

The method of claim 1, wherein the pseudorandom function is implemented by the CBC-MAC of the Advanced Encryption Standard (AES).

### Claim 4 (depends on 1)

The method of claim 1,
wherein said input string is drawn from a small domain such as Social Security numbers or credit card numbers;
wherein said domain consists of all strings of length n≧1 whose characters are base-k digits for some k≧2;
wherein enciphering said input string from a small domain results in an output string with a format that is the same as the input string; and
wherein such format preservation simplifies adding encryption to systems with legacy data, because field types for the legacy data need not be changed when the data is enciphered.

### Claim 5

A method for enciphering an input to produce an output, comprising:
receiving the input, wherein the input is n characters in length and wherein each character is a base-k digit;
storing the input into an n-character first register [0 . . . n-1];
modifying the first register in a numbered sequence of phases, wherein each phase involves:
applying a pseudorandom function to a phase number and the value in character positions [m . . . n-1] of the first register, for some m≦n, wherein the pseudorandom function outputs a pseudorandom character string and wherein each character is a base-k digit;
selecting at least m·km-1 base-k characters from the pseudorandom character string and storing them in a second register;
iteratively performing the following operations, wherein each iteration constitutes a round and wherein each round involves:
applying a choice function to the first register, the second register, and the round number, wherein the choice function outputs a pseudorandom base-k character;
combining the value in character position [0] of the first register and the pseudorandom base-k character to produce a new base-k character output;
concatenating the value in character positions [1 . . . n-1] of the first register with the value of the new base-k character; and
storing the concatenation result into the n-character first register; and
providing the contents of the first register as an output, after the sequence of phases completes.

### Claim 6 (depends on 5)

The method of claim 5, wherein concatenating two character strings involves:
joining a first character string of x characters in length to a second character string of y characters in length to produce a new character string of x+y characters and wherein the new character string contains the characters of the first character string followed by the characters of the second character string.

### Claim 7 (depends on 5)

The method of claim 5,
wherein receiving the input involves receiving a key and a tweak; and
wherein applying the pseudorandom function involves using the key and the tweak to determine the pseudorandom function.

### Claim 8 (depends on 7)

The method of claim 7, wherein applying the pseudorandom function further comprises:
computing a phase number, wherein the phase number is unique and is associated with multiple rounds in the pass of n phases; and
using the phase number of determine the pseudorandom function.

### Claim 9 (depends on 8)

The method of claim 8, wherein applying the pseudorandom function further comprises:
computing a current position number, wherein said current position number comprises the value in bit positions [k . . . n-1] of the first register n≧k; and
using the current position number to determine the pseudorandom function.

### Claim 10 (depends on 9)

The method of claim 9, wherein for each phase, applying the pseudorandom function further comprises:
invoking the pseudorandom function using the key, phase number, the current position number, and the tweak.

### Claim 11 (depends on 5)

The method of claim 5, wherein for each round, applying the choice function further comprises:
invoking the choice function using the first register, the second register, and the round;
concatenating the character string in positions [1 . . . (m-1-j)] of the first register with the character string in positions [(n-j) . . . (n-1)], where j is the round number, to produce a string of m-1 base-k characters; and interpreting the string of m-1 base-k characters as a decimal number b and returning a character in position [b+km-1·j] of the second register to output a pseudorandom base-k character.

### Claim 12 (depends on 5)

The method of claim 5, wherein the pseudorandom function is constructed from the CBC-MAC of the Advanced Encryption Standard (AES).

### Claim 13 (depends on 12)

The method of claim 12, wherein at least one AES call is performed per pseudorandom function invocation.

### Claim 14 (depends on 5)

The method of claim 5,
wherein said input is drawn from a small domain such as Social Security numbers or credit card numbers;
wherein said domain consists of all strings of length n≧1 whose characters are base-k digits for some k>2;
wherein said input from a small domain after enciphering results in an output with a format that is the same as the input; and
wherein such format preservation simplifies adding encryption to systems with legacy data, because field types for the legacy data need not be changed when the data is enciphered.

### Claim 15 (depends on 5)

The method of claim 5,
wherein combining two single-character strings involves using modulo-k addition to produce another single-character output string, and wherein the single-character string is a base-k digit; and
wherein one of the two single-character strings and the output string uniquely determines the other single-character string.

### Claim 16

A non-transitory computer-readable storage medium for storing instructions that when executed by a computer cause the computer to perform a method for enciphering an input to produce an output, comprising:
receiving the input, wherein the input is n characters in length and wherein each character is a base-k digit;
storing the input into an n-character first register [0 . . . n-1];
modifying the first register in a numbered sequence of phases, wherein each phase involves:
applying a pseudorandom function to a phase number and the value in character positions [m . . . n-1] of the first register for some m≦n, wherein the pseudorandom function outputs a pseudorandom character string and wherein each character is a base-k digit;
selecting at least m·km-1 base-k characters from the pseudorandom character string and storing them in a second register;
iteratively performing the following operations, wherein each iteration constitutes a round and wherein each round involves:
applying a choice function to the first register, the second register, and the round number, wherein the choice function outputs a pseudorandom base-k character;
combining the value in character position [0] of the first register and the pseudorandom base-k character output to produce a new base-k character output;
concatenating the value in character positions [1 . . . n-1] of the first register with the value of the new base-k character output; and
storing the concatenation result into the n-character first register; and
providing the contents of the first register as an output, after the sequence of phases completes.

### Claim 17 (depends on 16)

The non-transitory computer-readable storage medium of claim 16, wherein concatenating two character strings involves:
joining a first character string of x characters in length to a second character string of y characters in length to produce a new character string of length x+y number of characters and wherein the new character string contains the characters of the first character string followed by the characters of the second character string.

### Claim 18 (depends on 16)

The non-transitory computer-readable storage medium of claim 16,
wherein receiving the input involves receiving a key and a tweak; and
wherein applying the pseudorandom function involves using the key and the tweak to determine the pseudorandom function.

### Claim 19 (depends on 18)

The non-transitory computer-readable storage medium of claim 18, wherein applying the pseudorandom function further comprises:
computing a phase number, wherein the phase number is unique and is associated with multiple rounds in the pass of n phases; and
using the phase number to determine the pseudorandom function.

### Claim 20 (depends on 19)

The non-transitory computer-readable storage medium of claim 19, wherein applying the pseudorandom function further comprises:
computing a current position number, wherein said current position number comprises the value in bit positions [k . . . n-1] of the first register n≧k; and
using the current position number to determine the pseudorandom function.

### Claim 21 (depends on 20)

The non-transitory computer-readable storage medium of claim 20, wherein for each phase, applying the pseudorandom function further comprises:
invoking the pseudorandom function using the key, phase number, the tweak number, and the current position number.

### Claim 22 (depends on 16)

The non-transitory computer-readable storage medium of claim 16, wherein for each round, applying the choice function further comprises:
invoking the choice function using the first register, the second register, and the round;
concatenating the character string in positions [1 . . . (m-1 -j] of the first register with the character string in positions [(n-j) . . . (n-1)] of the first register, where j is the round number, to produce a string of m-1 base-k characters; and
interpreting the string of m-1 base-k characters as a decimal number b and returning a character in position [b+km-1·j] of the second register to output a pseudorandom base-k character.

### Claim 23 (depends on 16)

The non-transitory computer-readable storage medium of claim 16 wherein the pseudorandom function is constructed from the CBC-MAC of the Advanced Encryption Standard (AES).

### Claim 24 (depends on 23)

The non-transitory computer-readable storage medium of claim 23, wherein at least one AES call is performed per pseudorandom function invocation.

### Claim 25 (depends on 16)

The non-transitory computer-readable storage medium of claim 16, wherein said input is drawn from a small domain such as Social Security numbers or credit card numbers;
wherein said domain consists of all strings of length n≧1 whose characters are base-k digits for some k≧2;
wherein said input from a small domain after enciphering results in an output with a format that is the same as the input; and
wherein such format preservation simplifies adding encryption to systems with legacy data, because field types for the legacy data need not be changed when the data is enciphered.

### Claim 26 (depends on 16)

The non-transitory computer-readable storage medium of claim 16, wherein combining two single-character strings involves using modulo-k addition to produce another single-character string, and wherein the single-character string is a base-k digit; and
wherein one of the two single-character strings and the output string uniquely determines the other single-character string.

### Claim 27

A system for enciphering an input to produce an output, comprising:
a receiving mechanism configured to receive the input, wherein the input is n characters in length and wherein each character is a base-k digit;
a storing mechanism configured to store the input into an n-character first register [0 . . . n-1];
a computation mechanism configured to modify the first register in a numbered sequence of phases, wherein each phase involves:
applying a pseudorandom function to a phase number and the value in character positions [m . . . n-1] of the first register, for some m≦n, wherein the pseudorandom function outputs a pseudorandom character string and wherein each character is a base-k digit;
selecting at least m·km-1 base-k characters from the pseudorandom character string and storing them in a second register;
iteratively performing the following operations, wherein each iteration constitutes a round and wherein each round involves:
applying a choice function to the first register, the second register, and the round number, wherein the choice function outputs a pseudorandom base-k character;
combining the value in character position [0] of the first register and the pseudorandom base-k character to produce a new base-k character output;
concatenating the value in character positions [1 . . . n-1] of the first register with the value of the new base-k character; and
storing the concatenation result into the n-character first register; and
an outputting mechanism configured to provide the contents of the first register as an output, after the sequence of phases completes.

### Claim 28 (depends on 27)

The system of claim 27, wherein concatenating two character strings involves:
joining a first character string of x characters in length to a second character string of y characters in length to produce a new character string of length x+y number of characters and wherein the new character string contains the characters of the first character string followed by the characters of the second character string.

### Claim 29 (depends on 27)

The system of claim 27,
wherein receiving the input involves receiving a key and a tweak; and
wherein applying the pseudorandom function involves using the key and the tweak to determine the pseudorandom function.

### Claim 30 (depends on 29)

The system of claim 29, wherein applying the pseudorandom function further comprises:
computing a phase number, wherein the phase number is unique and is associated with multiple rounds in the pass of n phases; and
using the phase number to determine the pseudorandom function.

### Claim 31 (depends on 30)

The system of claim 30, wherein applying the pseudorandom function further comprises:
computing a current position number, wherein said current position number comprises the value in bit positions [k . . . n-1] of the first register n≧k; and
using the current position number to determine the pseudorandom function.

### Claim 32 (depends on 31)

The system of claim 31, wherein for each phase, applying the pseudorandom function further comprises:
invoking the pseudorandom function using the key, phase number, the tweak number, and the current position number.

### Claim 33 (depends on 27)

The system of claim 27, wherein for each round, applying the choice function further comprises:
invoking the choice function using the first register, the second register, and the round;
concatenating the character string in positions [1 . . . (m-1-j)] of the first register with the character string in positions [(n-j) . . . (n-1)] of the first register, where j is the round number, to produce a string of m-1 base-k characters; and
interpreting the string of m-1 base-k characters as a decimal number b and returning a character in position [b+km-1·j] of the second register to output a pseudorandom base-k character.

### Claim 34 (depends on 27)

The system of claim 27 wherein the pseudorandom function is constructed from the CBC-MAC of the Advanced Encryption Standard (AES).

### Claim 35 (depends on 34)

The system of claim 34, wherein at least one AES call is performed per pseudorandom function invocation.

### Claim 36 (depends on 27)

The system of claim 27,
wherein said input is drawn from a small domain such as Social Security numbers or credit card numbers;
wherein said domain consists of all strings of length n≧1 whose characters are base-k digits for some k≧2;
wherein said input from a small domain after enciphering results in an output with a format that is the same as the input; and
wherein such format preservation simplifies adding encryption to systems with legacy data, because field types for the legacy data need not be changed when the data is enciphered.

### Claim 37 (depends on 27)

The system of claim 27,
wherein combining two single-character strings involves using modulo-k addition to produce another single-character string, and wherein the single-character string is a base-k digit; and
wherein one of the two single-character strings and the output string uniquely determines the other single-character string.
