SPHINCS+ Reference Implementation

repository·master·Indexed 42 days ago

https://github.com/sphincs/sphincsplus

Reference software implementation of SPHINCS+, a post-quantum cryptographic signature scheme submitted to the NIST Post-Quantum Cryptography project. Supports configurable parameters for NIST security categories 1, 3, and 5, and multiple hash function implementations including SHA-2, SHAKE, and Haraka.

Tokens
648
Snippets
1
Records
2
Agent score
4%

What's inside SPHINCS+

  1. Configure SPHINCS+ parameters and hash functions

    master

    The SPHINCS+ implementation is flexible, allowing you to specify parameters and hash functions through configuration files and linking.

    • Parameters: You can define custom parameters in a params.h file. Predefined parameter sets (targeting NIST security categories 1, 3, and 5) are available in ref/params/params-*.h.
    • Hash Functions: The hash function can be changed by linking with different implementations of hash.h, such as hash_haraka.c, hash_sha2.c, or hash_shake.c.
    • Tweakable Hash Functions: You can vary the implementation of thash.h by choosing between *_robust.c and *_simple.c implementations.

    Configuration is typically managed via the Makefile.

  2. Reference SPHINCS+ parameter sets

    master

    The following table summarizes the predefined SPHINCS+ parameter sets. These sets are designed for different trade-offs between signature size and signature generation speed, targeting NIST security categories 1, 3, and 5.

    |               | n  | h  | d  | log(t) | k  |  w  | bit security | pk bytes | sk bytes | sig bytes |
    | :------------ | -: | 63 |  7 |     12 | 14 |  16 |          133 |       32 |       64 | 7,856      |
    | SPHINCS+-128s | 16 |    |    |        |    |     |               |           |           |            |
    | SPHINCS+-128f | 16 | 66 | 22 |      6 | 33 |  16 |          128 |       32 |       64 | 17,088     |
    | SPHINCS+-192s | 24 | 63 |  7 |     14 | 17 |  16 |          193 |       48 |       96 | 16,224     |
    | SPHINCS+-192f | 24 | 66 | 22 |      8 | 33 |  16 |          194 |       48 |       96 | 35,664     |
    | SPHINCS+-256s | 32 | 64 |  8 |     14 | 22 |  16 |          255 |       64 |      128 | 29,792     |
    | SPHINCS+-256f | 32 | 68 | 17 |      9 | 35 |  16 |          255 |       64 |      128 | 49,856     |