1
0

ml_kem_codecs.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  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. #ifndef PROV_ML_KEM_CODECS_H
  10. # define PROV_ML_KEM_CODECS_H
  11. # pragma once
  12. # ifndef OPENSSL_NO_ML_KEM
  13. # include <openssl/e_os2.h>
  14. # include "crypto/ml_kem.h"
  15. # include "prov/provider_ctx.h"
  16. # include "ml_common_codecs.h"
  17. __owur
  18. ML_KEM_KEY *ossl_ml_kem_d2i_PUBKEY(const uint8_t *pubenc, int publen,
  19. int evp_type, PROV_CTX *provctx,
  20. const char *propq);
  21. __owur
  22. ML_KEM_KEY *ossl_ml_kem_d2i_PKCS8(const uint8_t *prvenc, int prvlen,
  23. int evp_type, PROV_CTX *provctx,
  24. const char *propq);
  25. __owur
  26. int ossl_ml_kem_key_to_text(BIO *out, const ML_KEM_KEY *key, int selection);
  27. __owur
  28. __owur
  29. int ossl_ml_kem_i2d_pubkey(const ML_KEM_KEY *key, unsigned char **out);
  30. __owur
  31. __owur
  32. int ossl_ml_kem_i2d_prvkey(const ML_KEM_KEY *key, unsigned char **out,
  33. PROV_CTX *provctx);
  34. # endif /* OPENSSL_NO_ML_KEM */
  35. #endif /* PROV_ML_KEM_CODECS_H */