Debian Codegraph @

debian/rust-vendor/aws-lc-sys/aws-lc/crypto/spake25519/internal.h

raw
1 // Copyright (c) 2016 Google Inc.
2 // SPDX-License-Identifier: ISC
3
4 #ifndef OPENSSL_HEADER_SPAKE25519_INTERNAL_H
5 #define OPENSSL_HEADER_SPAKE25519_INTERNAL_H
6
7 #if defined(__cplusplus)
8 extern "C" {
9 #endif
10
11 #include <openssl/base.h>
12 #include <openssl/curve25519.h>
13
14 enum spake2_state_t {
15 spake2_state_init = 0,
16 spake2_state_msg_generated,
17 spake2_state_key_generated,
18 };
19
20 struct spake2_ctx_st {
21 uint8_t private_key[32];
22 uint8_t my_msg[32];
23 uint8_t password_scalar[32];
24 uint8_t password_hash[64];
25 uint8_t *my_name;
26 size_t my_name_len;
27 uint8_t *their_name;
28 size_t their_name_len;
29 enum spake2_role_t my_role;
30 enum spake2_state_t state;
31 char disable_password_scalar_hack;
32 };
33
34 #if defined(__cplusplus)
35 } // extern C
36 #endif
37
38 #endif // OPENSSL_HEADER_SPAKE25519_INTERNAL_H