nrfxlib API 2.8.99
Loading...
Searching...
No Matches
ocrypto_ecdh_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
24#ifndef OCRYPTO_ECDH_P256_H
25#define OCRYPTO_ECDH_P256_H
26
27#include "ocrypto_types.h"
28
29
30#ifdef __cplusplus
31extern "C" {
32#endif
33
34
36typedef struct {
38 int ret;
39} ocrypto_ecdh_p256_ctx;
56int ocrypto_ecdh_p256_secret_key_check(const uint8_t sk[32]);
57
66int ocrypto_ecdh_p256_public_key_check(const uint8_t pk[64]);
67
86int ocrypto_ecdh_p256_public_key(uint8_t pk[64], const uint8_t sk[32]);
87
103int ocrypto_ecdh_p256_common_secret(uint8_t r[32], const uint8_t sk[32], const uint8_t pk[64]);
104
105
137void ocrypto_ecdh_p256_public_key_init(ocrypto_ecdh_p256_ctx *ctx, const uint8_t sk[32]);
138
149int ocrypto_ecdh_p256_public_key_iterate(ocrypto_ecdh_p256_ctx *ctx);
150
162int ocrypto_ecdh_p256_public_key_final(ocrypto_ecdh_p256_ctx *ctx, uint8_t pk[64]);
163
173void ocrypto_ecdh_p256_common_secret_init(ocrypto_ecdh_p256_ctx *ctx, const uint8_t sk[32], const uint8_t pk[64]);
174
185int ocrypto_ecdh_p256_common_secret_iterate(ocrypto_ecdh_p256_ctx *ctx);
186
198int ocrypto_ecdh_p256_common_secret_final(ocrypto_ecdh_p256_ctx *ctx, uint8_t r[32]);
202#ifdef __cplusplus
203}
204#endif
205
206#endif
207
void ocrypto_ecdh_p256_common_secret_init(ocrypto_ecdh_p256_ctx *ctx, const uint8_t sk[32], const uint8_t pk[64])
int ocrypto_ecdh_p256_public_key(uint8_t pk[64], const uint8_t sk[32])
int ocrypto_ecdh_p256_secret_key_check(const uint8_t sk[32])
int ocrypto_ecdh_p256_common_secret_iterate(ocrypto_ecdh_p256_ctx *ctx)
int ocrypto_ecdh_p256_public_key_final(ocrypto_ecdh_p256_ctx *ctx, uint8_t pk[64])
int ocrypto_ecdh_p256_common_secret_final(ocrypto_ecdh_p256_ctx *ctx, uint8_t r[32])
int ocrypto_ecdh_p256_common_secret(uint8_t r[32], const uint8_t sk[32], const uint8_t pk[64])
int ocrypto_ecdh_p256_public_key_check(const uint8_t pk[64])
int ocrypto_ecdh_p256_public_key_iterate(ocrypto_ecdh_p256_ctx *ctx)
void ocrypto_ecdh_p256_public_key_init(ocrypto_ecdh_p256_ctx *ctx, const uint8_t sk[32])
Definition ocrypto_types.h:122