#include <avis/keys.h>
A key is simply an immutable block of bytes.
Elvin defines two types of key, private (or raw) keys, and public (or prime) keys. A public key is a one-way hash (e.g. using SHA-1) of a private key. A private key may be any random data, or simply a password. A private key is defined to match a public key if the corresponding hash of its data matches the public key's data, e.g. if sha1 (privateKey.data) == publicKey.data
.
Note that this is not a public key system in the RSA sense but that, like RSA, public keys can be shared in the open without loss of security.
Data Fields | |
uint8_t * | data |
uint32_t | length |