Skip to content

Introduce constant-time primitive for absolute value computation #152

@hanno-becker

Description

@hanno-becker

poly_chknorm uses the pattern

    t = a->coeffs[i] >> 31;
    t = a->coeffs[i] - (t & 2 * a->coeffs[i]);

to compute the absolute value of an int32_t. This should be wrapped in a constant-time function guarded by barriers making compilation into a branch unlikely.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions