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