wickr-crypto-c
|
Data Structures | |
struct | wickr_fingerprint |
A fingerprint representation of a combination of signature keys / identifiers. More... | |
Enumerations | |
enum | wickr_fingerprint_output { FINGERPRINT_OUTPUT_SHORT, FINGERPRINT_OUTPUT_LONG } |
enum | wickr_fingerprint_type { WICKR_FINGERPRINT_TYPE_SHA512 } |
Functions | |
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) |
wickr_fingerprint_t * | wickr_fingerprint_create (wickr_fingerprint_type type, wickr_buffer_t *data) |
wickr_fingerprint_t * | wickr_fingerprint_copy (const wickr_fingerprint_t *fingerprint) |
void | wickr_fingerprint_destroy (wickr_fingerprint_t **fingerprint) |
wickr_buffer_t * | wickr_fingerprint_get_b32 (const wickr_fingerprint_t *fingerprint, wickr_fingerprint_output output_mode) |
wickr_buffer_t * | wickr_fingerprint_get_hex (const wickr_fingerprint_t *fingerprint, wickr_fingerprint_output output_mode) |
Fingerprint output format
SHORT - Output a fingerprint that is 1/2 length of the full representation LONG - Output a fingerprint that is encoded to be full length
Fingerprint Encoding Type
SHA512 - Calculated by taking a SHA512 of the inputs concatenated together
wickr_fingerprint_t* wickr_fingerprint_copy | ( | const wickr_fingerprint_t * | fingerprint | ) |
Copy a wickr_fingerprint
fingerprint | the fingerprint to copy |
wickr_fingerprint_t* wickr_fingerprint_create | ( | wickr_fingerprint_type | type, |
wickr_buffer_t * | data | ||
) |
Create a new wickr_fingerprint struct
type | see 'wickr_fingerprint' property documentation |
data | see 'wickr_fingerprint' property documentation |
void wickr_fingerprint_destroy | ( | wickr_fingerprint_t ** | fingerprint | ) |
Destroy a wickr_fingerprint
fingerprint | the fingerprint to destroy |
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 | ||
) |
Generate a fingerprint based on a signing key / fixed user identifier
engine | the crypto engine to use for underlying hash operations |
key | the key to include in the resulting fingerprint |
identifier | a fixed user identifier to use in the resulting fingerprint |
type | the type of fingerprint algorithm to use when processing key/identifier |
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 | ||
) |
Generate a bilateral fingerprint by combining two existing fingerprints made with 'wickr_fingerprint_gen'. Fingerprints created by this function are identical if local/remote input values are swapped, as they are sorted internally before computation begins
engine | the crypto engine to use for underlying hash operations |
local | the first existing fingerprint to include in the bilateral fingerprint |
remote | the second existing fingerprint to include in the bilateral fingerprint |
type | the type of fingerprint algorithm to use when processing local/remote |
wickr_buffer_t* wickr_fingerprint_get_b32 | ( | const wickr_fingerprint_t * | fingerprint, |
wickr_fingerprint_output | output_mode | ||
) |
Get a base32 representation of a fingerprint
fingerprint | the fingerprint to get the base32 representation of |
output_mode | the output mode of the base32 representation (short/long) |
wickr_buffer_t* wickr_fingerprint_get_hex | ( | const wickr_fingerprint_t * | fingerprint, |
wickr_fingerprint_output | output_mode | ||
) |
Get a hex representation of a fingerprint
fingerprint | the fingerprint to get the hex representation of |
output_mode | the output mode of the base32 representation (short/long) |