# US 12,602,492 B2 · Memory system and control method

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

- Number: US 12,602,492 B2
- Document ID: US12602492B2
- Status: Granted
- Kind: B2
- Application number: 18/743,458
- Filed: 2024-06-14
- Published: 2025-01-09
- Granted: 2026-04-14
- Earliest claimed: 2023-07-04
- Assignees: Kioxia Corporation
- Applicants: Kioxia Corporation
- Inventors: Keiri Nakanishi; Takaya Ogawa; Takashi Takemoto; Kohei Oikawa
- Web page: https://patentgrep.com/patent/US12602492B2

## CPC

- G06F 21/602: {Providing cryptographic facilities or services}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A controller of a memory system includes circuitry that generates a first compression unit that is calculated based on first namespace setting information indicating setting of a write-destination namespace, and corresponds to the write-destination namespace. The first compression unit has a size satisfying a constraint that an encryption key for encrypting data to be written into the write-destination namespace is not switched in the first compression unit.

## Claims

### Claim 1

A memory system connectable to a host, comprising:
a non-volatile memory; and
a controller having circuitry configured to
manage a plurality of namespaces, and control the non-volatile memory, the namespaces being used by the host to access the memory system,
compress a write data item received from the host to create compressed data,
encrypt the compressed data with an encryption key to generate encrypted data to be written into the non-volatile memory,
determine, for each of the namespaces, a compression unit that is a unit of compression of the write data item,
determine a first compression unit in response to a write command that designates a namespace identifier of a write-destination namespace from the host, wherein a size of the first compression unit is calculated based on first namespace setting information corresponding to the write-destination namespace, and having a size of an encryption key switch unit that satisfies a constraint that an encryption key to encrypt data to be written into the write-destination namespace is not switched in the first compression unit, and
compress data specified by the write command according to the first compression unit.

### Claim 2 (depends on 1)

The memory system of claim 1, wherein the controller is further configured to
preliminarily calculate a plurality of compression units corresponding to respective namespaces, based on multiple pieces of namespace setting information corresponding to the respective namespaces, and hold the plurality of calculated compression units, and
set the first compression unit by selection of the first compression unit from among the plurality of compression units in response to reception of the write command from the host.

### Claim 3 (depends on 1)

The memory system of claim 1, wherein the controller is further configured to
obtain, from the first namespace setting information, a data size of the write-destination namespace per logical address included in a logical address space, and
calculate, as the first compression unit, a size of a smaller of the calculated encryption key switch unit and the obtained data size.

### Claim 4 (depends on 1)

The memory system of claim 1, wherein the controller is further configured to
decrypt the encrypted data read from the non-volatile memory, using the encryption key used to encrypt the compressed data,
generate uncompressed data via a decompression of decrypted data, and
determine whether a size of the uncompressed data matches the compression unit used to compress the write data item corresponding to the uncompressed data.

### Claim 5 (depends on 1)

The memory system of claim 1, wherein the controller is a memory controller and the circuitry comprising a system-on-a-chip.

### Claim 6 (depends on 1)

The memory system of claim 1, wherein the non-volatile memory comprises a NAND-type flash memory.

### Claim 7

A memory system connectable to a host, comprising:
a non-volatile memory; and
a controller having circuitry configured to
manage a plurality of encryption keys, and control the non-volatile memory, the plurality of encryption keys being associated in a one-to-one relationship respectively with a plurality of logical address ranges set in a logical address space used by the host to access the memory system,
compress a write data item associated with a write command received from the host to create compressed data,
encrypt the compressed data to generate encrypted data using an encryption key, of the plurality of encryption keys, associated with the logical address range to which a logical address designated by the write command belongs, the encrypted data to be written into the non-volatile memory,
identify a logical address range, of the plurality of logical address ranges, to which the logical address designated by the received write command belongs, every time the write command is received from the host,
determine a compression unit that is a unit of compression of the write data item,
determine whether a first logical address range to which a first logical address designated by the latest write command belongs matches a second logical address range to which a second logical address designated by the penultimate write command belongs or not,
in response to the first logical address matching the second logical address range, extend a current size of the compression unit such that a first write data item associated with a latest write command received from the host is compressed with data at least including a second write data item associated with a penultimate write command received from the host, and wait to receive a next write command from the host, and
in response to the first logical address not matching the second logical address range,
determine the current size of the compression unit as the compression unit so that the first write data item, and the data at least including the second write data item are separately compressed, and
set the generated compression unit, and wait for receipt of the next write command from the host.

