nrfxlib API 2.8.99
Loading...
Searching...
No Matches
ocrypto_curve25519.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
23#ifndef OCRYPTO_CURVE25519_H
24#define OCRYPTO_CURVE25519_H
25
26#include "ocrypto_types.h"
27
28
29#ifdef __cplusplus
30extern "C" {
31#endif
32
33
37#define ocrypto_curve25519_SCALAR_BYTES (32)
38
42#define ocrypto_curve25519_BYTES (32)
43
44
57 uint8_t r[ocrypto_curve25519_BYTES],
58 const uint8_t n[ocrypto_curve25519_SCALAR_BYTES]);
59
75 uint8_t r[ocrypto_curve25519_BYTES],
76 const uint8_t n[ocrypto_curve25519_SCALAR_BYTES],
77 const uint8_t p[ocrypto_curve25519_BYTES]);
78
79
94 uint8_t r[ocrypto_curve25519_BYTES],
95 const uint8_t n[ocrypto_curve25519_SCALAR_BYTES]);
96
114 uint8_t r[ocrypto_curve25519_BYTES],
115 const uint8_t n[ocrypto_curve25519_SCALAR_BYTES],
116 const uint8_t p[ocrypto_curve25519_BYTES]);
117
118#ifdef __cplusplus
119}
120#endif
121
122#endif
123
#define ocrypto_curve25519_BYTES
Definition ocrypto_curve25519.h:42
#define ocrypto_curve25519_SCALAR_BYTES
Definition ocrypto_curve25519.h:37
void ocrypto_curve25519_scalarmult(uint8_t r[(32)], const uint8_t n[(32)], const uint8_t p[(32)])
void ocrypto_curve25519_scalarmult_base(uint8_t r[(32)], const uint8_t n[(32)])
void ocrypto_curve25519_scalarmult_ctx(ocrypto_curve25519_ctx *ctx, uint8_t r[(32)], const uint8_t n[(32)], const uint8_t p[(32)])
void ocrypto_curve25519_scalarmult_base_ctx(ocrypto_curve25519_ctx *ctx, uint8_t r[(32)], const uint8_t n[(32)])
Definition ocrypto_types.h:89