aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/restricted/aws/s2n/tls/s2n_kem.h
diff options
context:
space:
mode:
authorrobot-contrib <robot-contrib@yandex-team.com>2022-12-29 11:19:28 +0300
committerrobot-contrib <robot-contrib@yandex-team.com>2022-12-29 11:19:28 +0300
commitfed8d432668e1993b6d0d429398d65aa40f3f5fe (patch)
tree5b837c62d01f3fcdafb6a31ae4914f530053c5b9 /contrib/restricted/aws/s2n/tls/s2n_kem.h
parentd6e1a495bd3ea25012ef907b23327e085f36be1c (diff)
downloadydb-fed8d432668e1993b6d0d429398d65aa40f3f5fe.tar.gz
Update contrib/restricted/aws/s2n to 1.3.31
Diffstat (limited to 'contrib/restricted/aws/s2n/tls/s2n_kem.h')
-rw-r--r--contrib/restricted/aws/s2n/tls/s2n_kem.h19
1 files changed, 10 insertions, 9 deletions
diff --git a/contrib/restricted/aws/s2n/tls/s2n_kem.h b/contrib/restricted/aws/s2n/tls/s2n_kem.h
index 44f16ecc72..17ec8fe105 100644
--- a/contrib/restricted/aws/s2n/tls/s2n_kem.h
+++ b/contrib/restricted/aws/s2n/tls/s2n_kem.h
@@ -16,10 +16,11 @@
#pragma once
#include <stdint.h>
+
+#include "crypto/s2n_ecc_evp.h"
+#include "stuffer/s2n_stuffer.h"
#include "tls/s2n_crypto_constants.h"
#include "utils/s2n_blob.h"
-#include "stuffer/s2n_stuffer.h"
-#include "crypto/s2n_ecc_evp.h"
typedef uint16_t kem_extension_size;
typedef uint16_t kem_public_key_size;
@@ -27,7 +28,7 @@ typedef uint16_t kem_private_key_size;
typedef uint16_t kem_shared_secret_size;
typedef uint16_t kem_ciphertext_key_size;
-#define IN /* Indicates a necessary function input */
+#define IN /* Indicates a necessary function input */
#define OUT /* Indicates a function output */
struct s2n_kem {
@@ -75,12 +76,12 @@ extern const struct s2n_kem s2n_kyber_512_r3;
/* x25519 based tls13_kem_groups require EVP_APIS_SUPPORTED */
#if EVP_APIS_SUPPORTED
-#define S2N_SUPPORTED_KEM_GROUPS_COUNT 2
+ #define S2N_SUPPORTED_KEM_GROUPS_COUNT 2
#else
-#define S2N_SUPPORTED_KEM_GROUPS_COUNT 1
+ #define S2N_SUPPORTED_KEM_GROUPS_COUNT 1
#endif
-extern const struct s2n_kem_group* ALL_SUPPORTED_KEM_GROUPS[S2N_SUPPORTED_KEM_GROUPS_COUNT];
+extern const struct s2n_kem_group *ALL_SUPPORTED_KEM_GROUPS[S2N_SUPPORTED_KEM_GROUPS_COUNT];
/* secp256r1 KEM Groups */
extern const struct s2n_kem_group s2n_secp256r1_kyber_512_r3;
@@ -131,9 +132,9 @@ extern int s2n_kem_recv_ciphertext(struct s2n_stuffer *in, struct s2n_kem_params
/* sikep503r1 */
/* kyber512r3 */
-#define S2N_KYBER_512_R3_PUBLIC_KEY_BYTES 800
-#define S2N_KYBER_512_R3_SECRET_KEY_BYTES 1632
-#define S2N_KYBER_512_R3_CIPHERTEXT_BYTES 768
+#define S2N_KYBER_512_R3_PUBLIC_KEY_BYTES 800
+#define S2N_KYBER_512_R3_SECRET_KEY_BYTES 1632
+#define S2N_KYBER_512_R3_CIPHERTEXT_BYTES 768
#define S2N_KYBER_512_R3_SHARED_SECRET_BYTES 32
int s2n_kyber_512_r3_crypto_kem_keypair(OUT uint8_t *pk, OUT uint8_t *sk);
int s2n_kyber_512_r3_crypto_kem_enc(OUT uint8_t *ct, OUT uint8_t *ss, IN const uint8_t *pk);