DF-3566 / siphash_kat.c
/* * SipHash-2-4 test-module KAT: run the kernel's own test module logic * (siphash_test.c vector table) in userland against siphash.c. * Expect SipHash24_TestVectors() == 1 (all 64 vectors match). */ #include <stdio.h> #include <crypto/siphash/siphash.h> int main(void) { int r = SipHash24_TestVectors(); printf("SIPHASH24_TESTVECTORS=%d (%s)\n", r, r == 1 ? "ALL 64 VECTORS MATCH" : "VECTOR FAILURE"); return (r != 1); } |