Skip to content

Armv8.1-M: Native XOR bytes fails unit test #1759

Description

@hanno-becker

Issue: The native implementation of xor_bytes for Armv8.1-M fails its unit test because the load instructions https://github.com/pq-code-package/mlkem-native/blob/main/mlkem/src/fips202/native/armv81m/src/state_xor_bytes_x4_mve.S#L198-L200 require word alignment which is not guaranteed in the intended generality of the function (any offset, any input length).

IMPORTANT: This is not an issue for the top-level ML-KEM API: The ASM works correctly if either offset % 4 == 0, or if inlen < 8, which is given for all uses by fips202*.c.

Secondary issue: The unit test actually fails in CI, but the baremetal exec wrapper somehow does not propagate the error. This needs fixing, too.

Metadata

Metadata

Assignees

No one assigned

    Labels

    MVERelating to Armv8.1-M+MVE architecturebugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions