mirror of
https://github.com/open-quantum-safe/liboqs.git
synced 2025-12-08 00:02:59 -05:00
Run big stack usage tests on main thread
This commit is contained in:
parent
2a2393d097
commit
f437663bd0
@ -37,10 +37,10 @@ More information on OQS can be found [here](https://openquantumsafe.org/) and in
|
||||
#### Key encapsulation mechanisms
|
||||
|
||||
- **BIKE**: BIKE1-L1-CPA, BIKE1-L3-CPA, BIKE1-L1-FO, BIKE1-L3-FO
|
||||
- **Classic McEliece**: Classic-McEliece-348864, Classic-McEliece-348864f, Classic-McEliece-460896, Classic-McEliece-460896f, Classic-McEliece-6688128, Classic-McEliece-6688128f, Classic-McEliece-6960119, Classic-McEliece-6960119f, Classic-McEliece-8192128, Classic-McEliece-8192128f
|
||||
- **Classic McEliece**: Classic-McEliece-348864†, Classic-McEliece-348864f†, Classic-McEliece-460896†, Classic-McEliece-460896f†, Classic-McEliece-6688128†, Classic-McEliece-6688128f†, Classic-McEliece-6960119†, Classic-McEliece-6960119f†, Classic-McEliece-8192128†, Classic-McEliece-8192128f†
|
||||
- **FrodoKEM**: FrodoKEM-640-AES, FrodoKEM-640-SHAKE, FrodoKEM-976-AES, FrodoKEM-976-SHAKE, FrodoKEM-1344-AES, FrodoKEM-1344-SHAKE
|
||||
- **Kyber**: Kyber512, Kyber768, Kyber1024, Kyber512-90s, Kyber768-90s, Kyber1024-90s
|
||||
- **LEDAcrypt**: LEDAcryptKEM-LT12, LEDAcryptKEM-LT32, LEDAcryptKEM-LT52
|
||||
- **LEDAcrypt**: LEDAcryptKEM-LT12, LEDAcryptKEM-LT32, LEDAcryptKEM-LT52†
|
||||
- **NewHope**: NewHope-512-CCA, NewHope-1024-CCA
|
||||
- **NTRU**: NTRU-HPS-2048-509, NTRU-HPS-2048-677, NTRU-HPS-4096-821, NTRU-HRSS-701
|
||||
- **SABER**: LightSaber-KEM, Saber-KEM, FireSaber-KEM
|
||||
@ -54,11 +54,13 @@ More information on OQS can be found [here](https://openquantumsafe.org/) and in
|
||||
- **MQDSS**: MQDSS-31-48, MQDSS-31-64
|
||||
- **Picnic**: Picnic-L1-FS, Picnic-L1-UR, Picnic-L3-FS, Picnic-L3-UR, Picnic-L5-FS, Picnic-L5-UR, Picnic2-L1-FS, Picnic2-L3-FS, Picnic2-L5-FS
|
||||
- **qTesla**: qTesla-p-I, qTesla-p-III
|
||||
- **Rainbow**: Rainbow-Ia-Classic, Rainbow-Ia-Cyclic, Rainbow-Ia-Cyclic-Compressed, Rainbow-IIIc-Classic, Rainbow-IIIc-Cyclic, Rainbow-IIIc-Cyclic-Compressed, Rainbow-Vc-Classic, Rainbow-Vc-Cyclic, Rainbow-Vc-Cyclic-Compressed
|
||||
- **Rainbow**: Rainbow-Ia-Classic, Rainbow-Ia-Cyclic, Rainbow-Ia-Cyclic-Compressed, Rainbow-IIIc-Classic†, Rainbow-IIIc-Cyclic†, Rainbow-IIIc-Cyclic-Compressed†, Rainbow-Vc-Classic†, Rainbow-Vc-Cyclic†, Rainbow-Vc-Cyclic-Compressed†
|
||||
- **SPHINCS+-Haraka**: SPHINCS+-Haraka-128f-robust, SPHINCS+-Haraka-128f-simple, SPHINCS+-Haraka-128s-robust, SPHINCS+-Haraka-128s-simple, SPHINCS+-Haraka-192f-robust, SPHINCS+-Haraka-192f-simple, SPHINCS+-Haraka-192s-robust, SPHINCS+-Haraka-192s-simple, SPHINCS+-Haraka-256f-robust, SPHINCS+-Haraka-256f-simple, SPHINCS+-Haraka-256s-robust, SPHINCS+-Haraka-256s-simple
|
||||
- **SPHINCS+-SHA256**: SPHINCS+-SHA256-128f-robust, SPHINCS+-SHA256-128f-simple, SPHINCS+-SHA256-128s-robust, SPHINCS+-SHA256-128s-simple, SPHINCS+-SHA256-192f-robust, SPHINCS+-SHA256-192f-simple, SPHINCS+-SHA256-192s-robust, SPHINCS+-SHA256-192s-simple, SPHINCS+-SHA256-256f-robust, SPHINCS+-SHA256-256f-simple, SPHINCS+-SHA256-256s-robust, SPHINCS+-SHA256-256s-simple
|
||||
- **SPHINCS+-SHAKE256**: SPHINCS+-SHAKE256-128f-robust, SPHINCS+-SHAKE256-128f-simple, SPHINCS+-SHAKE256-128s-robust, SPHINCS+-SHAKE256-128s-simple, SPHINCS+-SHAKE256-192f-robust, SPHINCS+-SHAKE256-192f-simple, SPHINCS+-SHAKE256-192s-robust, SPHINCS+-SHAKE256-192s-simple, SPHINCS+-SHAKE256-256f-robust, SPHINCS+-SHAKE256-256f-simple, SPHINCS+-SHAKE256-256s-robust, SPHINCS+-SHAKE256-256s-simple
|
||||
|
||||
Note that algorithms marked with a dagger (†) have large stack usage and may cause failures when run on threads or in constrained environments.
|
||||
|
||||
### Limitations and Security
|
||||
|
||||
As research advances, the supported algorithms may see rapid changes in their security, and may even prove insecure against both classical and quantum computers.
|
||||
|
||||
@ -166,15 +166,20 @@ int main(int argc, char **argv) {
|
||||
}
|
||||
OQS_STATUS rc;
|
||||
#if OQS_USE_PTHREADS_IN_TESTS
|
||||
pthread_t thread;
|
||||
void *status;
|
||||
int trc = pthread_create(&thread, NULL, test_wrapper, alg_name);
|
||||
if (trc) {
|
||||
fprintf(stderr, "ERROR: Creating pthread\n");
|
||||
return EXIT_FAILURE;
|
||||
// don't run Classic McEliece or LEDAcryptKEM-LT52 in threads because of large stack usage
|
||||
if ((strnstr(alg_name, "Classic-McEliece", 16) == NULL) && (strnstr(alg_name, "LEDAcryptKEM-LT52", 17) == NULL)) {
|
||||
pthread_t thread;
|
||||
void *status;
|
||||
int trc = pthread_create(&thread, NULL, test_wrapper, alg_name);
|
||||
if (trc) {
|
||||
fprintf(stderr, "ERROR: Creating pthread\n");
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
pthread_join(thread, &status);
|
||||
rc = (OQS_STATUS) status;
|
||||
} else {
|
||||
rc = kem_test_correctness(alg_name);
|
||||
}
|
||||
pthread_join(thread, &status);
|
||||
rc = (OQS_STATUS) status;
|
||||
#else
|
||||
rc = kem_test_correctness(alg_name);
|
||||
#endif
|
||||
|
||||
@ -126,15 +126,20 @@ int main(int argc, char **argv) {
|
||||
}
|
||||
OQS_STATUS rc;
|
||||
#if OQS_USE_PTHREADS_IN_TESTS
|
||||
pthread_t thread;
|
||||
void *status;
|
||||
int trc = pthread_create(&thread, NULL, test_wrapper, alg_name);
|
||||
if (trc) {
|
||||
fprintf(stderr, "ERROR: Creating pthread\n");
|
||||
return EXIT_FAILURE;
|
||||
// don't run Rainbow IIIc and Vc in threads because of large stack usage
|
||||
if ((strnstr(alg_name, "Rainbow-IIIc", 12) == NULL) && (strnstr(alg_name, "Rainbow-Vc", 10) == NULL)) {
|
||||
pthread_t thread;
|
||||
void *status;
|
||||
int trc = pthread_create(&thread, NULL, test_wrapper, alg_name);
|
||||
if (trc) {
|
||||
fprintf(stderr, "ERROR: Creating pthread\n");
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
pthread_join(thread, &status);
|
||||
rc = (OQS_STATUS) status;
|
||||
} else {
|
||||
rc = sig_test_correctness(alg_name);
|
||||
}
|
||||
pthread_join(thread, &status);
|
||||
rc = (OQS_STATUS) status;
|
||||
#else
|
||||
rc = sig_test_correctness(alg_name);
|
||||
#endif
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user