AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
Informational 18 Bitcoin

optiga: simplify PAL I2C retries

Public commit record

What the developer wrote

Authored by Marko Bencun

68/100 · Adequate
optiga: simplify PAL I2C retries

The Optiga PAL contract is single-attempt: write/read should try once
and then report PAL_I2C_EVENT_SUCCESS, PAL_I2C_EVENT_ERROR, or
PAL_I2C_EVENT_BUSY to the upper layer callback. Upstream PAL examples
do not spin inside pal_i2c_write() and pal_i2c_read(); they leave
retry handling to the Optiga IFX I2C stack above PAL, using a 1 ms
retry interval and up to 200 attempts from
external/optiga-trust-m/include/ifx_i2c/ifx_i2c_config.h:37.

Our local PAL implementation added an extra 25x2ms retry loop around
i2c_m_sync_transfer() in both pal_i2c_write() and pal_i2c_read(). That
made each PAL call block for up to about 50ms before the stack even
saw an error or busy event.

The host library already retries these conditions asynchronously in
the physical layer. Normal register and frame operations set
retry_counter and reschedule ifx_i2c_pal_poll_callback() after
PAL_I2C_EVENT_ERROR or PAL_I2C_EVENT_BUSY. The special slave-address
path also retries around pal_i2c_write() on its own. Keeping the retry
loop in PAL therefore duplicates the library's retry logic and turns
PAL into a blocking poller.

Remove the local retry and sleep loops and perform a single
synchronous i2c_m_sync_transfer() per PAL call instead. This keeps the
PAL aligned with the upstream contract and lets the Optiga stack
decide when and how often to poll.

This change removes redundant blocking from PAL. It does not change
the higher-level optiga_ops synchronous wrappers, which still
busy-wait on the Optiga callbacks.
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
The short version

What changed, and why it matters

This commit removes an internal retry loop from the low-level I2C driver that talks to the Optiga secure chip in the BitBox02 hardware wallet. Previously, every I2C write/read would automatically retry up to 25 times with 2 ms delays. Now it tries once and lets the upper-layer Optiga library decide whether to retry. The change is described by the vendor as a simplification that reduces redundant blocking; it is not presented as a security fix and the diff alone does not show an exploitable vulnerability.

Recommended action

Treat as a normal firmware maintenance commit. Review whether the upper-layer IFX I2C retry logic and slave-address retry path are actually enabled and correctly configured in the build, since the local fallback retry is now gone. No immediate security response is indicated by the supplied materials.

Security signals we found

01

Removal of local retry/sleep loop in low-level I2C PAL

02

Change aligns PAL behavior with upstream Optiga IFX I2C contract

03

No bounds, length, or input validation changes

04

No cryptographic, authentication, or secret-handling changes visible

05

Commit message frames change as cleanup/refactoring, not as a security fix

Risk score

Why this scored 18/100

Our methodology →
Potential impact 2/30
Exploitability 1/25
Stealth signal 1/15
Affected reach 2/15
Confidence 8/10
Evidence quality 4/5
Human-validated context

Community notes

Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.

No validated notes yet.

The AI analysis stands alone for now. Submit a note if you can add evidence or important context.