SemiDrive SSDK Appication Program Interface PTG3.0
ed25519.h
Go to the documentation of this file.
1/*****************************************************************************
2 *
3 *
4 *Copyright (c) 2021-2029 Semidrive Incorporated. All rights reserved.
5 *Software License Agreement
6 *
7 ******************************************************************************
8 */
9#ifndef ED25519_H
10#define ED25519_H
11
12#ifdef __cplusplus
13extern "C" {
14#endif
15
16#include <pke.h>
17
18extern const edward_curve_t ed25519[1];
19
20/*Ed25519 mode*/
21typedef enum {
26
27/*Ed25519 return code*/
28enum {
33};
34
35uint32_t ed25519_get_pubkey_from_prikey(uint8_t prikey[32], uint8_t pubkey[32]);
36
37uint32_t ed25519_getkey(uint8_t prikey[32], uint8_t pubkey[32]);
38
39uint32_t ed25519_sign(Ed25519_MODE mode, uint8_t prikey[32], uint8_t pubkey[32],
40 uint8_t *ctx, uint8_t ctxByteLen, uint8_t *M,
41 uint32_t MByteLen, uint8_t RS[64]);
42
43uint32_t ed25519_verify(Ed25519_MODE mode, uint8_t pubkey[32], uint8_t *ctx,
44 uint8_t ctxByteLen, uint8_t *M, uint32_t MByteLen,
45 uint8_t RS[64]);
46
47#ifdef __cplusplus
48}
49#endif
50
51#endif
uint32_t ed25519_get_pubkey_from_prikey(uint8_t prikey[32], uint8_t pubkey[32])
uint32_t ed25519_getkey(uint8_t prikey[32], uint8_t pubkey[32])
@ EdDSA_POINTOR_NULL
Definition: ed25519.h:30
@ EdDSA_INVALID_INPUT
Definition: ed25519.h:31
@ EdDSA_VERIFY_FAIL
Definition: ed25519.h:32
@ EdDSA_SUCCESS
Definition: ed25519.h:29
Ed25519_MODE
Definition: ed25519.h:21
@ Ed25519_DEFAULT
Definition: ed25519.h:22
@ Ed25519_CTX
Definition: ed25519.h:23
@ Ed25519_PH
Definition: ed25519.h:24
uint32_t ed25519_sign(Ed25519_MODE mode, uint8_t prikey[32], uint8_t pubkey[32], uint8_t *ctx, uint8_t ctxByteLen, uint8_t *M, uint32_t MByteLen, uint8_t RS[64])
const edward_curve_t ed25519[1]
uint32_t ed25519_verify(Ed25519_MODE mode, uint8_t pubkey[32], uint8_t *ctx, uint8_t ctxByteLen, uint8_t *M, uint32_t MByteLen, uint8_t RS[64])
Semidrive CRYPTO pke header file.
@ PKE_SUCCESS
Definition: pke.h:101
Definition: eccp_curve.h:89