@@ -264,10 +264,13 @@ Before reporting the opaque malformed-input result, the ct decoder passes the
264264accumulated error mask through a non-inlined ` ct_error_gate_barrier ` that uses
265265` core::hint::black_box ` , a compiler fence, and architecture-specific hardware
266266speculation barriers where available (` lfence ` on x86/x86_64, ` isb sy ` on ARM,
267- and ` isb sy; hint #20 ` on AArch64). This is defense in depth around the final
268- public success/failure gate; it does not make the ct decoder a formally
269- verified hardware side-channel resistant primitive and does not change the
270- transient-output window described above.
267+ and ` isb sy; hint #20 ` on AArch64). On RISCV the gate uses ` fence rw, rw ` ,
268+ which is an ordering fence rather than a canonical speculation barrier in the
269+ base ISA. The runtime backend report exposes this separately through
270+ ` ct_gate_posture ` . This is defense in depth around the final public
271+ success/failure gate; it does not make the ct decoder a formally verified
272+ hardware side-channel resistant primitive and does not change the transient
273+ output window described above.
271274
272275For shared-memory or in-process sandbox threat models where even that transient
273276output window is unacceptable, use
@@ -306,9 +309,12 @@ type, and the final equality result as public. The helper scans every byte for
306309equal-length inputs before returning. The per-byte difference is passed through
307310` core::hint::black_box ` ; the accumulator is also passed through ` black_box `
308311after each OR reduction to reduce the risk of release-mode optimizer rewrites
309- into early-exit equality checks. The helper is marked ` #[inline(never)] ` and
310- the release evidence script checks that ` constant_time_eq_public_len ` remains
311- visible as a separate text symbol in the LTO artifact.
312+ into early-exit equality checks. Before returning the public equality result,
313+ the helper also passes the accumulated difference through the same non-inlined
314+ CT gate barrier used by malformed-input reporting. The helper is marked
315+ ` #[inline(never)] ` and the release evidence script checks that
316+ ` constant_time_eq_public_len ` remains visible as a separate text symbol in the
317+ LTO artifact.
312318
313319This remains a best-effort API and does not upgrade ` base64-ng ` to a formally
314320verified cryptographic constant-time comparison crate. Do not use this helper
0 commit comments