mirror of
https://github.com/open-quantum-safe/liboqs.git
synced 2025-10-03 00:02:36 -04:00
Compare commits
5 Commits
c9ff71e4d4
...
7f56720f65
Author | SHA1 | Date | |
---|---|---|---|
|
7f56720f65 | ||
|
e64026e27a | ||
|
2aa95f1fea | ||
|
0c9c664745 | ||
|
0b96e6b633 |
3
.github/actionlint.yaml
vendored
3
.github/actionlint.yaml
vendored
@ -5,3 +5,6 @@ config-variables:
|
|||||||
# - DEFAULT_RUNNER
|
# - DEFAULT_RUNNER
|
||||||
# - JOB_NAME
|
# - JOB_NAME
|
||||||
# - ENVIRONMENT_STAGE
|
# - ENVIRONMENT_STAGE
|
||||||
|
self-hosted-runner:
|
||||||
|
labels:
|
||||||
|
- oqs-x64
|
||||||
|
2
.github/workflows/extended.yml
vendored
2
.github/workflows/extended.yml
vendored
@ -20,7 +20,7 @@ jobs:
|
|||||||
SKIP_ALGS: 'SPHINCS\+-SHA(.)*s-simple,SPHINCS\+-SHAKE-(.)*,SLH_DSA_(SHA2|SHA3|SHAKE_128)(.)*'
|
SKIP_ALGS: 'SPHINCS\+-SHA(.)*s-simple,SPHINCS\+-SHAKE-(.)*,SLH_DSA_(SHA2|SHA3|SHAKE_128)(.)*'
|
||||||
- name: extensions
|
- name: extensions
|
||||||
container: openquantumsafe/ci-ubuntu-latest:latest
|
container: openquantumsafe/ci-ubuntu-latest:latest
|
||||||
CMAKE_ARGS: -DOQS_DIST_BUILD=OFF -DOQS_OPT_TARGET=auto -DCMAKE_BUILD_TYPE=Debug -DOQS_ENABLE_TEST_CONSTANT_TIME=ON
|
CMAKE_ARGS: -DOQS_DIST_BUILD=OFF -DOQS_OPT_TARGET=haswell -DCMAKE_BUILD_TYPE=Debug -DOQS_ENABLE_TEST_CONSTANT_TIME=ON
|
||||||
PYTEST_ARGS: --numprocesses=auto -k 'test_constant_time'
|
PYTEST_ARGS: --numprocesses=auto -k 'test_constant_time'
|
||||||
SKIP_ALGS: 'SPHINCS\+-SHA(.)*s-simple,SPHINCS\+-SHAKE-(.)*,SLH_DSA_(SHA2|SHA3|SHAKE_128)(.)*'
|
SKIP_ALGS: 'SPHINCS\+-SHA(.)*s-simple,SPHINCS\+-SHAKE-(.)*,SLH_DSA_(SHA2|SHA3|SHAKE_128)(.)*'
|
||||||
container:
|
container:
|
||||||
|
2
.github/workflows/zephyr.yml
vendored
2
.github/workflows/zephyr.yml
vendored
@ -8,7 +8,7 @@ on: [workflow_call, workflow_dispatch]
|
|||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
zephyr_test:
|
zephyr_test:
|
||||||
runs-on: ubuntu-22.04
|
runs-on: oqs-x64
|
||||||
container: ghcr.io/zephyrproject-rtos/ci:v0.27.4
|
container: ghcr.io/zephyrproject-rtos/ci:v0.27.4
|
||||||
env:
|
env:
|
||||||
CMAKE_PREFIX_PATH: /opt/toolchains
|
CMAKE_PREFIX_PATH: /opt/toolchains
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
- **Source**: https://github.com/open-quantum-safe/liboqs-cupqc-meta/commit/b026f4e5475cd9c20c2082c7d9bad80e5b0ba89e
|
- **Source**: https://github.com/open-quantum-safe/liboqs-cupqc-meta/commit/b026f4e5475cd9c20c2082c7d9bad80e5b0ba89e
|
||||||
- **Implementation license (SPDX-Identifier)**: Apache-2.0
|
- **Implementation license (SPDX-Identifier)**: Apache-2.0
|
||||||
- **icicle-icicle_cuda**:<a name="icicle-icicle_cuda"></a>
|
- **icicle-icicle_cuda**:<a name="icicle-icicle_cuda"></a>
|
||||||
- **Source**: https://github.com/ingonyama-zk/icicle-liboqs/commit/8f215fd845928abfc2bb7d5ca15db76b839bee5c
|
- **Source**: https://github.com/ingonyama-zk/icicle-liboqs/commit/4ea3e612ff26e3e72b5e5bcfff4cf3dda45dc0a8
|
||||||
- **Implementation license (SPDX-Identifier)**: MIT
|
- **Implementation license (SPDX-Identifier)**: MIT
|
||||||
|
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@ optimized-upstreams:
|
|||||||
source: https://github.com/open-quantum-safe/liboqs-cupqc-meta/commit/b026f4e5475cd9c20c2082c7d9bad80e5b0ba89e
|
source: https://github.com/open-quantum-safe/liboqs-cupqc-meta/commit/b026f4e5475cd9c20c2082c7d9bad80e5b0ba89e
|
||||||
spdx-license-identifier: Apache-2.0
|
spdx-license-identifier: Apache-2.0
|
||||||
icicle-icicle_cuda:
|
icicle-icicle_cuda:
|
||||||
source: https://github.com/ingonyama-zk/icicle-liboqs/commit/8f215fd845928abfc2bb7d5ca15db76b839bee5c
|
source: https://github.com/ingonyama-zk/icicle-liboqs/commit/4ea3e612ff26e3e72b5e5bcfff4cf3dda45dc0a8
|
||||||
spdx-license-identifier: MIT
|
spdx-license-identifier: MIT
|
||||||
parameter-sets:
|
parameter-sets:
|
||||||
- name: ML-KEM-512
|
- name: ML-KEM-512
|
||||||
|
@ -51,10 +51,10 @@ upstreams:
|
|||||||
name: icicle
|
name: icicle
|
||||||
git_url: https://github.com/ingonyama-zk/icicle-liboqs.git
|
git_url: https://github.com/ingonyama-zk/icicle-liboqs.git
|
||||||
git_branch: main
|
git_branch: main
|
||||||
git_commit: 8f215fd845928abfc2bb7d5ca15db76b839bee5c
|
git_commit: 4ea3e612ff26e3e72b5e5bcfff4cf3dda45dc0a8
|
||||||
kem_meta_path: '{pretty_name_full}_META.yml'
|
kem_meta_path: '{pretty_name_full}_META.yml'
|
||||||
kem_scheme_path: '.'
|
kem_scheme_path: '.'
|
||||||
patches: [icicle-mlkem-enc-derand.patch]
|
patches: []
|
||||||
-
|
-
|
||||||
name: pqcrystals-dilithium-standard
|
name: pqcrystals-dilithium-standard
|
||||||
git_url: https://github.com/pq-crystals/dilithium.git
|
git_url: https://github.com/pq-crystals/dilithium.git
|
||||||
|
@ -1,102 +0,0 @@
|
|||||||
diff --git a/ML-KEM-1024_META.yml b/ML-KEM-1024_META.yml
|
|
||||||
index 5ad054f..49aa71a 100644
|
|
||||||
--- a/ML-KEM-1024_META.yml
|
|
||||||
+++ b/ML-KEM-1024_META.yml
|
|
||||||
@@ -25,10 +25,11 @@ implementations:
|
|
||||||
version: FIPS203
|
|
||||||
signature_keypair: icicle_ml_kem_1024_keypair
|
|
||||||
signature_enc: icicle_ml_kem_1024_enc
|
|
||||||
+ signature_enc_derand: icicle_ml_kem_1024_enc_derand
|
|
||||||
signature_dec: icicle_ml_kem_1024_dec
|
|
||||||
sources: ./ml-kem-1024/icicle_ml-kem.cpp
|
|
||||||
supported_platforms:
|
|
||||||
- architecture: CUDA
|
|
||||||
operating_systems:
|
|
||||||
- Linux
|
|
||||||
- - Darwin
|
|
||||||
\ No newline at end of file
|
|
||||||
+ - Darwin
|
|
||||||
diff --git a/ML-KEM-512_META.yml b/ML-KEM-512_META.yml
|
|
||||||
index c14cf33..c93caa1 100644
|
|
||||||
--- a/ML-KEM-512_META.yml
|
|
||||||
+++ b/ML-KEM-512_META.yml
|
|
||||||
@@ -25,10 +25,11 @@ implementations:
|
|
||||||
version: FIPS203
|
|
||||||
signature_keypair: icicle_ml_kem_512_keypair
|
|
||||||
signature_enc: icicle_ml_kem_512_enc
|
|
||||||
+ signature_enc_derand: icicle_ml_kem_512_enc_derand
|
|
||||||
signature_dec: icicle_ml_kem_512_dec
|
|
||||||
sources: ./ml-kem-512/icicle_ml-kem.cpp
|
|
||||||
supported_platforms:
|
|
||||||
- architecture: CUDA
|
|
||||||
operating_systems:
|
|
||||||
- Linux
|
|
||||||
- - Darwin
|
|
||||||
\ No newline at end of file
|
|
||||||
+ - Darwin
|
|
||||||
diff --git a/ML-KEM-768_META.yml b/ML-KEM-768_META.yml
|
|
||||||
index a1b88a8..1d580a8 100644
|
|
||||||
--- a/ML-KEM-768_META.yml
|
|
||||||
+++ b/ML-KEM-768_META.yml
|
|
||||||
@@ -25,10 +25,11 @@ implementations:
|
|
||||||
version: FIPS203
|
|
||||||
signature_keypair: icicle_ml_kem_768_keypair
|
|
||||||
signature_enc: icicle_ml_kem_768_enc
|
|
||||||
+ signature_enc_derand: icicle_ml_kem_768_enc_derand
|
|
||||||
signature_dec: icicle_ml_kem_768_dec
|
|
||||||
sources: ./ml-kem-768/icicle_ml-kem.cpp
|
|
||||||
supported_platforms:
|
|
||||||
- architecture: CUDA
|
|
||||||
operating_systems:
|
|
||||||
- Linux
|
|
||||||
- - Darwin
|
|
||||||
\ No newline at end of file
|
|
||||||
+ - Darwin
|
|
||||||
diff --git a/icicle_cuda/ml-kem-1024/icicle_ml-kem.cpp b/icicle_cuda/ml-kem-1024/icicle_ml-kem.cpp
|
|
||||||
index 33b38cb..793afb6 100644
|
|
||||||
--- a/icicle_cuda/ml-kem-1024/icicle_ml-kem.cpp
|
|
||||||
+++ b/icicle_cuda/ml-kem-1024/icicle_ml-kem.cpp
|
|
||||||
@@ -25,6 +25,11 @@ OQS_STATUS icicle_ml_kem_1024_enc(uint8_t *ct, uint8_t *ss, const uint8_t *pk) {
|
|
||||||
return icicle::pqc::ml_kem::encapsulate<icicle::pqc::ml_kem::Kyber1024Params>((std::byte*)coins, (std::byte*)pk, config, (std::byte*)ct, (std::byte*)ss) == icicle::eIcicleError::SUCCESS ? OQS_SUCCESS : OQS_ERROR;
|
|
||||||
}
|
|
||||||
|
|
||||||
+OQS_STATUS icicle_ml_kem_1024_enc_derand(uint8_t *ct, uint8_t *ss, const uint8_t *pk, const uint8_t *coins) {
|
|
||||||
+ icicle::pqc::ml_kem::MlKemConfig config;
|
|
||||||
+ return icicle::pqc::ml_kem::encapsulate<icicle::pqc::ml_kem::Kyber1024Params>((std::byte*)coins, (std::byte*)pk, config, (std::byte*)ct, (std::byte*)ss) == icicle::eIcicleError::SUCCESS ? OQS_SUCCESS : OQS_ERROR;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
OQS_STATUS icicle_ml_kem_1024_dec(uint8_t *ss, const uint8_t *ct, const uint8_t *sk) {
|
|
||||||
icicle::pqc::ml_kem::MlKemConfig config;
|
|
||||||
return icicle::pqc::ml_kem::decapsulate<icicle::pqc::ml_kem::Kyber1024Params>((std::byte*)sk, (std::byte*)ct, config, (std::byte*)ss) == icicle::eIcicleError::SUCCESS ? OQS_SUCCESS : OQS_ERROR;
|
|
||||||
diff --git a/icicle_cuda/ml-kem-512/icicle_ml-kem.cpp b/icicle_cuda/ml-kem-512/icicle_ml-kem.cpp
|
|
||||||
index 89c4211..f73c539 100644
|
|
||||||
--- a/icicle_cuda/ml-kem-512/icicle_ml-kem.cpp
|
|
||||||
+++ b/icicle_cuda/ml-kem-512/icicle_ml-kem.cpp
|
|
||||||
@@ -25,6 +25,11 @@ OQS_STATUS icicle_ml_kem_512_enc(uint8_t *ct, uint8_t *ss, const uint8_t *pk) {
|
|
||||||
return icicle::pqc::ml_kem::encapsulate<icicle::pqc::ml_kem::Kyber512Params>((std::byte*)coins, (std::byte*)pk, config, (std::byte*)ct, (std::byte*)ss) == icicle::eIcicleError::SUCCESS ? OQS_SUCCESS : OQS_ERROR;
|
|
||||||
}
|
|
||||||
|
|
||||||
+OQS_STATUS icicle_ml_kem_512_enc_derand(uint8_t *ct, uint8_t *ss, const uint8_t *pk, const uint8_t *coins) {
|
|
||||||
+ icicle::pqc::ml_kem::MlKemConfig config;
|
|
||||||
+ return icicle::pqc::ml_kem::encapsulate<icicle::pqc::ml_kem::Kyber512Params>((std::byte*)coins, (std::byte*)pk, config, (std::byte*)ct, (std::byte*)ss) == icicle::eIcicleError::SUCCESS ? OQS_SUCCESS : OQS_ERROR;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
OQS_STATUS icicle_ml_kem_512_dec(uint8_t *ss, const uint8_t *ct, const uint8_t *sk) {
|
|
||||||
icicle::pqc::ml_kem::MlKemConfig config;
|
|
||||||
return icicle::pqc::ml_kem::decapsulate<icicle::pqc::ml_kem::Kyber512Params>((std::byte*)sk, (std::byte*)ct, config, (std::byte*)ss) == icicle::eIcicleError::SUCCESS ? OQS_SUCCESS : OQS_ERROR;
|
|
||||||
diff --git a/icicle_cuda/ml-kem-768/icicle_ml-kem.cpp b/icicle_cuda/ml-kem-768/icicle_ml-kem.cpp
|
|
||||||
index 33b38cb..793afb6 100644
|
|
||||||
--- a/icicle_cuda/ml-kem-768/icicle_ml-kem.cpp
|
|
||||||
+++ b/icicle_cuda/ml-kem-768/icicle_ml-kem.cpp
|
|
||||||
@@ -25,6 +25,11 @@ OQS_STATUS icicle_ml_kem_1024_enc(uint8_t *ct, uint8_t *ss, const uint8_t *pk) {
|
|
||||||
return icicle::pqc::ml_kem::encapsulate<icicle::pqc::ml_kem::Kyber1024Params>((std::byte*)coins, (std::byte*)pk, config, (std::byte*)ct, (std::byte*)ss) == icicle::eIcicleError::SUCCESS ? OQS_SUCCESS : OQS_ERROR;
|
|
||||||
}
|
|
||||||
|
|
||||||
+OQS_STATUS icicle_ml_kem_1024_enc_derand(uint8_t *ct, uint8_t *ss, const uint8_t *pk, const uint8_t *coins) {
|
|
||||||
+ icicle::pqc::ml_kem::MlKemConfig config;
|
|
||||||
+ return icicle::pqc::ml_kem::encapsulate<icicle::pqc::ml_kem::Kyber1024Params>((std::byte*)coins, (std::byte*)pk, config, (std::byte*)ct, (std::byte*)ss) == icicle::eIcicleError::SUCCESS ? OQS_SUCCESS : OQS_ERROR;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
OQS_STATUS icicle_ml_kem_1024_dec(uint8_t *ss, const uint8_t *ct, const uint8_t *sk) {
|
|
||||||
icicle::pqc::ml_kem::MlKemConfig config;
|
|
||||||
return icicle::pqc::ml_kem::decapsulate<icicle::pqc::ml_kem::Kyber1024Params>((std::byte*)sk, (std::byte*)ct, config, (std::byte*)ss) == icicle::eIcicleError::SUCCESS ? OQS_SUCCESS : OQS_ERROR;
|
|
@ -8,31 +8,31 @@
|
|||||||
#include "icicle/errors.h"
|
#include "icicle/errors.h"
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#if defined(OQS_ENABLE_KEM_ml_kem_1024_icicle_cuda)
|
#if defined(OQS_ENABLE_KEM_ml_kem_768_icicle_cuda)
|
||||||
OQS_STATUS icicle_ml_kem_1024_keypair(uint8_t *pk, uint8_t *sk) {
|
OQS_STATUS icicle_ml_kem_768_keypair(uint8_t *pk, uint8_t *sk) {
|
||||||
uint8_t coins[icicle::pqc::ml_kem::ENTROPY_BYTES];
|
uint8_t coins[icicle::pqc::ml_kem::ENTROPY_BYTES];
|
||||||
OQS_randombytes(coins, icicle::pqc::ml_kem::ENTROPY_BYTES);
|
OQS_randombytes(coins, icicle::pqc::ml_kem::ENTROPY_BYTES);
|
||||||
|
|
||||||
icicle::pqc::ml_kem::MlKemConfig config;
|
icicle::pqc::ml_kem::MlKemConfig config;
|
||||||
return icicle::pqc::ml_kem::keygen<icicle::pqc::ml_kem::Kyber1024Params>((std::byte*)coins, config, (std::byte*)pk, (std::byte*)sk) == icicle::eIcicleError::SUCCESS ? OQS_SUCCESS : OQS_ERROR;
|
return icicle::pqc::ml_kem::keygen<icicle::pqc::ml_kem::Kyber768Params>((std::byte*)coins, config, (std::byte*)pk, (std::byte*)sk) == icicle::eIcicleError::SUCCESS ? OQS_SUCCESS : OQS_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
OQS_STATUS icicle_ml_kem_1024_enc(uint8_t *ct, uint8_t *ss, const uint8_t *pk) {
|
OQS_STATUS icicle_ml_kem_768_enc(uint8_t *ct, uint8_t *ss, const uint8_t *pk) {
|
||||||
uint8_t coins[icicle::pqc::ml_kem::MESSAGE_BYTES];
|
uint8_t coins[icicle::pqc::ml_kem::MESSAGE_BYTES];
|
||||||
OQS_randombytes(coins, icicle::pqc::ml_kem::MESSAGE_BYTES);
|
OQS_randombytes(coins, icicle::pqc::ml_kem::MESSAGE_BYTES);
|
||||||
|
|
||||||
icicle::pqc::ml_kem::MlKemConfig config;
|
icicle::pqc::ml_kem::MlKemConfig config;
|
||||||
return icicle::pqc::ml_kem::encapsulate<icicle::pqc::ml_kem::Kyber1024Params>((std::byte*)coins, (std::byte*)pk, config, (std::byte*)ct, (std::byte*)ss) == icicle::eIcicleError::SUCCESS ? OQS_SUCCESS : OQS_ERROR;
|
return icicle::pqc::ml_kem::encapsulate<icicle::pqc::ml_kem::Kyber768Params>((std::byte*)coins, (std::byte*)pk, config, (std::byte*)ct, (std::byte*)ss) == icicle::eIcicleError::SUCCESS ? OQS_SUCCESS : OQS_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
OQS_STATUS icicle_ml_kem_1024_enc_derand(uint8_t *ct, uint8_t *ss, const uint8_t *pk, const uint8_t *coins) {
|
OQS_STATUS icicle_ml_kem_768_enc_derand(uint8_t *ct, uint8_t *ss, const uint8_t *pk, const uint8_t *coins) {
|
||||||
icicle::pqc::ml_kem::MlKemConfig config;
|
icicle::pqc::ml_kem::MlKemConfig config;
|
||||||
return icicle::pqc::ml_kem::encapsulate<icicle::pqc::ml_kem::Kyber1024Params>((std::byte*)coins, (std::byte*)pk, config, (std::byte*)ct, (std::byte*)ss) == icicle::eIcicleError::SUCCESS ? OQS_SUCCESS : OQS_ERROR;
|
return icicle::pqc::ml_kem::encapsulate<icicle::pqc::ml_kem::Kyber768Params>((std::byte*)coins, (std::byte*)pk, config, (std::byte*)ct, (std::byte*)ss) == icicle::eIcicleError::SUCCESS ? OQS_SUCCESS : OQS_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
OQS_STATUS icicle_ml_kem_1024_dec(uint8_t *ss, const uint8_t *ct, const uint8_t *sk) {
|
OQS_STATUS icicle_ml_kem_768_dec(uint8_t *ss, const uint8_t *ct, const uint8_t *sk) {
|
||||||
icicle::pqc::ml_kem::MlKemConfig config;
|
icicle::pqc::ml_kem::MlKemConfig config;
|
||||||
return icicle::pqc::ml_kem::decapsulate<icicle::pqc::ml_kem::Kyber1024Params>((std::byte*)sk, (std::byte*)ct, config, (std::byte*)ss) == icicle::eIcicleError::SUCCESS ? OQS_SUCCESS : OQS_ERROR;
|
return icicle::pqc::ml_kem::decapsulate<icicle::pqc::ml_kem::Kyber768Params>((std::byte*)sk, (std::byte*)ct, config, (std::byte*)ss) == icicle::eIcicleError::SUCCESS ? OQS_SUCCESS : OQS_ERROR;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user