# US 2020/0402426 A1 · Method and apparatus for encrypting and decrypting user data

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

- Number: US 2020/0402426 A1
- Document ID: US20200402426A1
- Status: Published application
- Kind: A1
- Application number: 16/704,688
- Filed: 2019-12-05
- Published: 2020-12-24
- Earliest claimed: 2019-06-20
- Assignees: Silicon Motion, Inc.
- Applicants: Silicon Motion, Inc.
- Inventors: An-Pang LI
- Web page: https://patentgrep.com/patent/US20200402426A1

## CPC

- 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)
- G06F 12/0246: {in block erasable memory, e.g. flash memory}
- G06F 12/1408: {by using cryptography (for digital transmission H04L9/00)}
- G06F 21/602: {Providing cryptographic facilities or services}
- H03M 13/09: Error detection only, e.g. using cyclic redundancy check [CRC] codes or single parity bit
- 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}
- G06F 2212/1052: Security improvement
- G06F 2212/7202: Allocation control and policies
- G06F 2212/7204: Capacity control, e.g. partitioning, end-of-life degradation
- H04L 2209/12: Details relating to cryptographic hardware or logic circuitry
- G09C: CIPHERING OR DECIPHERING APPARATUS FOR CRYPTOGRAPHIC OR OTHER PURPOSES INVOLVING THE NEED FOR SECRECY
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- H03M: CODING; DECODING; CODE CONVERSION IN GENERAL (using fluidic means F15C4/00; optical analogue/digital converters G02F7/00; coding, decoding or code conversion, specially adapted for particular applications, see the relevant subclasses, e.g. G01D, G01R, G06F, G06T, G09G, G10L, G11B, G11C, H04B, H04L, H04M, H04N; ciphering or deciphering for cryptography or other purposes involving the need for secrecy G09C)
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)

## Abstract

The invention introduces an apparatus for encrypting and decrypting user data, including a memory, a bypass-flag writing circuit and a flash interface controller. The bypass-flag writing circuit writes a bypass flag in a remaining bit of space of the memory that is originally allocated for storing an End-to-End Data Path Protection (E2E DPP), where the bypass flag indicates whether user data has been encrypted. The flash interface controller reads the user data, the E2E DPP and the bypass flag from the memory and programs the user data, the E2E DPP and the bypass flag into the flash device.

## Claims

### Claim 1

An apparatus for encrypting and decrypting user data, comprising:
a memory;
a bypass-flag writing circuit, coupled to the memory, arranged to operably write a bypass flag in a remaining bit of space of the memory that is originally allocated for storing an End-to-End Data Path Protection (E2E DPP), wherein the bypass flag indicates whether user data has been encrypted; and
a flash interface controller, coupled to a flash device and the memory, arranged to operably read the user data, the E2E DPP and the bypass flag from the memory and program the user data, the E2E DPP and the bypass flag into the flash device.

### Claim 2 (depends on 1)

The apparatus of claim 1, wherein the E2E DPP is used to determine whether read data has error bits.

### Claim 3 (depends on 1)

The apparatus of claim 1, wherein the bypass-flag writing circuit comprises:
a verification-code generator, arranged to operably generate the E2E DPP according to the user data and store the E2E DPP in originally allocated space of the memory; and
a multiplexer, arranged to operably output “1” or “0” to the remaining bit of the space of the memory.

### Claim 4 (depends on 3)

The apparatus of claim 3, wherein the verification-code generator is a 15-bit Cyclic Redundancy Check (CRC) encoder.

### Claim 5 (depends on 1)

The apparatus of claim 1, wherein the bypass-flag writing circuit is a Direct Memory Access (DMA) controller, arranged to operably read the user data from a Dynamic Random Access Memory (DRAM) outside of the apparatus and output “1” or “0” to the remaining bit of the space of the memory.

### Claim 6 (depends on 1)

The apparatus of claim 1, wherein the bypass-flag writing circuit is a processing unit, arranged to operably write “1” or “0” to the remaining bit of the space of the memory according to a setting of a register or information carried by a host write command.

### Claim 7 (depends on 1)