### Claim 8 (depends on 7)

The memory system of claim 7, wherein the controller is further configured to
generate a current size of the compression unit so that data at least including the first write data item, and the write data item associated with the next write command are separately compressed, and
set a size of the generated compression unit, if the next write command is not received within a predetermined time period after the latest write command is received, or if the extended compression unit reaches an upper limit.

### Claim 9 (depends on 7)

The memory system of claim 7, wherein the controller is further configured to
prevent compression of at least the penultimate write data item in the data at least including the penultimate write data item, if the first logical address range does not match the second logical address range.

### Claim 10 (depends on 7)

The memory system of claim 7, wherein the controller is further configured to
decrypt the encrypted data read from the non-volatile memory, using the encryption key used to encrypt the compressed data,
generate uncompressed data via decompression of decrypted data, and
determine whether a size of the uncompressed data matches the compression unit used to compress the write data item corresponding to the uncompressed data.

### Claim 11 (depends on 7)

The memory system of claim 7, wherein the controller is a memory controller and the circuitry comprising a system-on-a-chip.

### Claim 12 (depends on 7)

The memory system of claim 7, wherein the non-volatile memory comprises a NAND-type flash memory.

### Claim 13

A memory system connectable to a host, comprising:
a non-volatile memory; and
controller having circuitry configured to
manage a plurality of namespaces, control the non-volatile memory, the plurality of namespaces being used by the host to access the memory system, and manage a plurality of encryption keys associated in a one-to-one relationship respectively with the plurality namespaces,
compress a write data item associated with a write command received from the host to create compressed data;
encrypt the compressed data to generate encrypted data using the encryption key associated with the namespace in which the write data item is to be written, the encrypted data to be written into the non-volatile memory,
determine a compression unit that is a unit of compressing the write data item,
determine whether a first namespace identifier designated by the latest write command matches a second namespace identifier designated by the penultimate write command or not, and
in response to the first namespace identifier matching the second namespace identifier, extend a current size of the compression unit so that a first write data item associated with a latest write command received from the host is compressed with data at least including a second write data item associated with a penultimate write command received from the host, and wait to receive a next write command from the host, and
in response to the first namespace identifier not matching the second namespace identifier,
determine the current size of the compression unit as the compression unit so that the first write data item, and the data at least including the second write data item are separately compressed, and
set the generated compression unit, and wait for receipt of the next write command from the host.

### Claim 14 (depends on 13)

The memory system of claim 13, wherein the controller is configured to
determine a current size of the compression unit as the compression unit so that data at least including the first write data item, and the write data item associated with the next write command are separately compressed, and
set the generated compression unit, if the next write command is not received within a predetermined time period after the latest write command is received, or if the extended compression unit reaches an upper limit.

### Claim 15 (depends on 13)

The memory system of claim 13, wherein the controller is further configured to
prevent compression of at least the second write data item in the data at least including the second write data item, if the first namespace identifier does not match the second namespace identifier.

### Claim 16 (depends on 13)

The memory system of claim 13, wherein the controller is further configured to
decrypt the encrypted data read from the non-volatile memory, using the encryption key used to encrypt the compressed data,
generate uncompressed data via decompression of decrypted data, and
determine whether a size of the uncompressed data matches the compression unit used to compress the write data item corresponding to the uncompressed data.

### Claim 17 (depends on 13)

The memory system of claim 13, wherein:
the controller is a memory controller and the circuitry comprising a system-on-a-chip; and
the non-volatile memory comprises a NAND-type flash memory.

### Claim 18 (depends on 1)

A control method of controlling the memory system according to claim 1.

### Claim 19 (depends on 7)

A control method of controlling the memory system according to claim 7.

### Claim 20 (depends on 13)

A control method of controlling the memory system of claim 13.
