wickr-crypto-c
fingerprint.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 fingerprint_h
23 #define fingerprint_h
24 
25 #include "buffer.h"
26 #include "eckey.h"
27 #include "crypto_engine.h"
28 
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32 
47 typedef enum {
48  FINGERPRINT_OUTPUT_SHORT,
49  FINGERPRINT_OUTPUT_LONG
51 
61 typedef enum { WICKR_FINGERPRINT_TYPE_SHA512 } wickr_fingerprint_type;
62 
78 };
79 
81 
95  const wickr_ec_key_t *key,
96  const wickr_buffer_t *identifier,
98 
114  const wickr_fingerprint_t *local,
115  const wickr_fingerprint_t *remote,
117 
129 
130 
141 
142 
152 
164 
165 
177 
178 #ifdef __cplusplus
179 }
180 #endif
181 
182 #endif /* fingerprint_h */
void wickr_fingerprint_destroy(wickr_fingerprint_t **fingerprint)
Representation of public and private Elliptic Curve Keypair information as buffers.
Definition: eckey.h:90
wickr_fingerprint_type type
Definition: fingerprint.h:76
wickr_fingerprint_t * wickr_fingerprint_copy(const wickr_fingerprint_t *fingerprint)
Represents an array of bytes and the length of the allocation associated with those bytes.
Definition: buffer.h:51
wickr_buffer_t * wickr_fingerprint_get_hex(const wickr_fingerprint_t *fingerprint, wickr_fingerprint_output output_mode)
wickr_fingerprint_output
Definition: fingerprint.h:47
wickr_fingerprint_t * wickr_fingerprint_gen(wickr_crypto_engine_t engine, const wickr_ec_key_t *key, const wickr_buffer_t *identifier, wickr_fingerprint_type type)
wickr_fingerprint_t * wickr_fingerprint_gen_bilateral(wickr_crypto_engine_t engine, const wickr_fingerprint_t *local, const wickr_fingerprint_t *remote, wickr_fingerprint_type type)
A fingerprint representation of a combination of signature keys / identifiers.
Definition: fingerprint.h:75
wickr_buffer_t * wickr_fingerprint_get_b32(const wickr_fingerprint_t *fingerprint, wickr_fingerprint_output output_mode)
wickr_fingerprint_type
Definition: fingerprint.h:61
Interface to a set of cryptographic operations used throughout the library. Currently the default imp...
Definition: crypto_engine.h:53
wickr_buffer_t * data
Definition: fingerprint.h:77
wickr_fingerprint_t * wickr_fingerprint_create(wickr_fingerprint_type type, wickr_buffer_t *data)