Skip to content
View in the app

A better way to browse. Learn more.

Learn more

ROTPK_HASH eFuse on Allwinner A64: exact hash input and byte order

Featured Replies

I have a custom board with an Allwinner A64 and I'm preparing to burn the ROTPK_HASH eFuse (SID offset 0x64, 256 bits) for secure boot by flashing TOC0 image. Since eFuses can't be undone, I'd like to confirm two things first.
1. Hash input. The SID Register Guide (screenshot below) says:ROTPK_HASH = SHA256(modulus[0-255] || exponent[256-x] || 0x91 filler up to byte 511)

For my key I take this to mean exactly 512 bytes:

  • bytes 0–255: modulus, big-endian

  • bytes 256–258: 01 00 01

  • bytes 259–511: 0x91

Is this correct for the A64 secure boot ROM?

2. Byte order in eFuse. Should the 32-byte digest be written as 8 little-endian 32-bit words starting at 0x64? For example, if the digest starts a1 b2 c3 d4 ..., would word 0x64 be 0xd4c3b2a1?

Has anyone actually burned ROTPK_HASH on an A64


3. ROTPK_HASH without the secure boot bit. If ROTPK_HASH is programmed but the secure boot enable bit is not set, does the boot ROM check anything against ROTPK_HASH? Or does the secure boot flow only run once the secure boot bit is set?

4. Testing before burning. Is there a way to test the secure boot flow, including the ROTPK_HASH check, before burning the eFuses, so I can catch and fix mistakes first? Or is burning the eFuses the only way to check it?

image.png

SID Register Guide - linux-sunxi.org

Edited by Arjun.TK

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.