nrfxlib API 3.3.99
Loading...
Searching...
No Matches
ocrypto_ed25519.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
30#ifndef OCRYPTO_ED25519_H
31#define OCRYPTO_ED25519_H
32
33#include "ocrypto_types_25519.h"
34
35
36#ifdef __cplusplus
37extern "C" {
38#endif
39
40
44#define ocrypto_ed25519_PUBLIC_KEY_BYTES (32)
45
49#define ocrypto_ed25519_SECRET_KEY_BYTES (32)
50
54#define ocrypto_ed25519_BYTES (64)
55
56
68 const uint8_t sk[ocrypto_ed25519_SECRET_KEY_BYTES]);
69
83 uint8_t sig[ocrypto_ed25519_BYTES],
84 const uint8_t *m, size_t m_len,
85 const uint8_t sk[ocrypto_ed25519_SECRET_KEY_BYTES],
86 const uint8_t pk[ocrypto_ed25519_PUBLIC_KEY_BYTES]);
87
103 const uint8_t sig[ocrypto_ed25519_BYTES],
104 const uint8_t *m, size_t m_len,
105 const uint8_t pk[ocrypto_ed25519_PUBLIC_KEY_BYTES]);
106
107
121 const uint8_t sk[ocrypto_ed25519_SECRET_KEY_BYTES]);
122
138 uint8_t sig[ocrypto_ed25519_BYTES],
139 const uint8_t *m, size_t m_len,
140 const uint8_t sk[ocrypto_ed25519_SECRET_KEY_BYTES],
141 const uint8_t pk[ocrypto_ed25519_PUBLIC_KEY_BYTES]);
142
160 const uint8_t sig[ocrypto_ed25519_BYTES],
161 const uint8_t *m, size_t m_len,
162 const uint8_t pk[ocrypto_ed25519_PUBLIC_KEY_BYTES]);
163
164
165#ifdef __cplusplus
166}
167#endif
168
169#endif
170
int ocrypto_ed25519_verify(const uint8_t sig[(64)], const uint8_t *m, size_t m_len, const uint8_t pk[(32)])
void ocrypto_ed25519_public_key_ctx(ocrypto_ed25519_ctx *ctx, uint8_t pk[(32)], const uint8_t sk[(32)])
#define ocrypto_ed25519_PUBLIC_KEY_BYTES
Definition ocrypto_ed25519.h:44
void ocrypto_ed25519_public_key(uint8_t pk[(32)], const uint8_t sk[(32)])
void ocrypto_ed25519_sign(uint8_t sig[(64)], const uint8_t *m, size_t m_len, const uint8_t sk[(32)], const uint8_t pk[(32)])
int ocrypto_ed25519_verify_ctx(ocrypto_ed25519_ctx *ctx, const uint8_t sig[(64)], const uint8_t *m, size_t m_len, const uint8_t pk[(32)])
void ocrypto_ed25519_sign_ctx(ocrypto_ed25519_ctx *ctx, uint8_t sig[(64)], const uint8_t *m, size_t m_len, const uint8_t sk[(32)], const uint8_t pk[(32)])
#define ocrypto_ed25519_SECRET_KEY_BYTES
Definition ocrypto_ed25519.h:49
#define ocrypto_ed25519_BYTES
Definition ocrypto_ed25519.h:54
Declaration of internal types used in public interfaces.
Definition ocrypto_types_25519.h:86