Replay Protected Memory Block
A Replay Protected Memory Block (RPMB) is provided as a means for a system to store data to the specific memory area in an authenticated and replay protected manner and can only be read and written via successfully authenticated read and write accesses. The data may be overwritten by the host but can never be erased.[https://www.jedec.org/sites/default/files/docs/JESD220A.pdf JEDEC Standard No. 220]
Use in computing systems
Since RPMB is tamper-resistant, it can be used as a storage medium for a variety of data-critical purposes on an embedded system:
- A place to write "permanent" and/or "pre-programmed" data on a system without any programmable ROM storage, or if the data is too large for it.
- Along with encryption and hardware fuses, it can also be used to build a trusted storage solution for a trusted execution environment{{Citation
| first1 = Himanshu | last1 = Raj
| first2 = Stefan | last2 = Saroiu
| first3 = Alec | last3 = Wolman
| first4 = Ronald | last4 = Aigner
| first5 = Jeremiah | last5 = Cox
| first6 = Paul | last6 = England
| first7 = Chris | last7 = Fenner
| first8 = Kinshuman | last8 = Kinshumann
| first9 = Jork | last9 = Loeser
| first10 = Dennis | last10 = Mattoon
| first11 = Magnus | last11 = Nystrom
| first12 = David | last12 = Robinson
| first13 = Rob | last13 = Spiger
| first14 = Stefan | last14 = Thom
| first15 = David | last15 = Wooten
| contribution = fTPM: A Software-Only Implementation of a TPM Chip
| contribution-url = https://www.usenix.org/conference/usenixsecurity16/technical-sessions/presentation/raj
| title = 25th USENIX Security Symposium
| place = Austin, TX, USA
| date = August 10–12, 2016
}}
- Anti-rollback protection for versioned data (keys, encrypted files, software, etc).{{Citation
| first = Liang | last = Cai
| title = Guard Your Data with the Qualcomm Snapdragon Mobile Platform
| url = https://www.qualcomm.com/media/documents/files/guard-your-data-with-the-qualcomm-snapdragon-mobile-platform.pdf
| access-date = April 19, 2021
}}
Some operating systems, such as Linux may provide a generic driver for accessing an RPMB device attached to an eMMC.{{Citation
| first = Thomas | last = Winkler
| url = https://lwn.net/Articles/700483/
| title = Replay Protected Memory Block (RPMB) subsystem
| access-date = April 19, 2021
}} However, in other cases the access to RPMB is controlled through a proprietary driver; this may require use of a Trusted Application instead of a normal application to access the data. Some embedded flash storage devices, such as eMMC, eUFS and NVMe, support this standard.
Logical unit addressing
The UFS specification allocates a "Well-Known LUN" identifier of 44h for the RPMB device. This can be represented as:
- UFS LUN:
WLUN_ID (80h) | UNIT_NUMBER_ID
=C4h
- 64-bit SCSI LUN:
WLUN_ID (C1h) | UNIT_NUMBER_ID
=C1h 44h 00h 00h 00h 00h 00h 00h
Memory layout
An RPMB device supplies the following memory sections:
class="wikitable" |
---
! scope="col" | Section ! scope="col" | Access ! scope="col" | Size |
Authentication Key
| Write-only | 32 bytes |
Write Counter
| Read-only | 4 bytes (32 bits) |
Data Area
| Read/write | Multiple of 128 Kbytes* |
* This is the minimum defined by the specification, the actual block size depends on the flash vendor's implementation.