diff options
Diffstat (limited to 'serve/crypto.h')
| -rw-r--r-- | serve/crypto.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/serve/crypto.h b/serve/crypto.h index 4919c49..b8a48fd 100644 --- a/serve/crypto.h +++ b/serve/crypto.h @@ -8,7 +8,7 @@ * first time a server seals, opens a seal or connects to an https receiver * (serve/crypto.c): one that does none of these maps no OpenSSL, 2.3 MiB * less resident and 0.6 MiB less of its own. */ -enum { PURE_CRYPTO_VERSION = 2 }; +enum { PURE_CRYPTO_VERSION = 3 }; typedef struct { unsigned version; @@ -33,5 +33,15 @@ typedef struct { bool (*unseal)(PureOpener *, uint64_t n, const char *aad, const unsigned char *sealed, size_t size, unsigned char *plain); void (*opener_free)(PureOpener *); + /* Links, as serve/seal.h says. */ + bool (*link_secret)(const PureSealKey *, const unsigned char peer[PURE_SEAL_KEY], unsigned char out[32]); + bool (*link_derive)(const unsigned char secret[32], const unsigned char *info, size_t info_size, unsigned char *out, + size_t out_size); + PureAead *(*aead)(const unsigned char key[PURE_AEAD_KEY]); + bool (*aead_seal)(PureAead *, const unsigned char nonce[PURE_AEAD_NONCE], const unsigned char *aad, size_t aad_size, + const unsigned char *plain, size_t size, unsigned char *out); + bool (*aead_open)(PureAead *, const unsigned char nonce[PURE_AEAD_NONCE], const unsigned char *aad, + size_t aad_size, const unsigned char *sealed, size_t size, unsigned char *plain); + void (*aead_free)(PureAead *); } PureCrypto; #endif |