The apparatus of claim 1, comprising:
a user-data and flag checker, coupled to the memory,
wherein the flash interface controller is arranged to operably read the user data and the bypass flag from the flash device and store them in the memory, the user-data and flag checker is arranged operably to read the bypass flag from the memory and outputs the bypass flag to an encryption-and-decryption controller, and the encryption-and-decryption controller is arranged to operably configure a decryption path or a bypass path that makes the user data passed through according to the bypass flag,
wherein the decryption path comprises an encryption-and-decryption engine, the bypass path does not include the encryption-and-decryption engine, and the encryption-and-decryption engine is arranged to operably decrypt the user data using a key.

### Claim 8 (depends on 7)

The apparatus of claim 7, the encryption-and-decryption controller is arranged to operably configure components of the apparatus to form the decryption path or the bypass path.

### Claim 9 (depends on 7)

The apparatus of claim 7, wherein the encryption-and-decryption engine implements Advanced Encryption Standard (AES) algorithm.

### Claim 10

An apparatus for encrypting and decrypting user data, comprising:
a flash interface controller, coupled to a flash device, arranged to operably read user data and a bypass flag from the flash device and store the user data and the bypass flag in a memory, wherein the bypass flag is stored in a remaining bit of space of the memory that is originally allocated for storing an End-to-End Data Path Protection (E2E DPP) to indicate whether the user data has been encrypted;
a user-data and flag checker, coupled to the flash interface controller, arranged to operably output the bypass flag received from the flash interface controller; and
an encryption-and-decryption controller, coupled to the user-data and flag checker, arranged to operably receive the bypass flag, configure a decryption path or a bypass path that makes the user data passed through according to the bypass flag, wherein the decryption path comprises an encryption-and-decryption engine, the bypass path does not include the encryption-and-decryption engine, and the encryption-and-decryption engine is arranged to operably decrypt the user data using a key.

### Claim 11 (depends on 10)

The apparatus of claim 10, wherein the encryption-and-decryption controller is arranged to operably configure components of the apparatus to form the decryption path or the bypass path.

### Claim 12 (depends on 10)

The apparatus of claim 10, comprising:
a host bridge controller, coupled to the decryption path or the bypass path, arranged to operably output the user data or the decrypted user data to a host-side.

### Claim 13 (depends on 10)

The apparatus of claim 10, comprising:
a Direct Memory Access (DMA) controller, coupled to the decryption path or the bypass path, arranged to operably store the user data or the decrypted user data in a Dynamic Random Access Memory (DRAM) outside of the apparatus, thereby enabling a host-side to obtain the user data or the decrypted user data from the DRAM.

### Claim 14

A method for encrypting and decrypting user data, comprising:
programming user data, an End-to-End Data Path Protection (E2E DPP) and a bypass flag into a flash device, wherein the bypass flag is stored in a remaining bit of space of the flash device that is originally allocated for storing the E2E DPP, and the bypass flag indicates whether the user data has been encrypted.

### Claim 15 (depends on 14)

The method of claim 14, wherein the E2E DPP is used to determine whether read data has error bits.

### Claim 16 (depends on 14)

The method of claim 14, comprising:
programming “1” or “0” into the remaining bit of the flash device according to a setting of a register or information carried by a host write command.

### Claim 17 (depends on 14)

The method of claim 14, comprising:
configuring an encryption path or a bypass path according to a setting of a register or information carried by a host write command, wherein the encryption path comprises an encryption-and-decryption engine, the bypass path does not include the encryption-and-decryption engine and the encryption-and-decryption engine encrypts the user data using a key.

### Claim 18 (depends on 14)

The method of claim 14, comprising:
reading the bypass flag from the flash device;
configuring a decryption path or a bypass path that makes the user data passed through according to the bypass flag, wherein the decryption path comprises an encryption-and-decryption engine, the bypass path does not include the encryption-and-decryption engine and the encryption-and-decryption engine decrypts the user data using a key; and
outputting the user data or the decrypted user data to a host-side.

### Claim 19 (depends on 14)

The method of claim 14, wherein the method is performed by a flash controller coupled between the flash device and a host-side.

### Claim 20 (depends on 14)

The method of claim 14, wherein the E2D DPP is a 15-bit Cyclic Redundancy Check (CRC) and a length of the remaining bit is one.
