eddsa.h
Go to the documentation of this file.
1 /**
2  * @file eddsa.h
3  * @brief EdDSA (Edwards-Curve Digital Signature Algorithm)
4  *
5  * @section License
6  *
7  * SPDX-License-Identifier: GPL-2.0-or-later
8  *
9  * Copyright (C) 2010-2020 Oryx Embedded SARL. All rights reserved.
10  *
11  * This file is part of CycloneCRYPTO Open.
12  *
13  * This program is free software; you can redistribute it and/or
14  * modify it under the terms of the GNU General Public License
15  * as published by the Free Software Foundation; either version 2
16  * of the License, or (at your option) any later version.
17  *
18  * This program is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21  * GNU General Public License for more details.
22  *
23  * You should have received a copy of the GNU General Public License
24  * along with this program; if not, write to the Free Software Foundation,
25  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
26  *
27  * @author Oryx Embedded SARL (www.oryx-embedded.com)
28  * @version 1.9.8
29  **/
30 
31 #ifndef _EDDSA_H
32 #define _EDDSA_H
33 
34 //Dependencies
35 #include "core/crypto.h"
36 #include "ecc/ec.h"
37 
38 //C++ guard
39 #ifdef __cplusplus
40 extern "C" {
41 #endif
42 
43 
44 /**
45  * @brief EdDSA public key
46  **/
47 
48 typedef struct
49 {
50  Mpi q; ///<Public key
52 
53 
54 /**
55  * @brief EdDSA private key
56  **/
57 
58 typedef struct
59 {
60  Mpi d; ///<Private key
61  Mpi q; ///<Public key
63 
64 
65 //EdDSA related functions
68 
71 
72 
73 //C++ guard
74 #ifdef __cplusplus
75 }
76 #endif
77 
78 #endif
Arbitrary precision integer.
Definition: mpi.h:69
void eddsaFreePublicKey(EddsaPublicKey *key)
Release a DSA public key.
Definition: eddsa.c:61
Mpi q
Public key.
Definition: eddsa.h:50
EdDSA public key.
Definition: eddsa.h:48
void eddsaInitPublicKey(EddsaPublicKey *key)
Initialize a DSA public key.
Definition: eddsa.c:49
Mpi q
Public key.
Definition: eddsa.h:61
General definitions for cryptographic algorithms.
EdDSA private key.
Definition: eddsa.h:58
Mpi d
Private key.
Definition: eddsa.h:60
void eddsaFreePrivateKey(EddsaPrivateKey *key)
Release a DSA private key.
Definition: eddsa.c:86
void eddsaInitPrivateKey(EddsaPrivateKey *key)
Initialize a DSA private key.
Definition: eddsa.c:73
ECC (Elliptic Curve Cryptography)