fe25519_carry shifts a negative carry left (fe25519.c:31, and :35), undefined in C99; CI's signed capsules reach it in san-mesh-boot. Reported, not fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017RzZgrf7V7Zk2iczBXDRbm
16 lines
493 B
C
16 lines
493 B
C
/* Reproduces the nightly's san-mesh-boot failure (run 333, 2026-11-20) without the signing key:
|
|
* fe25519_sub(0, 1) leaves limb 0 at -1, and fe25519_carry shifts the carry of -1 left by 51. */
|
|
#include "starkernel/fe25519.h"
|
|
#include <stdio.h>
|
|
int main(void)
|
|
{
|
|
fe25519 zero, one, r;
|
|
fe25519_0(&zero);
|
|
fe25519_1(&one);
|
|
printf("fe25519_sub(0, 1) ...\n");
|
|
fflush(stdout);
|
|
fe25519_sub(&r, &zero, &one);
|
|
printf("done: v[0]=%lld\n", (long long)r.v[0]);
|
|
return 0;
|
|
}
|