Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/freebsd-src
Path: blob/main/crypto/openssl/providers/implementations/encode_decode/ml_kem_codecs.h
48383 views
1
/*
2
* Copyright 2025 The OpenSSL Project Authors. All Rights Reserved.
3
*
4
* Licensed under the Apache License 2.0 (the "License"). You may not use
5
* this file except in compliance with the License. You can obtain a copy
6
* in the file LICENSE in the source distribution or at
7
* https://www.openssl.org/source/license.html
8
*/
9
10
#ifndef PROV_ML_KEM_CODECS_H
11
# define PROV_ML_KEM_CODECS_H
12
# pragma once
13
14
# ifndef OPENSSL_NO_ML_KEM
15
# include <openssl/e_os2.h>
16
# include "crypto/ml_kem.h"
17
# include "prov/provider_ctx.h"
18
# include "ml_common_codecs.h"
19
20
__owur
21
ML_KEM_KEY *ossl_ml_kem_d2i_PUBKEY(const uint8_t *pubenc, int publen,
22
int evp_type, PROV_CTX *provctx,
23
const char *propq);
24
__owur
25
ML_KEM_KEY *ossl_ml_kem_d2i_PKCS8(const uint8_t *prvenc, int prvlen,
26
int evp_type, PROV_CTX *provctx,
27
const char *propq);
28
__owur
29
int ossl_ml_kem_key_to_text(BIO *out, const ML_KEM_KEY *key, int selection);
30
__owur
31
__owur
32
int ossl_ml_kem_i2d_pubkey(const ML_KEM_KEY *key, unsigned char **out);
33
__owur
34
__owur
35
int ossl_ml_kem_i2d_prvkey(const ML_KEM_KEY *key, unsigned char **out,
36
PROV_CTX *provctx);
37
38
# endif /* OPENSSL_NO_ML_KEM */
39
#endif /* PROV_ML_KEM_CODECS_H */
40
41