From 303334e67262bb6121dfbd245c66535f259d08af Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Wed, 25 Apr 2018 16:41:22 +0200 Subject: enable caching private->public key mapping in memory to improve CPU consumption for large zone insertions --- src/include/gnunet_gnsrecord_lib.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'src/include') diff --git a/src/include/gnunet_gnsrecord_lib.h b/src/include/gnunet_gnsrecord_lib.h index f07bd3ef3..38346ada3 100644 --- a/src/include/gnunet_gnsrecord_lib.h +++ b/src/include/gnunet_gnsrecord_lib.h @@ -557,6 +557,25 @@ GNUNET_GNSRECORD_block_create (const struct GNUNET_CRYPTO_EcdsaPrivateKey *key, unsigned int rd_count); +/** + * Sign name and records, cache derived public key (also keeps the + * private key in static memory, so do not use this function if + * keeping the private key in the process'es RAM is a major issue). + * + * @param key the private key + * @param expire block expiration + * @param label the name for the records + * @param rd record data + * @param rd_count number of records in @a rd + */ +struct GNUNET_GNSRECORD_Block * +GNUNET_GNSRECORD_block_create2 (const struct GNUNET_CRYPTO_EcdsaPrivateKey *key, + struct GNUNET_TIME_Absolute expire, + const char *label, + const struct GNUNET_GNSRECORD_Data *rd, + unsigned int rd_count); + + /** * Check if a signature is valid. This API is used by the GNS Block * to validate signatures received from the network. -- cgit v1.2.3