wickr-crypto-c
ephemeral_keypair.h
1 /*
2  * Copyright © 2012-2018 Wickr Inc. All rights reserved.
3  *
4  * This code is being released for EDUCATIONAL, ACADEMIC, AND CODE REVIEW PURPOSES
5  * ONLY. COMMERCIAL USE OF THE CODE IS EXPRESSLY PROHIBITED. For additional details,
6  * please see LICENSE
7  *
8  * THE CODE IS MADE AVAILABLE "AS-IS" AND WITHOUT ANY EXPRESS OR
9  * IMPLIED GUARANTEES AS TO FITNESS, MERCHANTABILITY, NON-
10  * INFRINGEMENT OR OTHERWISE. IT IS NOT BEING PROVIDED IN TRADE BUT ON
11  * A VOLUNTARY BASIS ON BEHALF OF THE AUTHOR’S PART FOR THE BENEFIT
12  * OF THE LICENSEE AND IS NOT MADE AVAILABLE FOR CONSUMER USE OR ANY
13  * OTHER USE OUTSIDE THE TERMS OF THIS LICENSE. ANYONE ACCESSING THE
14  * CODE SHOULD HAVE THE REQUISITE EXPERTISE TO SECURE THEIR SYSTEM
15  * AND DEVICES AND TO ACCESS AND USE THE CODE FOR REVIEW PURPOSES
16  * ONLY. LICENSEE BEARS THE RISK OF ACCESSING AND USING THE CODE. IN
17  * PARTICULAR, AUTHOR BEARS NO LIABILITY FOR ANY INTERFERENCE WITH OR
18  * ADVERSE EFFECT THAT MAY OCCUR AS A RESULT OF THE LICENSEE
19  * ACCESSING AND/OR USING THE CODE ON LICENSEE’S SYSTEM.
20  */
21 
22 #ifndef ephemeral_keypair_h
23 #define ephemeral_keypair_h
24 
25 #include <stdlib.h>
26 #include "ecdsa.h"
27 #include "eckey.h"
28 #include "crypto_engine.h"
29 #include "identity.h"
30 
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
34 
63  uint64_t identifier;
66 };
67 
69 
82 
93 
108 
121 
122 
131 
142 
154 
164 
165 #ifdef __cplusplus
166 }
167 #endif
168 
169 #endif /* ephemeral_keypair_h */
wickr_buffer_t * wickr_ephemeral_keypair_serialize(const wickr_ephemeral_keypair_t *keypair)
A signing identity on the Wickr system.
Definition: identity.h:85
Representation of public and private Elliptic Curve Keypair information as buffers.
Definition: eckey.h:90
wickr_ephemeral_keypair_t * wickr_ephemeral_keypair_copy(const wickr_ephemeral_keypair_t *source)
wickr_ec_key_t * ec_key
Definition: ephemeral_keypair.h:64
Represents an array of bytes and the length of the allocation associated with those bytes.
Definition: buffer.h:51
void wickr_ephemeral_keypair_destroy(wickr_ephemeral_keypair_t **keypair)
wickr_ephemeral_keypair_t * wickr_ephemeral_keypair_create(uint64_t identifier, wickr_ec_key_t *ec_key, wickr_ecdsa_result_t *signature)
Elliptic Curve Digital Signature Algorithm Result.
Definition: ecdsa.h:54
wickr_ephemeral_keypair_t * wickr_ephemeral_keypair_create_from_buffer(const wickr_buffer_t *buffer, const wickr_crypto_engine_t *engine)
Represents a key pair used for message key exchanges within the Wickr Messaging Protocol.
Definition: ephemeral_keypair.h:62
wickr_ephemeral_keypair_t * wickr_ephemeral_keypair_generate_identity(const wickr_crypto_engine_t *engine, uint64_t identifier, const wickr_identity_t *identity)
wickr_ecdsa_result_t * signature
Definition: ephemeral_keypair.h:65
uint64_t identifier
Definition: ephemeral_keypair.h:63
void wickr_ephemeral_keypair_make_public(const wickr_ephemeral_keypair_t *keypair)
bool wickr_ephemeral_keypair_verify_owner(const wickr_ephemeral_keypair_t *keypair, const wickr_crypto_engine_t *engine, const wickr_identity_t *owner)
Interface to a set of cryptographic operations used throughout the library. Currently the default imp...
Definition: crypto_engine.h:53