Buckets:
| /* | |
| * Copyright 2022-2024 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 | |
| */ | |
| /* APIs and data structures for HPKE (RFC9180) */ | |
| /* HPKE modes */ | |
| /* | |
| * Max for ikm, psk, pskid, info and exporter contexts. | |
| * RFC9180, section 7.2.1 RECOMMENDS 64 octets but we have test vectors from | |
| * Appendix A.6.1 with a 66 octet IKM so we'll allow that. | |
| */ | |
| /* | |
| * The (16bit) HPKE algorithm ID IANA codepoints | |
| * If/when new IANA codepoints are added there are tables in | |
| * crypto/hpke/hpke_util.c that must also be updated. | |
| */ | |
| /* strings for suite components */ | |
| /* | |
| * Roles for use in creating an OSSL_HPKE_CTX, most | |
| * important use of this is to control nonce reuse. | |
| */ | |
| extern "C" { | |
| typedef struct { | |
| uint16_t kem_id; /* Key Encapsulation Method id */ | |
| uint16_t kdf_id; /* Key Derivation Function id */ | |
| uint16_t aead_id; /* AEAD alg id */ | |
| } OSSL_HPKE_SUITE; | |
| /** | |
| * Suite constants, use this like: | |
| * OSSL_HPKE_SUITE myvar = OSSL_HPKE_SUITE_DEFAULT; | |
| */ | |
| typedef struct ossl_hpke_ctx_st OSSL_HPKE_CTX; | |
| OSSL_HPKE_CTX *OSSL_HPKE_CTX_new(int mode, OSSL_HPKE_SUITE suite, int role, | |
| OSSL_LIB_CTX *libctx, const char *propq); | |
| void OSSL_HPKE_CTX_free(OSSL_HPKE_CTX *ctx); | |
| int OSSL_HPKE_encap(OSSL_HPKE_CTX *ctx, | |
| unsigned char *enc, size_t *enclen, | |
| const unsigned char *pub, size_t publen, | |
| const unsigned char *info, size_t infolen); | |
| int OSSL_HPKE_seal(OSSL_HPKE_CTX *ctx, | |
| unsigned char *ct, size_t *ctlen, | |
| const unsigned char *aad, size_t aadlen, | |
| const unsigned char *pt, size_t ptlen); | |
| int OSSL_HPKE_keygen(OSSL_HPKE_SUITE suite, | |
| unsigned char *pub, size_t *publen, EVP_PKEY **priv, | |
| const unsigned char *ikm, size_t ikmlen, | |
| OSSL_LIB_CTX *libctx, const char *propq); | |
| int OSSL_HPKE_decap(OSSL_HPKE_CTX *ctx, | |
| const unsigned char *enc, size_t enclen, | |
| EVP_PKEY *recippriv, | |
| const unsigned char *info, size_t infolen); | |
| int OSSL_HPKE_open(OSSL_HPKE_CTX *ctx, | |
| unsigned char *pt, size_t *ptlen, | |
| const unsigned char *aad, size_t aadlen, | |
| const unsigned char *ct, size_t ctlen); | |
| int OSSL_HPKE_export(OSSL_HPKE_CTX *ctx, | |
| unsigned char *secret, | |
| size_t secretlen, | |
| const unsigned char *label, | |
| size_t labellen); | |
| int OSSL_HPKE_CTX_set1_authpriv(OSSL_HPKE_CTX *ctx, EVP_PKEY *priv); | |
| int OSSL_HPKE_CTX_set1_authpub(OSSL_HPKE_CTX *ctx, | |
| const unsigned char *pub, | |
| size_t publen); | |
| int OSSL_HPKE_CTX_set1_psk(OSSL_HPKE_CTX *ctx, | |
| const char *pskid, | |
| const unsigned char *psk, size_t psklen); | |
| int OSSL_HPKE_CTX_set1_ikme(OSSL_HPKE_CTX *ctx, | |
| const unsigned char *ikme, size_t ikmelen); | |
| int OSSL_HPKE_CTX_set_seq(OSSL_HPKE_CTX *ctx, uint64_t seq); | |
| int OSSL_HPKE_CTX_get_seq(OSSL_HPKE_CTX *ctx, uint64_t *seq); | |
| int OSSL_HPKE_suite_check(OSSL_HPKE_SUITE suite); | |
| int OSSL_HPKE_get_grease_value(const OSSL_HPKE_SUITE *suite_in, | |
| OSSL_HPKE_SUITE *suite, | |
| unsigned char *enc, size_t *enclen, | |
| unsigned char *ct, size_t ctlen, | |
| OSSL_LIB_CTX *libctx, const char *propq); | |
| int OSSL_HPKE_str2suite(const char *str, OSSL_HPKE_SUITE *suite); | |
| size_t OSSL_HPKE_get_ciphertext_size(OSSL_HPKE_SUITE suite, size_t clearlen); | |
| size_t OSSL_HPKE_get_public_encap_size(OSSL_HPKE_SUITE suite); | |
| size_t OSSL_HPKE_get_recommended_ikmelen(OSSL_HPKE_SUITE suite); | |
| } | |
Xet Storage Details
- Size:
- 6.08 kB
- Xet hash:
- b2e40df9903a9b02252600b067ef9dfb225ab3d2d1d742c920d871cea6e93826
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.