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... | |
struct GNUNET_GNSRECORD_SignaturePurposePS * | GNR_create_signature_message (const struct GNUNET_GNSRECORD_PowP *pow) |
Create the revocation metadata to sign for a revocation message. 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 block_create_ecdsa(), block_decrypt_ecdsa(), and 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 block_create_eddsa(), block_decrypt_eddsa(), and run_edkey().
struct GNUNET_GNSRECORD_SignaturePurposePS * GNR_create_signature_message | ( | const struct GNUNET_GNSRECORD_PowP * | pow | ) |
Create the revocation metadata to sign for a revocation message.
pow | the PoW to sign |
Definition at line 103 of file gnsrecord_pow.c.
References GNUNET_CRYPTO_public_key_get_length(), GNUNET_CRYPTO_write_public_key_to_buffer(), GNUNET_malloc, GNUNET_SIGNATURE_PURPOSE_GNS_REVOCATION, pk, GNUNET_CRYPTO_EccSignaturePurpose::purpose, GNUNET_GNSRECORD_SignaturePurposePS::purpose, GNUNET_CRYPTO_EccSignaturePurpose::size, GNUNET_GNSRECORD_PowP::timestamp, and GNUNET_GNSRECORD_SignaturePurposePS::timestamp.
Referenced by check_signature_identity(), run_with_key(), and sign_pow_identity().