noqtis —
post-quantum signatures, KEMs, hashes and sealed capsules
in C11
libnoqtis, -lnoqtis
#include
<noqtis.h>
cc prog.c $(pkg-config --cflags --libs noqtis) find_package(noqtis CONFIG REQUIRED) # CMake target_link_libraries(prog PRIVATE noqtis::noqtis)
noqtis is a library in ISO C11 with no run-time dependencies. It provides the NIST post-quantum standards, byte-identical to their test vectors, and on top of them capsules: folders whose exact files are recorded, signed and checked.
nqskg(),
nqskgd(),
nqsign(),
nqsignd(),
nqvrfy(),
nqssize(),
nqsname(),
nqsfind().nqkkg(),
nqkkgd(),
nqenc(),
nqencd(),
nqdec(),
nqksize(),
nqkname(),
nqkfind().nqhash(),
nqhini(),
nqhupd(),
nqhfin(),
nqhlen(),
nqhmac().nqtsreq(),
nqtsput().nqrepn(),
nqrepi(),
nqrepfree().nqsetrng()).nqersreq(),
nqersput().nqver().NQOK (0) or a negative
NQE* code
(nqerr(3)). A
failed verification is NQEVRFY, never
NQOK.nqssize() and
nqksize().NQEBUF
when it is too small.nqwipe()
before a function returns, on every path. Operations on secret data run in
constant time.nqrand()
unless a caller passes the standard's seed or randomness through a
‘d’ variant
(nqskgd(), nqsignd(),
nqkkgd(), nqencd()), which
exist for the test vectors.nqsetal().nqsetal(),
as long as threads do not share an nqhctx, an
nqrep being freed, or a capsule folder being
sealed.The library builds with CMake (‘cmake -S.
-B build && cmake --build build’), static by default,
-DNQSHARED=ON for shared. A shared build exports
only the public functions; on Windows, programs that use the DLL define
NQDLL (the CMake package and
noqtis.pc do it).
#include <noqtis.h>
#include <stdio.h>
int main(void) {
printf("noqtis %s\n", nqver());
return 0;
}
More in docs/examples of the source tree; every one is compiled and run in CI.
FIPS 180-4, FIPS 198-1, FIPS 202, FIPS 203, FIPS 204, FIPS 205, SP 800-90A (HMAC_DRBG, internal), HQC version 5.0.0, RFC 3161, RFC 8785.
noqtis has not had an external security audit.