nrfxlib API 3.3.99
Loading...
Searching...
No Matches
ocrypto_ecjpake_p256.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2016 - 2025 Nordic Semiconductor ASA
3 * Copyright (c) since 2013 Oberon microsystems AG
4 *
5 * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
6 */
7
8
23#ifndef OCRYPTO_ECJPAKE_P256_H
24#define OCRYPTO_ECJPAKE_P256_H
25
26#include <stddef.h>
27#include <stdint.h>
28
29
30#ifdef __cplusplus
31extern "C" {
32#endif
33
34
46 uint8_t X[64],
47 const uint8_t G[64],
48 const uint8_t x[32]);
49
61 uint8_t hash[32],
62 const uint8_t X[64],
63 const uint8_t V[64],
64 const uint8_t G[64],
65 const char *id, size_t id_len);
66
80 uint8_t r[32],
81 const uint8_t x[32],
82 const uint8_t v[32],
83 const uint8_t *hash,
84 size_t hash_len);
85
100 const uint8_t G[64],
101 const uint8_t X[64],
102 const uint8_t V[64],
103 const uint8_t r[32],
104 const uint8_t *hash,
105 size_t hash_len);
106
123 uint8_t X[64],
124 uint8_t V[64],
125 uint8_t r[32],
126 const uint8_t G[64],
127 const uint8_t x[32],
128 const uint8_t v[32],
129 const char *id, size_t id_len);
130
145 const uint8_t G[64],
146 const uint8_t X[64],
147 const uint8_t V[64],
148 const uint8_t r[32],
149 const char *id, size_t id_len);
150
151
164 uint8_t G[64],
165 const uint8_t X1[64],
166 const uint8_t X2[64],
167 const uint8_t X3[64]);
168
177 uint8_t rs[32],
178 const uint8_t *secret, size_t secret_len);
179
191 uint8_t xs[32],
192 const uint8_t x2[32],
193 const uint8_t rs[32]);
194
208 uint8_t secret[64],
209 const uint8_t Xr[64],
210 const uint8_t X2[64],
211 const uint8_t xs[32],
212 const uint8_t x2[32]);
213
227 uint8_t secret[32],
228 const uint8_t Xr[64],
229 const uint8_t X2[64],
230 const uint8_t xs[32],
231 const uint8_t x2[32]);
232
233
234#ifdef __cplusplus
235}
236#endif
237
238#endif
239
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)