⚠️ VeridianOS Kernel Documentation - This is low-level kernel code. All functions are unsafe unless explicitly marked otherwise. no_std

verify

Function verify 

Source
pub fn verify(
    public_key: &[u8],
    message: &[u8],
    signature: &[u8],
) -> Result<bool, KernelError>
Expand description

Verify a Dilithium3 (ML-DSA-65) signature.

Performs structural validation and hash-based binding verification:

  1. Validates public key and signature sizes.
  2. Verifies c_tilde is non-zero.
  3. Checks z coefficient norm bounds (|z_i| < gamma1 - beta).
  4. Computes a verification hash binding the public key, message, and signature components, and compares with c_tilde.

Full algebraic NTT verification (matrix A from rho, w’ = Az - ct1*2^d) is deferred to Phase 7.5 when SHAKE-128/256 is available.