aboutsummaryrefslogtreecommitdiff
path: root/src/lib/crypt_ops/crypto_hkdf.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-06-21 12:46:11 -0400
committerNick Mathewson <nickm@torproject.org>2018-06-21 13:14:14 -0400
commit25ccfff86a5b29c9c1ec9b3d01fe1dc796e9afa0 (patch)
tree1c23ec9dd2cea5d00e4262fa4574ffdb9e250aa7 /src/lib/crypt_ops/crypto_hkdf.h
parent49d7c9ce53daa13daae59eedceb07d28e06e4395 (diff)
downloadtor-25ccfff86a5b29c9c1ec9b3d01fe1dc796e9afa0.tar.gz
tor-25ccfff86a5b29c9c1ec9b3d01fe1dc796e9afa0.zip
Split crypto and tls libraries into directories
I am calling the crypto library "crypt_ops", since I want higher-level crypto things to be separated from lower-level ones. This library will hold only the low-level ones, once we have it refactored.
Diffstat (limited to 'src/lib/crypt_ops/crypto_hkdf.h')
-rw-r--r--src/lib/crypt_ops/crypto_hkdf.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/lib/crypt_ops/crypto_hkdf.h b/src/lib/crypt_ops/crypto_hkdf.h
new file mode 100644
index 0000000000..784f4bbbe4
--- /dev/null
+++ b/src/lib/crypt_ops/crypto_hkdf.h
@@ -0,0 +1,28 @@
+/* Copyright (c) 2001, Matej Pfajfar.
+ * Copyright (c) 2001-2004, Roger Dingledine.
+ * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
+ * Copyright (c) 2007-2018, The Tor Project, Inc. */
+/* See LICENSE for licensing information */
+
+/**
+ * \file crypto_hkdf.h
+ *
+ * \brief Headers for crypto_hkdf.h
+ **/
+
+#ifndef TOR_CRYPTO_HKDF_H
+#define TOR_CRYPTO_HKDF_H
+
+#include "common/util.h"
+
+int crypto_expand_key_material_TAP(const uint8_t *key_in,
+ size_t key_in_len,
+ uint8_t *key_out, size_t key_out_len);
+int crypto_expand_key_material_rfc5869_sha256(
+ const uint8_t *key_in, size_t key_in_len,
+ const uint8_t *salt_in, size_t salt_in_len,
+ const uint8_t *info_in, size_t info_in_len,
+ uint8_t *key_out, size_t key_out_len);
+
+#endif /* !defined(TOR_CRYPTO_HKDF_H) */
+