Skip to content

Introduce constant-time barriers for caddq, decompose, and power2round #364

@mkannwischer

Description

@mkannwischer

caddq, decompose, and power2round use patterns such as

  a += (a >> 31) & MLDSA_Q;
  return a;

that a compiler may turn into a conditional when inlined (either through lto or via explicit inlining such as #363).
We should introduce appropriate constant-time barriers to ensure that these functions remain constant-time also with lto.
Note that power2round is less important as it only processes public data. If the performance overhead is small, however, we may just consistently use constant-time barriers.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions