API for GNS record-related crypto. More...
#include "platform.h"
#include "gnunet_util_lib.h"
#include "gnunet_constants.h"
#include "gnunet_signatures.h"
#include "gnunet_arm_service.h"
#include "gnunet_gnsrecord_lib.h"
Go to the source code of this file.
Data Structures | |
struct | GNRBlockPS |
Information we have in an encrypted block with record data (i.e. More... | |
Functions | |
void | GNR_derive_block_aes_key (unsigned char *ctr, unsigned char *key, const char *label, uint64_t exp, const struct GNUNET_CRYPTO_EcdsaPublicKey *pub) |
Derive session key and iv from label and public key. More... | |
void | GNR_derive_block_xsalsa_key (unsigned char *nonce, unsigned char *key, const char *label, uint64_t exp, const struct GNUNET_CRYPTO_EddsaPublicKey *pub) |
Derive session key and iv from label and public key. More... | |
API for GNS record-related crypto.
Definition in file gnsrecord_crypto.h.
void GNR_derive_block_aes_key | ( | unsigned char * | ctr, |
unsigned char * | key, | ||
const char * | label, | ||
uint64_t | exp, | ||
const struct GNUNET_CRYPTO_EcdsaPublicKey * | pub | ||
) |
Derive session key and iv from label and public key.
iv | initialization vector to initialize |
skey | session key to initialize |
label | label to use for KDF |
pub | public key to use for KDF |
4 byte nonce
Expiration time 64 bit.
Set counter part to 1
Definition at line 129 of file gnsrecord_crypto.c.
References GNUNET_CRYPTO_AES_KEY_LENGTH, GNUNET_CRYPTO_kdf(), key, and pub.
Referenced by run_pkey().
void GNR_derive_block_xsalsa_key | ( | unsigned char * | nonce, |
unsigned char * | key, | ||
const char * | label, | ||
uint64_t | exp, | ||
const struct GNUNET_CRYPTO_EddsaPublicKey * | pub | ||
) |
Derive session key and iv from label and public key.
nonce | initialization vector to initialize |
skey | session key to initialize |
label | label to use for KDF |
pub | public key to use for KDF |
16 byte nonce
Expiration time 64 bit.
Definition at line 158 of file gnsrecord_crypto.c.
References GNUNET_CRYPTO_kdf(), key, and pub.
Referenced by run_edkey().