aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--crypto/kyber/kyber.c1
-rw-r--r--crypto/kyber/kyber_test.cc1
-rw-r--r--include/openssl/experimental/kyber.h10
-rw-r--r--ssl/ssl_key_share.cc1
-rw-r--r--tool/speed.cc5
5 files changed, 15 insertions, 3 deletions
diff --git a/crypto/kyber/kyber.c b/crypto/kyber/kyber.c
index 0e97359..411ec48 100644
--- a/crypto/kyber/kyber.c
+++ b/crypto/kyber/kyber.c
@@ -12,6 +12,7 @@
* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */
+#define OPENSSL_UNSTABLE_EXPERIMENTAL_KYBER
#include <openssl/experimental/kyber.h>
#include <assert.h>
diff --git a/crypto/kyber/kyber_test.cc b/crypto/kyber/kyber_test.cc
index 9b05813..be384fc 100644
--- a/crypto/kyber/kyber_test.cc
+++ b/crypto/kyber/kyber_test.cc
@@ -20,6 +20,7 @@
#include <openssl/bytestring.h>
#include <openssl/ctrdrbg.h>
+#define OPENSSL_UNSTABLE_EXPERIMENTAL_KYBER
#include <openssl/experimental/kyber.h>
#include "../test/file_test.h"
diff --git a/include/openssl/experimental/kyber.h b/include/openssl/experimental/kyber.h
index e0268fc..e6e9e9a 100644
--- a/include/openssl/experimental/kyber.h
+++ b/include/openssl/experimental/kyber.h
@@ -22,6 +22,14 @@ extern "C" {
#endif
+#if defined(OPENSSL_UNSTABLE_EXPERIMENTAL_KYBER)
+// This header implements experimental, draft versions of not-yet-standardized
+// primitives. When the standard is complete, these functions will be removed
+// and replaced with the final, incompatible standard version. They are
+// available now for short-lived experiments, but must not be deployed anywhere
+// durable, such as a long-lived key store. To use these functions define
+// OPENSSL_UNSTABLE_EXPERIMENTAL_KYBER
+
// Kyber768.
//
// This implements the round-3 specification of Kyber, defined at
@@ -128,6 +136,8 @@ OPENSSL_EXPORT int KYBER_marshal_private_key(
OPENSSL_EXPORT int KYBER_parse_private_key(
struct KYBER_private_key *out_private_key, CBS *in);
+#endif // OPENSSL_UNSTABLE_EXPERIMENTAL_KYBER
+
#if defined(__cplusplus)
} // extern C
diff --git a/ssl/ssl_key_share.cc b/ssl/ssl_key_share.cc
index f4fda3f..419724c 100644
--- a/ssl/ssl_key_share.cc
+++ b/ssl/ssl_key_share.cc
@@ -24,6 +24,7 @@
#include <openssl/curve25519.h>
#include <openssl/ec.h>
#include <openssl/err.h>
+#define OPENSSL_UNSTABLE_EXPERIMENTAL_KYBER
#include <openssl/experimental/kyber.h>
#include <openssl/hrss.h>
#include <openssl/mem.h>
diff --git a/tool/speed.cc b/tool/speed.cc
index 827911c..4390e1e 100644
--- a/tool/speed.cc
+++ b/tool/speed.cc
@@ -25,8 +25,6 @@
#include <stdlib.h>
#include <string.h>
-#define OPENSSL_I_UNDERSTAND_EXPERIMENTAL_FUNCTION_RISK
-
#include <openssl/aead.h>
#include <openssl/aes.h>
#include <openssl/base64.h>
@@ -42,8 +40,9 @@
#include <openssl/evp.h>
#define OPENSSL_UNSTABLE_EXPERIMENTAL_DILITHIUM
#include <openssl/experimental/dilithium.h>
-#define OPENSSL_UNSTABLE_EXPERIMENTAL_SPX
+#define OPENSSL_UNSTABLE_EXPERIMENTAL_KYBER
#include <openssl/experimental/kyber.h>
+#define OPENSSL_UNSTABLE_EXPERIMENTAL_SPX
#include <openssl/experimental/spx.h>
#include <openssl/hrss.h>
#include <openssl/mem.h>