nrfxlib API 2.7.99
Loading...
Searching...
No Matches
ocrypto_ecjpake_p256.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2016 - 2024 Nordic Semiconductor ASA
3 * Copyright (c) since 2013 Oberon microsystems AG
4 *
5 * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
6 */
7
8
16#ifndef OCRYPTO_ECJPAKE_P256_H
17#define OCRYPTO_ECJPAKE_P256_H
18
19#include <stddef.h>
20#include <stdint.h>
21
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
27
39 uint8_t X[64],
40 const uint8_t G[64],
41 const uint8_t x[32]);
42
54 uint8_t hash[32],
55 const uint8_t X[64],
56 const uint8_t V[64],
57 const uint8_t G[64],
58 const char *id, size_t id_len);
59
73 uint8_t r[32],
74 const uint8_t x[32],
75 const uint8_t v[32],
76 const uint8_t *hash,
77 size_t hash_len);
78
93 const uint8_t G[64],
94 const uint8_t X[64],
95 const uint8_t V[64],
96 const uint8_t r[32],
97 const uint8_t *hash,
98 size_t hash_len);
99
116 uint8_t X[64],
117 uint8_t V[64],
118 uint8_t r[32],
119 const uint8_t G[64],
120 const uint8_t x[32],
121 const uint8_t v[32],
122 const char *id, size_t id_len);
123
138 const uint8_t G[64],
139 const uint8_t X[64],
140 const uint8_t V[64],
141 const uint8_t r[32],
142 const char *id, size_t id_len);
143
144
157 uint8_t G[64],
158 const uint8_t X1[64],
159 const uint8_t X2[64],
160 const uint8_t X3[64]);
161
170 uint8_t rs[32],
171 const uint8_t *secret, size_t secret_len);
172
184 uint8_t xs[32],
185 const uint8_t x2[32],
186 const uint8_t rs[32]);
187
201 uint8_t secret[64],
202 const uint8_t Xr[64],
203 const uint8_t X2[64],
204 const uint8_t xs[32],
205 const uint8_t x2[32]);
206
220 uint8_t secret[32],
221 const uint8_t Xr[64],
222 const uint8_t X2[64],
223 const uint8_t xs[32],
224 const uint8_t x2[32]);
225
226
227#ifdef __cplusplus
228}
229#endif
230
231#endif
232
void ocrypto_ecjpake_read_shared_secret(uint8_t rs[32], const uint8_t *secret, size_t secret_len)
int ocrypto_ecjpake_zkp_verify(const uint8_t G[64], const uint8_t X[64], const uint8_t V[64], const uint8_t r[32], const uint8_t *hash, size_t hash_len)
int ocrypto_ecjpake_get_premaster_secret(uint8_t secret[32], const uint8_t Xr[64], const uint8_t X2[64], const uint8_t xs[32], const uint8_t x2[32])
int ocrypto_ecjpake_zkp_sign(uint8_t r[32], const uint8_t x[32], const uint8_t v[32], const uint8_t *hash, size_t hash_len)
void ocrypto_ecjpake_get_zkp_hash(uint8_t hash[32], const uint8_t X[64], const uint8_t V[64], const uint8_t G[64], const char *id, size_t id_len)
int ocrypto_ecjpake_get_generator(uint8_t G[64], const uint8_t X1[64], const uint8_t X2[64], const uint8_t X3[64])
int ocrypto_ecjpake_get_premaster_secret_key(uint8_t secret[64], const uint8_t Xr[64], const uint8_t X2[64], const uint8_t xs[32], const uint8_t x2[32])
int ocrypto_ecjpake_get_key(uint8_t X[64], uint8_t V[64], uint8_t r[32], const uint8_t G[64], const uint8_t x[32], const uint8_t v[32], const char *id, size_t id_len)
int ocrypto_ecjpake_process_shared_secret(uint8_t xs[32], const uint8_t x2[32], const uint8_t rs[32])
int ocrypto_ecjpake_get_public_key(uint8_t X[64], const uint8_t G[64], const uint8_t x[32])
int ocrypto_ecjpake_verify_key(const uint8_t G[64], const uint8_t X[64], const uint8_t V[64], const uint8_t r[32], const char *id, size_t id_len)