/* ed25519.h -- EdDSA signature VERIFICATION only (RFC 8032), freestanding * C99. No signing, no key generation, no RNG -- this kernel never signs; * signing happens in the host-side build tool, which can link * libsodium/OpenSSL because it's a normal Linux binary. That halves the * implementation surface here: no scalar clamping, no key derivation, no * constant-time discipline (verify operates only on public data -- * public key, message, signature -- there's no secret-dependent branch * to leak). */ #ifndef ED25519_H #define ED25519_H #include #include /* Returns 1 if signature (64 bytes: R || S) is a valid Ed25519 signature * by pubkey (32 bytes, compressed point) over msg, else 0. Rejects * malformed inputs (S >= L, an undecodable point) as invalid rather than * faulting. */ int ed25519_verify(const uint8_t pubkey[32], const uint8_t *msg, size_t msg_len, const uint8_t sig[64]); #endif /* ED25519_H */