LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

rpi-otp-private-key

Read or write a private key in Raspberry Pi OTP memory

TLDR

Read the OTP private key
$ sudo rpi-otp-private-key
copy
Write a private key from a binary file (irreversible!)
$ sudo rpi-otp-private-key -w [keyfile.bin]
copy
Specify which row of OTP memory to read or write
$ sudo rpi-otp-private-key -y [56]
copy

SYNOPSIS

rpi-otp-private-key [-w file] [-y row] [-c]

DESCRIPTION

rpi-otp-private-key reads or writes the customer-controlled 256-bit private key stored in the One-Time Programmable (OTP) memory of a Raspberry Pi's SoC. The key is used to sign or decrypt material as part of the Raspberry Pi secure boot chain (sometimes called "Customer OTP").When invoked with no flags, it prints the currently programmed key as a 64-character hex string (or all zeros if it has not been programmed). With -w, it burns the supplied 32-byte file into OTP — this is permanent and cannot be undone, including after factory reset.

PARAMETERS

-w file

Write the contents of file (must be 32 bytes / 256 bits) to OTP memory. Permanent.
-y row
Override the default OTP row used to store the key.
-c
Check whether the OTP key has been programmed without printing it.

CAVEATS

OTP programming is irreversible: once burned, the bits cannot be cleared. A bad write can permanently brick secure-boot deployments. The displayed private key should be treated as sensitive and never shared. Requires running as root because it accesses the OTP via the VideoCore mailbox interface (vcgencmd).

HISTORY

Part of the rpi-eeprom package shipped with Raspberry Pi OS, providing tools for managing EEPROM and OTP on Raspberry Pi 4 and later. Used by Raspberry Pi's secure-boot infrastructure introduced with the Raspberry Pi 4 boot ROM updates.

SEE ALSO

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid