Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add XMSS-SHA256_{10, 16, 20}_192 parameters #1817

Merged
merged 4 commits into from
Jun 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .CMake/alg_support.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -510,6 +510,9 @@ cmake_dependent_option(OQS_ENABLE_SIG_STFL_xmss_sha512_h20 "" ON "OQS_ENABLE_SIG
cmake_dependent_option(OQS_ENABLE_SIG_STFL_xmss_shake256_h10 "" ON "OQS_ENABLE_SIG_STFL_XMSS" OFF)
cmake_dependent_option(OQS_ENABLE_SIG_STFL_xmss_shake256_h16 "" ON "OQS_ENABLE_SIG_STFL_XMSS" OFF)
cmake_dependent_option(OQS_ENABLE_SIG_STFL_xmss_shake256_h20 "" ON "OQS_ENABLE_SIG_STFL_XMSS" OFF)
cmake_dependent_option(OQS_ENABLE_SIG_STFL_xmss_sha256_h10_192 "" ON "OQS_ENABLE_SIG_STFL_XMSS" OFF)
cmake_dependent_option(OQS_ENABLE_SIG_STFL_xmss_sha256_h16_192 "" ON "OQS_ENABLE_SIG_STFL_XMSS" OFF)
cmake_dependent_option(OQS_ENABLE_SIG_STFL_xmss_sha256_h20_192 "" ON "OQS_ENABLE_SIG_STFL_XMSS" OFF)
cmake_dependent_option(OQS_ENABLE_SIG_STFL_xmssmt_sha256_h20_2 "" ON "OQS_ENABLE_SIG_STFL_XMSS" OFF)
cmake_dependent_option(OQS_ENABLE_SIG_STFL_xmssmt_sha256_h20_4 "" ON "OQS_ENABLE_SIG_STFL_XMSS" OFF)
cmake_dependent_option(OQS_ENABLE_SIG_STFL_xmssmt_sha256_h40_2 "" ON "OQS_ENABLE_SIG_STFL_XMSS" OFF)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ All names other than `ML-KEM` and `ML-DSA` are subject to change. `liboqs` makes
- **SPHINCS+-SHA2**: SPHINCS+-SHA2-128f-simple, SPHINCS+-SHA2-128s-simple, SPHINCS+-SHA2-192f-simple, SPHINCS+-SHA2-192s-simple, SPHINCS+-SHA2-256f-simple, SPHINCS+-SHA2-256s-simple
- **SPHINCS+-SHAKE**: SPHINCS+-SHAKE-128f-simple, SPHINCS+-SHAKE-128s-simple, SPHINCS+-SHAKE-192f-simple, SPHINCS+-SHAKE-192s-simple, SPHINCS+-SHAKE-256f-simple, SPHINCS+-SHAKE-256s-simple
<!--- OQS_TEMPLATE_FRAGMENT_LIST_SIGS_END -->
- **XMSS**: XMSS-SHA2_10_256, XMSS-SHA2_16_256, XMSS-SHA2_20_256, XMSS-SHAKE_10_256, XMSS-SHAKE_16_256, XMSS-SHAKE_20_256, XMSS-SHA2_10_512, XMSS-SHA2_16_512, XMSS-SHA2_20_512, XMSS-SHAKE_10_512, XMSS-SHAKE_16_512, XMSS-SHAKE_20_512, XMSSMT-SHA2_20/2_256, XMSSMT-SHA2_20/4_256, XMSSMT-SHA2_40/2_256, XMSSMT-SHA2_40/4_256, XMSSMT-SHA2_40/8_256, XMSSMT-SHA2_60/3_256, XMSSMT-SHA2_60/6_256, XMSSMT-SHA2_60/12_256, XMSSMT-SHAKE_20/2_256, XMSSMT-SHAKE_20/4_256, XMSSMT-SHAKE_40/2_256, XMSSMT-SHAKE_40/4_256, XMSSMT-SHAKE_40/8_256, XMSSMT-SHAKE_60/3_256, XMSSMT-SHAKE_60/6_256, XMSSMT-SHAKE_60/12_256
- **XMSS**: XMSS-SHA2_10_256, XMSS-SHA2_16_256, XMSS-SHA2_20_256, XMSS-SHAKE_10_256, XMSS-SHAKE_16_256, XMSS-SHAKE_20_256, XMSS-SHA2_10_512, XMSS-SHA2_16_512, XMSS-SHA2_20_512, XMSS-SHAKE_10_512, XMSS-SHAKE_16_512, XMSS-SHAKE_20_512, XMSS-SHA2_10_192, XMSS-SHA2_16_192, XMSS-SHA2_20_192, XMSSMT-SHA2_20/2_256, XMSSMT-SHA2_20/4_256, XMSSMT-SHA2_40/2_256, XMSSMT-SHA2_40/4_256, XMSSMT-SHA2_40/8_256, XMSSMT-SHA2_60/3_256, XMSSMT-SHA2_60/6_256, XMSSMT-SHA2_60/12_256, XMSSMT-SHAKE_20/2_256, XMSSMT-SHAKE_20/4_256, XMSSMT-SHAKE_40/2_256, XMSSMT-SHAKE_40/4_256, XMSSMT-SHAKE_40/8_256, XMSSMT-SHAKE_60/3_256, XMSSMT-SHAKE_60/6_256, XMSSMT-SHAKE_60/12_256
- **LMS**: LMS_SHA256_H5_W1, LMS_SHA256_H5_W2, LMS_SHA256_H5_W4, LMS_SHA256_H5_W8, LMS_SHA256_H10_W1, LMS_SHA256_H10_W2, LMS_SHA256_H10_W4, LMS_SHA256_H10_W8, LMS_SHA256_H15_W1, LMS_SHA256_H15_W2, LMS_SHA256_H15_W4, LMS_SHA256_H15_W8, LMS_SHA256_H20_W1, LMS_SHA256_H20_W2, LMS_SHA256_H20_W4, LMS_SHA256_H20_W8, LMS_SHA256_H25_W1, LMS_SHA256_H25_W2, LMS_SHA256_H25_W4, LMS_SHA256_H25_W8, LMS_SHA256_H5_W8_H5_W8, LMS_SHA256_H10_W4_H5_W8, LMS_SHA256_H10_W8_H5_W8, LMS_SHA256_H10_W2_H10_W2, LMS_SHA256_H10_W4_H10_W4, LMS_SHA256_H10_W8_H10_W8, LMS_SHA256_H15_W8_H5_W8, LMS_SHA256_H15_W8_H10_W8, LMS_SHA256_H15_W8_H15_W8, LMS_SHA256_H20_W8_H5_W8, LMS_SHA256_H20_W8_H10_W8, LMS_SHA256_H20_W8_H15_W8, LMS_SHA256_H20_W8_H20_W8

Note that for algorithms marked with a dagger (†), liboqs contains at least one implementation that uses a large amount of stack space; this may cause failures when run in threads or in constrained environments. For more information, consult the algorithm information sheets in the [docs/algorithms](https://github.com/open-quantum-safe/liboqs/tree/main/docs/algorithms) folder.
Expand Down
3 changes: 3 additions & 0 deletions docs/algorithms/sig_stfl/xmss.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@
| XMSS-SHAKE_10_512 | | | 128 | 2653 | 9092 |
| XMSS-SHAKE_16_512 | | | 128 | 4045 | 9476 |
| XMSS-SHAKE_20_512 | | | 128 | 4973 | 9732 |
| XMSS-SHA2_10_192 | | | 48 | 1053 | 1492 |
| XMSS-SHA2_16_192 | | | 48 | 1605 | 1636 |
| XMSS-SHA2_20_192 | | | 48 | 1973 | 1732 |
| XMSSMT-SHA2_20/2_256 | | | 64 | 5998 | 4963 |
| XMSSMT-SHA2_20/4_256 | | | 64 | 10938 | 9251 |
| XMSSMT-SHA2_40/2_256 | | | 64 | 9600 | 5605 |
Expand Down
154 changes: 86 additions & 68 deletions docs/algorithms/sig_stfl/xmss.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,179 +9,197 @@ auxiliary-submitters:

crypto-assumption: hash-based signatures
website: https://www.rfc-editor.org/info/rfc8391
nist-round:
spec-version:
nist-round:
spec-version:
spdx-license-identifier: (Apache-2.0 OR MIT) AND CC0-1.0
primary-upstream:
source: https://github.com/XMSS/xmss-reference
spdx-license-identifier: (Apache-2.0 OR MIT) AND CC0-1.0
upstream-ancestors:
parameter-sets:
- name: XMSS-SHA2_10_256
claimed-nist-level:
claimed-security:
- name: XMSS-SHA2_10_256
claimed-nist-level:
claimed-security:
length-public-key: 64
length-secret-key: 1373
length-signature: 2500
- name: XMSS-SHA2_16_256
claimed-nist-level:
claimed-security:
- name: XMSS-SHA2_16_256
claimed-nist-level:
claimed-security:
length-public-key: 64
length-secret-key: 2093
length-signature: 2692
- name: XMSS-SHA2_20_256
claimed-nist-level:
claimed-security:
- name: XMSS-SHA2_20_256
claimed-nist-level:
claimed-security:
length-public-key: 64
length-secret-key: 2573
length-signature: 2820
- name: XMSS-SHAKE_10_256
claimed-nist-level:
claimed-security:
claimed-nist-level:
claimed-security:
length-public-key: 64
length-secret-key: 1373
length-signature: 2500
- name: XMSS-SHAKE_16_256
claimed-nist-level:
claimed-security:
- name: XMSS-SHAKE_16_256
claimed-nist-level:
claimed-security:
length-public-key: 64
length-secret-key: 2093
length-signature: 2692
- name: XMSS-SHAKE_20_256
claimed-nist-level:
claimed-security:
claimed-nist-level:
claimed-security:
length-public-key: 64
length-secret-key: 2573
length-signature: 2820
- name: XMSS-SHA2_10_512
claimed-nist-level:
claimed-security:
claimed-nist-level:
claimed-security:
length-public-key: 128
length-secret-key: 2653
length-signature: 9092
- name: XMSS-SHA2_16_512
claimed-nist-level:
claimed-security:
claimed-nist-level:
claimed-security:
length-public-key: 128
length-secret-key: 4045
length-signature: 9476
- name: XMSS-SHA2_20_512
claimed-nist-level:
claimed-security:
claimed-nist-level:
claimed-security:
length-public-key: 128
length-secret-key: 2653
length-signature: 9732
- name: XMSS-SHAKE_10_512
claimed-nist-level:
claimed-security:
- name: XMSS-SHAKE_10_512
claimed-nist-level:
claimed-security:
length-public-key: 128
length-secret-key: 2653
length-signature: 9092
- name: XMSS-SHAKE_16_512
claimed-nist-level:
claimed-security:
- name: XMSS-SHAKE_16_512
claimed-nist-level:
claimed-security:
length-public-key: 128
length-secret-key: 4045
length-signature: 9476
- name: XMSS-SHAKE_20_512
claimed-nist-level:
claimed-security:
claimed-nist-level:
claimed-security:
length-public-key: 128
length-secret-key: 4973
length-signature: 9732
- name: XMSS-SHA2_10_192
claimed-nist-level:
claimed-security:
length-public-key: 48
length-secret-key: 1053
length-signature: 1492
- name: XMSS-SHA2_16_192
claimed-nist-level:
claimed-security:
length-public-key: 48
length-secret-key: 1605
length-signature: 1636
- name: XMSS-SHA2_20_192
claimed-nist-level:
claimed-security:
length-public-key: 48
length-secret-key: 1973
length-signature: 1732
- name: XMSSMT-SHA2_20/2_256
claimed-nist-level:
claimed-security:
claimed-nist-level:
claimed-security:
length-public-key: 64
length-secret-key: 5998
length-signature: 4963
- name: XMSSMT-SHA2_20/4_256
claimed-nist-level:
claimed-security:
claimed-nist-level:
claimed-security:
length-public-key: 64
length-secret-key: 10938
length-signature: 9251
- name: XMSSMT-SHA2_40/2_256
claimed-nist-level:
claimed-security:
claimed-nist-level:
claimed-security:
length-public-key: 64
length-secret-key: 9600
length-signature: 5605
- name: XMSSMT-SHA2_40/4_256
claimed-nist-level:
claimed-security:
claimed-nist-level:
claimed-security:
length-public-key: 64
length-secret-key: 15252
length-signature: 9893
- name: XMSSMT-SHA2_40/8_256
claimed-nist-level:
claimed-security:
claimed-nist-level:
claimed-security:
length-public-key: 64
length-secret-key: 24516
length-signature: 18469
- name: XMSSMT-SHA2_60/3_256
claimed-nist-level:
claimed-security:
claimed-nist-level:
claimed-security:
length-public-key: 64
length-secret-key: 16629
length-signature: 8392
- name: XMSSMT-SHA2_60/6_256
claimed-nist-level:
claimed-security:
claimed-nist-level:
claimed-security:
length-public-key: 64
length-secret-key: 24507
length-signature: 14824
- name: XMSSMT-SHA2_60/12_256
claimed-nist-level:
claimed-security:
claimed-nist-level:
claimed-security:
length-public-key: 64
length-secret-key: 38095
length-signature: 27688
- name: XMSSMT-SHAKE_20/2_256
claimed-nist-level:
claimed-security:
claimed-nist-level:
claimed-security:
length-public-key: 64
length-secret-key: 5998
length-signature: 4963
- name: XMSSMT-SHAKE_20/4_256
claimed-nist-level:
claimed-security:
claimed-nist-level:
claimed-security:
length-public-key: 64
length-secret-key: 10938
length-signature: 9251
- name: XMSSMT-SHAKE_40/2_256
claimed-nist-level:
claimed-security:
claimed-nist-level:
claimed-security:
length-public-key: 64
length-secret-key: 9600
length-signature: 5605
- name: XMSSMT-SHAKE_40/4_256
claimed-nist-level:
claimed-security:
- name: XMSSMT-SHAKE_40/4_256
claimed-nist-level:
claimed-security:
length-public-key: 64
length-secret-key: 15252
length-signature: 9893
- name: XMSSMT-SHAKE_40/8_256
claimed-nist-level:
claimed-security:
claimed-nist-level:
claimed-security:
length-public-key: 64
length-secret-key: 24516
length-signature: 18469
length-signature: 18469
- name: XMSSMT-SHAKE_60/3_256
claimed-nist-level:
claimed-security:
claimed-nist-level:
claimed-security:
length-public-key: 64
length-secret-key: 24516
length-signature: 8392
length-signature: 8392
- name: XMSSMT-SHAKE_60/6_256
claimed-nist-level:
claimed-security:
claimed-nist-level:
claimed-security:
length-public-key: 64
length-secret-key: 24507
length-signature: 14824
- name: XMSSMT-SHAKE_60/12_256
claimed-nist-level:
claimed-security:
claimed-nist-level:
claimed-security:
length-public-key: 64
length-secret-key: 38095
length-signature: 27688
length-signature: 27688
4 changes: 4 additions & 0 deletions src/oqsconfig.h.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,10 @@
#cmakedefine OQS_ENABLE_SIG_STFL_xmss_shake256_h10 1
#cmakedefine OQS_ENABLE_SIG_STFL_xmss_shake256_h16 1
#cmakedefine OQS_ENABLE_SIG_STFL_xmss_shake256_h20 1
#cmakedefine OQS_ENABLE_SIG_STFL_xmss_sha256_h10_192 1
#cmakedefine OQS_ENABLE_SIG_STFL_xmss_sha256_h16_192 1
#cmakedefine OQS_ENABLE_SIG_STFL_xmss_sha256_h20_192 1

#cmakedefine OQS_ENABLE_SIG_STFL_xmssmt_sha256_h20_2 1
#cmakedefine OQS_ENABLE_SIG_STFL_xmssmt_sha256_h20_4 1
#cmakedefine OQS_ENABLE_SIG_STFL_xmssmt_sha256_h40_2 1
Expand Down
57 changes: 57 additions & 0 deletions src/sig_stfl/sig_stfl.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ OQS_API const char *OQS_SIG_STFL_alg_identifier(size_t i) {
OQS_SIG_STFL_alg_xmss_shake256_h10,
OQS_SIG_STFL_alg_xmss_shake256_h16,
OQS_SIG_STFL_alg_xmss_shake256_h20,
OQS_SIG_STFL_alg_xmss_sha256_h10_192,
OQS_SIG_STFL_alg_xmss_sha256_h16_192,
OQS_SIG_STFL_alg_xmss_sha256_h20_192,
OQS_SIG_STFL_alg_xmssmt_sha256_h20_2,
OQS_SIG_STFL_alg_xmssmt_sha256_h20_4,
OQS_SIG_STFL_alg_xmssmt_sha256_h40_2,
Expand Down Expand Up @@ -183,6 +186,24 @@ OQS_API int OQS_SIG_STFL_alg_is_enabled(const char *method_name) {
return 1;
#else
return 0;
#endif
} else if (0 == strcasecmp(method_name, OQS_SIG_STFL_alg_xmss_sha256_h10_192)) {
#ifdef OQS_ENABLE_SIG_STFL_xmss_sha256_h10_192
return 1;
#else
return 0;
#endif
} else if (0 == strcasecmp(method_name, OQS_SIG_STFL_alg_xmss_sha256_h16_192)) {
#ifdef OQS_ENABLE_SIG_STFL_xmss_sha256_h16_192
return 1;
#else
return 0;
#endif
} else if (0 == strcasecmp(method_name, OQS_SIG_STFL_alg_xmss_sha256_h20_192)) {
#ifdef OQS_ENABLE_SIG_STFL_xmss_sha256_h20_192
return 1;
#else
return 0;
#endif
} else if (0 == strcasecmp(method_name, OQS_SIG_STFL_alg_xmssmt_sha256_h20_2)) {
#ifdef OQS_ENABLE_SIG_STFL_xmssmt_sha256_h20_2
Expand Down Expand Up @@ -571,6 +592,24 @@ OQS_API OQS_SIG_STFL *OQS_SIG_STFL_new(const char *method_name) {
return OQS_SIG_STFL_alg_xmss_shake256_h20_new();
#else
return NULL;
#endif
} else if (0 == strcasecmp(method_name, OQS_SIG_STFL_alg_xmss_sha256_h10_192)) {
#ifdef OQS_ENABLE_SIG_STFL_xmss_sha256_h10_192
return OQS_SIG_STFL_alg_xmss_sha256_h10_192_new();
#else
return NULL;
#endif
} else if (0 == strcasecmp(method_name, OQS_SIG_STFL_alg_xmss_sha256_h16_192)) {
#ifdef OQS_ENABLE_SIG_STFL_xmss_sha256_h16_192
return OQS_SIG_STFL_alg_xmss_sha256_h16_192_new();
#else
return NULL;
#endif
} else if (0 == strcasecmp(method_name, OQS_SIG_STFL_alg_xmss_sha256_h20_192)) {
#ifdef OQS_ENABLE_SIG_STFL_xmss_sha256_h20_192
return OQS_SIG_STFL_alg_xmss_sha256_h20_192_new();
#else
return NULL;
#endif
} else if (0 == strcasecmp(method_name, OQS_SIG_STFL_alg_xmssmt_sha256_h20_2)) {
#ifdef OQS_ENABLE_SIG_STFL_xmssmt_sha256_h20_2
Expand Down Expand Up @@ -1032,6 +1071,24 @@ OQS_API OQS_SIG_STFL_SECRET_KEY *OQS_SIG_STFL_SECRET_KEY_new(const char *method_
return OQS_SECRET_KEY_XMSS_SHAKE256_H20_new();
#else
return NULL;
#endif
} else if (0 == strcasecmp(method_name, OQS_SIG_STFL_alg_xmss_sha256_h10_192)) {
#ifdef OQS_ENABLE_SIG_STFL_xmss_sha256_h10_192
return OQS_SECRET_KEY_XMSS_SHA256_H10_192_new();
#else
return NULL;
#endif
} else if (0 == strcasecmp(method_name, OQS_SIG_STFL_alg_xmss_sha256_h16_192)) {
#ifdef OQS_ENABLE_SIG_STFL_xmss_sha256_h16_192
return OQS_SECRET_KEY_XMSS_SHA256_H16_192_new();
#else
return NULL;
#endif
} else if (0 == strcasecmp(method_name, OQS_SIG_STFL_alg_xmss_sha256_h20_192)) {
#ifdef OQS_ENABLE_SIG_STFL_xmss_sha256_h20_192
return OQS_SECRET_KEY_XMSS_SHA256_H20_192_new();
#else
return NULL;
#endif
} else if (0 == strcasecmp(method_name, OQS_SIG_STFL_alg_xmssmt_sha256_h20_2)) {
#ifdef OQS_ENABLE_SIG_STFL_xmssmt_sha256_h20_2
Expand Down
Loading
Loading