Skip to content

Possible Bug: Wrong field for inversion #16

@autoDetector

Description

@autoDetector

Vulnerable File: circuits/sbox128.circom
commit: 4984d68467b87ddf14c2e725dcfb753be3c92528

AES/S-box-style constructions require inversion in GF(2^8). FieldInv()(in) will compute the multiplicative inverse in the circuit’s prime field (the SNARK field), not in GF(2^8). Bit-decomposing that prime-field inverse and applying an affine map does not implement the AES S-box (or any GF(2^8) S-box). This yields incorrect behavior and can invalidate any protocol relying on the standard S-box semantics.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions