]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Rename crypto.c to crypto_cipher.c (since that's all it still has.)
authorNick Mathewson <nickm@torproject.org>
Wed, 11 Jul 2018 18:08:22 +0000 (14:08 -0400)
committerNick Mathewson <nickm@torproject.org>
Wed, 11 Jul 2018 18:12:36 +0000 (14:12 -0400)
22 files changed:
src/core/crypto/onion_ntor.c
src/core/crypto/relay_crypto.c
src/core/or/or.h
src/feature/nodelist/parsecommon.c
src/feature/rend/rendmid.c
src/lib/crypt_ops/crypto_cipher.c [moved from src/lib/crypt_ops/crypto.c with 96% similarity]
src/lib/crypt_ops/crypto_cipher.h [moved from src/lib/crypt_ops/crypto.h with 88% similarity]
src/lib/crypt_ops/crypto_pwbox.c
src/lib/crypt_ops/crypto_rsa.c
src/lib/crypt_ops/crypto_rsa.h
src/lib/crypt_ops/crypto_s2k.c
src/lib/crypt_ops/include.am
src/lib/tls/tortls.c
src/test/fuzz/fuzzing_common.c
src/test/test_hs_client.c
src/test/test_hs_ntor_cl.c
src/test/test_introduce.c
src/test/test_ntor_cl.c
src/test/test_relaycell.c
src/test/test_routerkeys.c
src/test/test_util_slow.c
src/tools/tor-gencert.c

index ea7261cb53a7fe0310abc4e09a3a6776ac93b5a3..3614e0c9b11af393184e347eacb3259c2f237e58 100644 (file)
@@ -22,7 +22,7 @@
 
 #define ONION_NTOR_PRIVATE
 
-#include "lib/crypt_ops/crypto.h"
+#include "lib/crypt_ops/crypto_cipher.h"
 #include "lib/crypt_ops/crypto_digest.h"
 #include "lib/crypt_ops/crypto_hkdf.h"
 #include "lib/crypt_ops/crypto_util.h"
index b2388d2c45ff8cc9569758d09a929f64ab6962dd..311160a66931e85cd7bf7701ec90428f1142e301 100644 (file)
@@ -7,7 +7,7 @@
 #include "core/or/or.h"
 #include "core/or/circuitlist.h"
 #include "app/config/config.h"
-#include "lib/crypt_ops/crypto.h"
+#include "lib/crypt_ops/crypto_cipher.h"
 #include "lib/crypt_ops/crypto_util.h"
 #include "core/crypto/hs_ntor.h" // for HS_NTOR_KEY_EXPANSION_KDF_OUT_LEN
 #include "core/or/relay.h"
index 9aca030c744c686b44ef02e1c9d327c477cdf2b4..13376366ac06463a64ace1160977ab6a99b67280 100644 (file)
@@ -27,7 +27,8 @@
 #include "lib/cc/torint.h"
 #include "lib/container/map.h"
 #include "lib/container/smartlist.h"
-#include "lib/crypt_ops/crypto.h"
+#include "lib/crypt_ops/crypto_cipher.h"
+#include "lib/crypt_ops/crypto_rsa.h"
 #include "lib/ctime/di_ops.h"
 #include "lib/defs/dh_sizes.h"
 #include "lib/encoding/binascii.h"
index 3aaf8ac501b3eb27bc62f0045146a5df5ef6d059..e05657aca03b908d30069772cdbe99754447a4c5 100644 (file)
@@ -14,7 +14,7 @@
 #include "lib/string/util_string.h"
 #include "lib/string/printf.h"
 #include "lib/memarea/memarea.h"
-#include "lib/crypt_ops/crypto.h"
+#include "lib/crypt_ops/crypto_rsa.h"
 
 #include <string.h>
 
index 22cd6c3435bbaa576f7717e258fee45f79e1dd36..f433e7ce5b1600998d7ff74f2a9ee0ee833fa88d 100644 (file)
@@ -12,7 +12,7 @@
 #include "core/or/circuitlist.h"
 #include "core/or/circuituse.h"
 #include "app/config/config.h"
-#include "lib/crypt_ops/crypto.h"
+#include "lib/crypt_ops/crypto_cipher.h"
 #include "core/or/dos.h"
 #include "core/or/relay.h"
 #include "feature/rend/rendmid.h"
similarity index 96%
rename from src/lib/crypt_ops/crypto.c
rename to src/lib/crypt_ops/crypto_cipher.c
index 52ffec4ca8fd53c1082121fc96aff5c7caa3730b..6b762e374ddf7d736b09af8a2081fde9aa5be370 100644 (file)
@@ -5,15 +5,13 @@
 /* See LICENSE for licensing information */
 
 /**
- * \file crypto.c
- * \brief Wrapper functions to present a consistent interface to
- * public-key and symmetric cryptography operations from OpenSSL and
- * other places.
+ * \file crypto_cipher.c
+ * \brief Symmetric cryptography (low-level) with AES.
  **/
 
 #include "orconfig.h"
 
-#include "lib/crypt_ops/crypto.h"
+#include "lib/crypt_ops/crypto_cipher.h"
 #include "lib/crypt_ops/crypto_rand.h"
 #include "lib/crypt_ops/crypto_util.h"
 
similarity index 88%
rename from src/lib/crypt_ops/crypto.h
rename to src/lib/crypt_ops/crypto_cipher.h
index 993a65fb01f05a2ed5dcf2210044a92e137a64fc..f9444d03fc491accd105cd21986b1b6ebf7a1f73 100644 (file)
@@ -5,19 +5,18 @@
 /* See LICENSE for licensing information */
 
 /**
- * \file crypto.h
+ * \file crypto_cipher.h
  *
- * \brief Headers for crypto.c
+ * \brief Headers for crypto_cipher.c
  **/
 
-#ifndef TOR_CRYPTO_H
-#define TOR_CRYPTO_H
+#ifndef TOR_CRYPTO_CIPHER_H
+#define TOR_CRYPTO_CIPHER_H
 
 #include "orconfig.h"
 
 #include <stdio.h>
 #include "lib/cc/torint.h"
-#include "lib/crypt_ops/crypto_rsa.h"
 
 /** Length of our symmetric cipher's keys of 128-bit. */
 #define CIPHER_KEY_LEN 16
 /** Length of our symmetric cipher's keys of 256-bit. */
 #define CIPHER256_KEY_LEN 32
 
-/** Length of encoded public key fingerprints, including space; but not
- * including terminating NUL. */
-#define FINGERPRINT_LEN 49
-
 typedef struct aes_cnt_cipher crypto_cipher_t;
 
 /* environment setup */
index c001e295dadb3cca3549808284fcbd0999857fc1..2377f216a07f8d85b7a90029fd3042ce7d271f20 100644 (file)
@@ -11,7 +11,7 @@
 #include <string.h>
 
 #include "lib/arch/bytes.h"
-#include "lib/crypt_ops/crypto.h"
+#include "lib/crypt_ops/crypto_cipher.h"
 #include "lib/crypt_ops/crypto_digest.h"
 #include "lib/crypt_ops/crypto_pwbox.h"
 #include "lib/crypt_ops/crypto_rand.h"
index d8a9be7ec9b91a272cd3f17a59a2c9d3b7367818..ffe2bd2ceb02965272775b6f9c2a6c72e5884854 100644 (file)
@@ -9,7 +9,7 @@
  * \brief Block of functions related with RSA utilities and operations.
  **/
 
-#include "lib/crypt_ops/crypto.h"
+#include "lib/crypt_ops/crypto_cipher.h"
 #include "lib/crypt_ops/crypto_curve25519.h"
 #include "lib/crypt_ops/crypto_digest.h"
 #include "lib/crypt_ops/crypto_format.h"
index c70e01c3f47a2146968664339f09308262fdaa3d..45412d21ec61c602cd91df255b9d00b505d39a09 100644 (file)
 /** Number of bytes added for PKCS1-OAEP padding. */
 #define PKCS1_OAEP_PADDING_OVERHEAD 42
 
+/** Length of encoded public key fingerprints, including space; but not
+ * including terminating NUL. */
+#define FINGERPRINT_LEN 49
+
 /** A public key, or a public/private key-pair. */
 typedef struct crypto_pk_t crypto_pk_t;
 
index ab91d92f0e25a68980837a01cadbc4fd5e35e814..0e151f0a6c2775232a80e17544020d5b327559f8 100644 (file)
@@ -12,7 +12,7 @@
 
 #define CRYPTO_S2K_PRIVATE
 
-#include "lib/crypt_ops/crypto.h"
+#include "lib/crypt_ops/crypto_cipher.h"
 #include "lib/crypt_ops/crypto_digest.h"
 #include "lib/crypt_ops/crypto_hkdf.h"
 #include "lib/crypt_ops/crypto_rand.h"
index 6bb7c929a97342666e470ef23a5dd0e4c15d74e3..1caa3fdbc385b5114a52fad4271ba49561a065c6 100644 (file)
@@ -7,7 +7,7 @@ endif
 
 src_lib_libtor_crypt_ops_a_SOURCES =                   \
        src/lib/crypt_ops/aes.c                         \
-       src/lib/crypt_ops/crypto.c                      \
+       src/lib/crypt_ops/crypto_cipher.c               \
        src/lib/crypt_ops/crypto_curve25519.c           \
        src/lib/crypt_ops/crypto_dh.c                   \
        src/lib/crypt_ops/crypto_digest.c               \
@@ -39,7 +39,7 @@ noinst_HEADERS +=                                     \
        src/lib/crypt_ops/crypto_digest.h               \
        src/lib/crypt_ops/crypto_ed25519.h              \
        src/lib/crypt_ops/crypto_format.h               \
-       src/lib/crypt_ops/crypto.h                      \
+       src/lib/crypt_ops/crypto_cipher.h               \
        src/lib/crypt_ops/crypto_hkdf.h                 \
        src/lib/crypt_ops/crypto_init.h                 \
        src/lib/crypt_ops/crypto_openssl_mgt.h          \
index 073cae02ba14c717f49e5a329cf25484cce0b2c8..8d284dde17cec61337a4f6b48a56bc593d2cd607 100644 (file)
@@ -24,7 +24,7 @@
   #include <ws2tcpip.h>
 #endif
 
-#include "lib/crypt_ops/crypto.h"
+#include "lib/crypt_ops/crypto_cipher.h"
 #include "lib/crypt_ops/crypto_rand.h"
 #include "lib/crypt_ops/crypto_dh.h"
 #include "lib/crypt_ops/crypto_util.h"
index 0b3483bf6610b7ba348d86cd7b6d3bd59ad37431..1222162bfa3c99e37f554c92eccc0828d7e354a9 100644 (file)
@@ -7,7 +7,7 @@
 #include "app/config/config.h"
 #include "test/fuzz/fuzzing.h"
 #include "lib/compress/compress.h"
-#include "lib/crypt_ops/crypto.h"
+#include "lib/crypt_ops/crypto_cipher.h"
 #include "lib/crypt_ops/crypto_ed25519.h"
 
 static or_options_t *mock_options = NULL;
index 57da03ca287453a45db3d57df1ad4e8c65b66eda..7fcc1db1959f11c463d1eca5388c83293ff7e4a4 100644 (file)
@@ -21,7 +21,7 @@
 #include "test/hs_test_helpers.h"
 
 #include "app/config/config.h"
-#include "lib/crypt_ops/crypto.h"
+#include "lib/crypt_ops/crypto_cipher.h"
 #include "lib/crypt_ops/crypto_dh.h"
 #include "core/or/channeltls.h"
 #include "feature/dircache/directory.h"
index 03e34968be77bc9e91a88bad461ce4547b9230b0..c207741794a228f79d93056a940bc090569b265f 100644 (file)
@@ -14,7 +14,7 @@
 
 #define ONION_NTOR_PRIVATE
 #include "core/or/or.h"
-#include "lib/crypt_ops/crypto.h"
+#include "lib/crypt_ops/crypto_cipher.h"
 #include "lib/crypt_ops/crypto_curve25519.h"
 #include "lib/crypt_ops/crypto_ed25519.h"
 #include "lib/crypt_ops/crypto_format.h"
index cdfb70bdffcbc4fea8d4270bb265757eaacf531e..4d2d909945b8d0b4b42636a246a0a22b8d2de05b 100644 (file)
@@ -2,7 +2,7 @@
 /* See LICENSE for licensing information */
 
 #include "orconfig.h"
-#include "lib/crypt_ops/crypto.h"
+#include "lib/crypt_ops/crypto_cipher.h"
 #include "core/or/or.h"
 #include "test/test.h"
 
index 744b42c9d926593fc7038505049f178975199d5e..b8d3a8b4261c877cf9ac67ab685e597c967c6ae3 100644 (file)
@@ -7,7 +7,7 @@
 
 #define ONION_NTOR_PRIVATE
 #include "core/or/or.h"
-#include "lib/crypt_ops/crypto.h"
+#include "lib/crypt_ops/crypto_cipher.h"
 #include "lib/crypt_ops/crypto_curve25519.h"
 #include "core/crypto/onion_ntor.h"
 
index eb30cab0ecffc02aa8593d7e02118146c9315bd2..a6c152f738e3b317c8d1df9e84f2180c341e4f33 100644 (file)
@@ -9,7 +9,7 @@
 #include "core/mainloop/main.h"
 #include "app/config/config.h"
 #include "core/mainloop/connection.h"
-#include "lib/crypt_ops/crypto.h"
+#include "lib/crypt_ops/crypto_cipher.h"
 #include "core/or/circuitbuild.h"
 #include "core/or/circuitlist.h"
 #include "core/or/connection_edge.h"
index 1a1bf63ba094bd639a5444cc2acb1ee472c8cacc..82a80130e0a4fb1fe3c77698dc8a0cb72dca3cb7 100644 (file)
@@ -9,7 +9,7 @@
 #include "app/config/config.h"
 #include "feature/relay/router.h"
 #include "feature/relay/routerkeys.h"
-#include "lib/crypt_ops/crypto.h"
+#include "lib/crypt_ops/crypto_cipher.h"
 #include "lib/crypt_ops/crypto_format.h"
 #include "feature/nodelist/torcert.h"
 #include "test/test.h"
index c5b24487b10a0bd0c992ba94ab2b26cc0d3363c5..c7b3e3e2a4299de5f34094c1b08dfcbe89be186c 100644 (file)
@@ -6,7 +6,7 @@
 #include "orconfig.h"
 #define UTIL_PRIVATE
 #define SUBPROCESS_PRIVATE
-#include "lib/crypt_ops/crypto.h"
+#include "lib/crypt_ops/crypto_cipher.h"
 #include "lib/log/log.h"
 #include "lib/process/subprocess.h"
 #include "lib/process/waitpid.h"
index 7e54483b28b1b6aa924cad29839aa7a8e0a97ab7..63e24d922c84c392a11cd2cb4e36c68372ea0608 100644 (file)
@@ -33,9 +33,9 @@ ENABLE_GCC_WARNING(redundant-decls)
 
 #include <errno.h>
 
-#include "lib/crypt_ops/crypto.h"
 #include "lib/crypt_ops/crypto_digest.h"
 #include "lib/crypt_ops/crypto_rand.h"
+#include "lib/crypt_ops/crypto_rsa.h"
 #include "lib/crypt_ops/crypto_util.h"
 #include "lib/encoding/binascii.h"
 #include "lib/encoding/time_fmt.h"