aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2019-04-16 19:57:15 +0200
committerChristian Grothoff <christian@grothoff.org>2019-04-16 19:57:15 +0200
commit3266ea560ea1b243810dce4d46ee2889da7b4f6c (patch)
tree555ce759adf099350f89fd520f11d04161e8df1c /src/include
parentcb169441f0ed127dd07e2c6f98436dcd0ece8f61 (diff)
downloadgnunet-3266ea560ea1b243810dce4d46ee2889da7b4f6c.tar.gz
gnunet-3266ea560ea1b243810dce4d46ee2889da7b4f6c.zip
implement backchannel encryption/decryption
Diffstat (limited to 'src/include')
-rw-r--r--src/include/gnunet_crypto_lib.h20
1 files changed, 16 insertions, 4 deletions
diff --git a/src/include/gnunet_crypto_lib.h b/src/include/gnunet_crypto_lib.h
index 6822de2f1..45da5f6ba 100644
--- a/src/include/gnunet_crypto_lib.h
+++ b/src/include/gnunet_crypto_lib.h
@@ -456,6 +456,18 @@ int32_t
456GNUNET_CRYPTO_crc32_n (const void *buf, 456GNUNET_CRYPTO_crc32_n (const void *buf,
457 size_t len); 457 size_t len);
458 458
459/**
460 * @ingroup crypto
461 * Zero out @a buffer, securely against compiler optimizations.
462 * Used to delete key material.
463 *
464 * @param buffer the buffer to zap
465 * @param length buffer length
466 */
467void
468GNUNET_CRYPTO_zero_keys (void *buffer,
469 size_t length);
470
459 471
460/** 472/**
461 * @ingroup crypto 473 * @ingroup crypto
@@ -721,8 +733,8 @@ GNUNET_CRYPTO_hash_context_abort (struct GNUNET_HashContext *hc);
721 */ 733 */
722void 734void
723GNUNET_CRYPTO_hmac_raw (const void *key, size_t key_len, 735GNUNET_CRYPTO_hmac_raw (const void *key, size_t key_len,
724 const void *plaintext, size_t plaintext_len, 736 const void *plaintext, size_t plaintext_len,
725 struct GNUNET_HashCode *hmac); 737 struct GNUNET_HashCode *hmac);
726 738
727 739
728/** 740/**
@@ -1866,7 +1878,7 @@ GNUNET_CRYPTO_rsa_private_key_free (struct GNUNET_CRYPTO_RsaPrivateKey *key);
1866 */ 1878 */
1867size_t 1879size_t
1868GNUNET_CRYPTO_rsa_private_key_encode (const struct GNUNET_CRYPTO_RsaPrivateKey *key, 1880GNUNET_CRYPTO_rsa_private_key_encode (const struct GNUNET_CRYPTO_RsaPrivateKey *key,
1869 char **buffer); 1881 char **buffer);
1870 1882
1871 1883
1872/** 1884/**
@@ -1879,7 +1891,7 @@ GNUNET_CRYPTO_rsa_private_key_encode (const struct GNUNET_CRYPTO_RsaPrivateKey *
1879 */ 1891 */
1880struct GNUNET_CRYPTO_RsaPrivateKey * 1892struct GNUNET_CRYPTO_RsaPrivateKey *
1881GNUNET_CRYPTO_rsa_private_key_decode (const char *buf, 1893GNUNET_CRYPTO_rsa_private_key_decode (const char *buf,
1882 size_t len); 1894 size_t len);
1883 1895
1884 1896
1885/** 1897/**