diff options
| author | Pierre Pronchery <khorben@FreeBSD.org> | 2025-06-27 21:41:09 +0000 |
|---|---|---|
| committer | Pierre Pronchery <khorben@FreeBSD.org> | 2025-08-07 11:53:44 +0000 |
| commit | 09a25192275b21412a51e3a2d5d6ff0eb147425d (patch) | |
| tree | c9d81e6f6c344d9d2f5b1eb326bd29dc24db1233 /providers/implementations/encode_decode/ml_kem_codecs.h | |
| parent | 29536654cc41bf41b92dc836c47496dc6fe0b00c (diff) | |
Diffstat (limited to 'providers/implementations/encode_decode/ml_kem_codecs.h')
| -rw-r--r-- | providers/implementations/encode_decode/ml_kem_codecs.h | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/providers/implementations/encode_decode/ml_kem_codecs.h b/providers/implementations/encode_decode/ml_kem_codecs.h new file mode 100644 index 000000000000..b8a22201ab17 --- /dev/null +++ b/providers/implementations/encode_decode/ml_kem_codecs.h @@ -0,0 +1,39 @@ +/* + * Copyright 2025 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the Apache License 2.0 (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#ifndef PROV_ML_KEM_CODECS_H +# define PROV_ML_KEM_CODECS_H +# pragma once + +# ifndef OPENSSL_NO_ML_KEM +# include <openssl/e_os2.h> +# include "crypto/ml_kem.h" +# include "prov/provider_ctx.h" +# include "ml_common_codecs.h" + +__owur +ML_KEM_KEY *ossl_ml_kem_d2i_PUBKEY(const uint8_t *pubenc, int publen, + int evp_type, PROV_CTX *provctx, + const char *propq); +__owur +ML_KEM_KEY *ossl_ml_kem_d2i_PKCS8(const uint8_t *prvenc, int prvlen, + int evp_type, PROV_CTX *provctx, + const char *propq); +__owur +int ossl_ml_kem_key_to_text(BIO *out, const ML_KEM_KEY *key, int selection); +__owur +__owur +int ossl_ml_kem_i2d_pubkey(const ML_KEM_KEY *key, unsigned char **out); +__owur +__owur +int ossl_ml_kem_i2d_prvkey(const ML_KEM_KEY *key, unsigned char **out, + PROV_CTX *provctx); + +# endif /* OPENSSL_NO_ML_KEM */ +#endif /* PROV_ML_KEM_CODECS_H */ |
