The library: algorithms, version and self-test

Which algorithms the bundled library has and their sizes, its version, and the known-answer test that shows it computes them correctly.

Each section is one help page: what its functions are for, and the example of the page as it runs. ?name gives the arguments and the value in full.

Algorithms and their sizes

nqalgs(): Lists every signature and key encapsulation algorithm the bundled library provides, with the sizes in bytes of its keys, signatures, ciphertexts and shared secrets.

a <- nqalgs()
a[a$type == "sig", c("name", "pk", "sk", "sig")]
#>                  name   pk   sk   sig
#> 1           ML-DSA-44 1312 2560  2420
#> 2           ML-DSA-65 1952 4032  3309
#> 3           ML-DSA-87 2592 4896  4627
#> 4   SLH-DSA-SHA2-128s   32   64  7856
#> 5   SLH-DSA-SHA2-128f   32   64 17088
#> 6   SLH-DSA-SHA2-192s   48   96 16224
#> 7   SLH-DSA-SHA2-192f   48   96 35664
#> 8   SLH-DSA-SHA2-256s   64  128 29792
#> 9   SLH-DSA-SHA2-256f   64  128 49856
#> 10 SLH-DSA-SHAKE-128s   32   64  7856
#> 11 SLH-DSA-SHAKE-128f   32   64 17088
#> 12 SLH-DSA-SHAKE-192s   48   96 16224
#> 13 SLH-DSA-SHAKE-192f   48   96 35664
#> 14 SLH-DSA-SHAKE-256s   64  128 29792
#> 15 SLH-DSA-SHAKE-256f   64  128 49856
#> 16            Ed25519   32   32    64
#> 17  ML-DSA-44+Ed25519 1344 2592  2484
#> 18  ML-DSA-65+Ed25519 1984 4064  3373
#> 19  ML-DSA-87+Ed25519 2624 4928  4691
a[a$type == "kem", c("name", "pk", "sk", "ct", "ss")]
#>           name   pk   sk    ct ss
#> 20  ML-KEM-512  800 1632   768 32
#> 21  ML-KEM-768 1184 2400  1088 32
#> 22 ML-KEM-1024 1568 3168  1568 32
#> 23     HQC-128 2241 2321  4433 32
#> 24     HQC-192 4514 4602  8978 32
#> 25     HQC-256 7237 7333 14421 32

Version of the bundled noqtis library

nqver(): The version of the noqtis C library compiled into this package, which is also the package’s own version.

nqver()
#> [1] "0.3.0"
utils::packageVersion("noqtis") == nqver()
#> [1] TRUE

Known-answer self-test of the bundled noqtis library

nqselftest(): Runs fixed inputs through every algorithm family and compares the outputs with stored answers, the power-on self-test a FIPS 140-3 cryptographic module runs before it is used.

nqselftest()
system.time(nqselftest())
#>    user  system elapsed 
#>    0.13    0.00    0.13