# US 2025/0165162 A1 · Universal flash storage device for preventing replay attack, operating method thereof, and universal flash storage system

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

- Number: US 2025/0165162 A1
- Document ID: US20250165162A1
- Status: Published application
- Kind: A1
- Application number: 18/936,517
- Filed: 2024-11-04
- Published: 2025-05-22
- Earliest claimed: 2023-11-20
- Assignees: Samsung Electronics Co., Ltd.
- Applicants: Samsung Electronics Co., Ltd.
- Inventors: Daejin JUNG; Minji Kim; Myeongjong Lee; Hyungsup Kim; Seongchan Jo; Jeongwoo Park
- Web page: https://patentgrep.com/patent/US20250165162A1

## CPC

- G06F 3/0622: {in relation to access}
- G06F 21/79: in semiconductor storage media, e.g. directly-addressable memories
- G06F 3/0619: {in relation to data integrity, e.g. data losses, bit errors}
- G06F 3/0655: {Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices}
- G06F 3/0679: {Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]}
- G06F 21/64: Protecting data integrity, e.g. using checksums, certificates or signatures
- H04L 9/3242: {involving keyed hash functions, e.g. message authentication codes [MACs], CBC-MAC or HMAC}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)

## Abstract

Provided are a universal flash storage (UFS) device for preventing a replay attack, a method of operating the same, and a UFS system. The UFS device including: a memory including a replay protection memory block (RPMB) region, the RPMB region including one or more index fields storing a second write failure index; and a memory controller including at least one controller memory storing one or more instructions, wherein the memory controller is configured to execute the one or more instructions to cause the UFS device to: receive, from an external device, an RPMB write request including a first write failure index, meta information, and a first message authentication code generated based on the first write failure index and the meta information, and determine whether to perform an authentication operation on the external device based on the first write failure index and the second write failure index.

## Claims

### Claim 1

A universal flash storage (UFS) device comprising:
a memory comprising a replay protection memory block (RPMB) region, the RPMB region comprising one or more index fields storing a second write failure index; and
a memory controller comprising at least one controller memory storing one or more instructions,
wherein the memory controller is configured to execute the one or more instructions to cause the UFS device to:
receive, from an external device, an RPMB write request comprising a first write failure index, meta information, and a first message authentication code generated based on the first write failure index and the meta information, and
determine whether to perform an authentication operation on the external device based on the first write failure index and the second write failure index.

### Claim 2 (depends on 1)

The UFS device of claim 1, wherein the memory controller is configured to execute the one or more instructions to cause the UFS device to:
compare a value of the first write failure index with a value of the second write failure index,
based on the value of the first write failure index being different from the value of the second write failure index, perform the authentication operation based on the RPMB write request, and
based on the value of the first write failure index being the same as the value of the second write failure index, determine a result of the authentication operation as a failure.

### Claim 3 (depends on 1)

The UFS device of claim 1, wherein the memory controller is configured to execute the one or more instructions to cause the UFS device to:
obtain a second message authentication code based on a preset algorithm, the first write failure index, and the meta information,
compare a value of the first message authentication code with a value of the second message authentication code, and
determine whether the authentication operation succeeds based on whether the value of the first message authentication code matches the value of the second message authentication code.

### Claim 4 (depends on 1)

The UFS device of claim 1, wherein the memory controller is configured to execute the one or more instructions to cause the UFS device to: based on a result of the authentication operation being a failure, store the first write failure index in the RPMB region and transmit, to the external device, a response comprising a first code value indicating that the authentication operation is a failure.

### Claim 5 (depends on 1)

The UFS device of claim 1, wherein the memory controller is configured to execute the one or more instructions to cause the UFS device to:
based on the authentication operation failing a predetermined number of times, enter at least one of an ignore mode, a power cycle, or a read only mode.

### Claim 6 (depends on 5)

The UFS device of claim 5, wherein the memory controller is configured to execute the one or more instructions to cause the UFS device to:
based on the UFS device entering the power cycle, initialize a first index field in which the first write failure index is stored and a second index field in which the second write failure index is stored.

### Claim 7 (depends on 5)

The UFS device of claim 5, wherein the memory controller is configured to execute the one or more instructions to cause the UFS device to:
based on the UFS device entering the read only mode, transmit, to the external device, a response comprising a second code value indicating that the authentication operation is a failure with respect to a write request of the external device.

