nrfxlib API 0.1.0
Loading...
Searching...
No Matches
ocrypto_ed25519.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_ED25519_H
25#define OCRYPTO_ED25519_H
26
27#include "ocrypto_types.h"
28
29
30#ifdef __cplusplus
31extern "C" {
32#endif
33
34
38#define ocrypto_ed25519_PUBLIC_KEY_BYTES (32)
39
43#define ocrypto_ed25519_SECRET_KEY_BYTES (32)
44
48#define ocrypto_ed25519_BYTES (64)
49
50
62 const uint8_t sk[ocrypto_ed25519_SECRET_KEY_BYTES]);
63
77 uint8_t sig[ocrypto_ed25519_BYTES],
78 const uint8_t *m, size_t m_len,
79 const uint8_t sk[ocrypto_ed25519_SECRET_KEY_BYTES],
80 const uint8_t pk[ocrypto_ed25519_PUBLIC_KEY_BYTES]);
81
97 const uint8_t sig[ocrypto_ed25519_BYTES],
98 const uint8_t *m, size_t m_len,
99 const uint8_t pk[ocrypto_ed25519_PUBLIC_KEY_BYTES]);
100
101
115 const uint8_t sk[ocrypto_ed25519_SECRET_KEY_BYTES]);
116
132 uint8_t sig[ocrypto_ed25519_BYTES],
133 const uint8_t *m, size_t m_len,
134 const uint8_t sk[ocrypto_ed25519_SECRET_KEY_BYTES],
135 const uint8_t pk[ocrypto_ed25519_PUBLIC_KEY_BYTES]);
136
154 const uint8_t sig[ocrypto_ed25519_BYTES],
155 const uint8_t *m, size_t m_len,
156 const uint8_t pk[ocrypto_ed25519_PUBLIC_KEY_BYTES]);
157
158
159#ifdef __cplusplus
160}
161#endif
162
163#endif
164
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:38
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:43
#define ocrypto_ed25519_BYTES
Definition: ocrypto_ed25519.h:48
Definition: ocrypto_types.h:76