INNER CODE UNIT · Rust

EF_DEV_CONF_MAX

TheMaxMur/RS-Key · crates/rsk-devconf/src/lib.rs:86

const EF_DEV_CONF_MAX: usize = MIN_CONFIG_RES_CAP - CONFIG_TLV_FIXED;

/// Largest WRITE CONFIG request accepted, before the lock tags are stripped. A
/// request may legitimately be larger than what it stores — `set-lock-code` sends
/// a 16-byte UNLOCK *and* a 16-byte CONFIG_LOCK, neither of which is kept — so the
/// request bound is the transport's own limit and the crate-private
/// `EF_DEV_CONF_MAX` is applied to the stripped result.
pub const DEV_CONF_WRITE_MAX: usize = 128;

/// Smallest `ResBuf` a READ CONFIG response is built into (the OTP-HID transport).
const MIN_CONFIG_RES_CAP: usize = 64;

/// How much of `EF_DEV_CONF` a read reaches for. Larger than [`EF_DEV_CONF_MAX`],
/// which bounds only *new* writes: builds before that cap stored up to this much,
/// and the record survives `authenticatorReset`, so an upgraded device must still
/// be read whole. Reading through the smaller cap would slice such a blob
/// mid-entry and hand the host the unparseable DeviceInfo the cap exists to
/// prevent.

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…