### Claim 8 (depends on 1)

The UFS device of claim 1, wherein the memory controller is configured to execute the one or more instructions to cause the UFS device to:
based on a result of the authentication operation being successful, initialize the one or more index fields.

### Claim 9 (depends on 1)

The UFS device of claim 1, wherein the RPMB write request comprises at least one of an authenticated data write request, a secure write protect configuration block write request, and an RPMB purge enable request.

### Claim 10

A method of operating a universal flash storage (UFS) device configured to communicate with an external device, the method comprising:
receiving a replay protection memory block (RPMB) write request comprising a first write failure index, meta information, and a first message authentication code generated based on the first write failure index and the meta information;
identifying whether to perform an authentication operation on the external device based on a second write failure index included in an RPMB region of the UFS device and the first write failure index; and
based on performing the authentication operation, outputting a response comprising a result of the authentication operation.

### Claim 11 (depends on 10)

The method of claim 10, wherein the identifying whether to perform the authentication operation on the external device comprises:
comparing a value of the first write failure index with a value of the second write failure index; and
based on the value of the first write failure index and the value of the second write failure index being the same, identifying the result of the authentication operation as a failure.

### Claim 12 (depends on 11)

The method of claim 11, wherein the outputting the response comprising the result of the authentication operation comprises:
setting a first code value indicating that the authentication operation is a failure; and
transmitting the response to the external device.

### Claim 13 (depends on 11)

The method of claim 11, further comprising: storing the first write failure index in the RPMB region.

### Claim 14 (depends on 11)

The method of claim 11, wherein the identifying whether to perform the authentication operation on the external device includes based on the authentication operation failing a predetermined number of times, entering at least one of an ignore mode, a power cycle, and a read only mode.

### Claim 15

A universal flash storage (UFS) system comprising:
a UFS host comprising:
at least one host processor; and
at least one host memory storing one or more host instructions,
wherein the at least one host processor is configured to execute the one or more host instructions to cause the UFS host to:
obtain a first message authentication code based on a first write failure index and meta information, and
output a replay protection memory block (RPMB) write request comprising the first message authentication code, the first write failure index, and the meta information as an RPMB operation; and
a UFS device comprising:
at least one device processor; and
at least one device memory storing one or more device instructions,
wherein the at least one device processor is configured to execute the one or more device instructions to cause the UFS device to:
determine whether to perform an authentication operation on the UFS host based on the first write failure index.

### Claim 16 (depends on 15)

The UFS system of claim 15, wherein the at least one device processor is configured to execute the one or more device instructions to cause the UFS device to:
compare a value of a second write failure index stored in a RPMB region of the USF device with a value of the first write failure index, and
based on a result of the comparison of the value of the first write failure index and the value of the second write failure index, perform the authentication operation.

### Claim 17 (depends on 16)

The UFS system of claim 16, wherein the at least one device processor is configured to execute the one or more device instructions to cause the UFS device to:
based on the value of the first write failure index being different from the value of the second write failure index, perform the authentication operation based on the RPMB write request, and
based on the value of the first write failure index being the same as the value of the second write failure index, determine a result of the authentication operation as a failure.

### Claim 18 (depends on 17)

The UFS system of claim 17, wherein the at least one device processor is configured to execute the one or more device instructions to cause the UFS device to:
based on the result of the authentication operation being the failure, store the first write failure index in the RPMB region and transmit, to the UFS host, a first response comprising a first code value indicating that the authentication operation is a failure.

### Claim 19 (depends on 18)

The UFS system of claim 18, wherein the at least one device processor is configured to execute the one or more device instructions to cause the UFS device to:
based on the authentication operation failing a predetermined number of times, enter at least one of an ignore mode, a power cycle, and a read only mode.

### Claim 20 (depends on 19)

The UFS system of claim 19, wherein to the at least one device processor is configured to execute the one or more device instructions to cause the UFS device to:
based on the UFS device entering the power cycle, initialize the first write failure index and the second write failure index stored in the RPMB region and transmit, to the UFS host, a second response comprising a second code value indicating that the authentication operation is a failure with respect to a write request of the UFS host.
