emit_ntt_kat

command
v1.5.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 28, 2026 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Overview

Copyright (c) 2026 Lux Industries Inc. SPDX-License-Identifier: BSD-3-Clause

emit_ntt_kat — produces the canonical cross-runtime KAT bundle for luxfi/math/ntt. The C++ side at luxcpp/crypto/math/test/ ntt_cross_runtime_test.cpp reads the same JSON and asserts byte-equal Forward-NTT output for every entry.

LP-107 Phase 6.4: Go emits → C++ verifies. Cross-runtime release gate for the Number-Theoretic Transform.

Usage:

go run ./cmd/emit_ntt_kat --out testdata/ntt_kat.json

Each entry's input is the 256-element uint64 polynomial in standard (non-Montgomery) form, packed little-endian (256*8 = 2048 bytes). Output is the forward-NTT result, same packing (2048 bytes).

Determinism: input coefficients are drawn from a SHA-256 hash chain of a fixed seed string, reduced mod PulsarQ.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL