diff options
Diffstat (limited to 'src/gnsrecord/gnsrecord_crypto.c')
-rw-r--r-- | src/gnsrecord/gnsrecord_crypto.c | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/src/gnsrecord/gnsrecord_crypto.c b/src/gnsrecord/gnsrecord_crypto.c index 2b05dea56..b27688019 100644 --- a/src/gnsrecord/gnsrecord_crypto.c +++ b/src/gnsrecord/gnsrecord_crypto.c | |||
@@ -54,12 +54,7 @@ derive_block_aes_key (struct GNUNET_CRYPTO_SymmetricInitializationVector *iv, | |||
54 | { | 54 | { |
55 | static const char ctx_key[] = "gns-aes-ctx-key"; | 55 | static const char ctx_key[] = "gns-aes-ctx-key"; |
56 | static const char ctx_iv[] = "gns-aes-ctx-iv"; | 56 | static const char ctx_iv[] = "gns-aes-ctx-iv"; |
57 | /** | 57 | |
58 | * Next time we break protocol (v12) we harmonize the KDF usage in GNS: | ||
59 | * We use the strings above as salt and the public key as IKM similar to | ||
60 | * how derive_h is done in crypto_ecc.c. | ||
61 | */ | ||
62 | #ifdef LSD001 | ||
63 | GNUNET_CRYPTO_kdf (skey, sizeof(struct GNUNET_CRYPTO_SymmetricSessionKey), | 58 | GNUNET_CRYPTO_kdf (skey, sizeof(struct GNUNET_CRYPTO_SymmetricSessionKey), |
64 | ctx_key, strlen (ctx_key), | 59 | ctx_key, strlen (ctx_key), |
65 | pub, sizeof(struct GNUNET_CRYPTO_EcdsaPublicKey), | 60 | pub, sizeof(struct GNUNET_CRYPTO_EcdsaPublicKey), |
@@ -71,19 +66,6 @@ derive_block_aes_key (struct GNUNET_CRYPTO_SymmetricInitializationVector *iv, | |||
71 | pub, sizeof(struct GNUNET_CRYPTO_EcdsaPublicKey), | 66 | pub, sizeof(struct GNUNET_CRYPTO_EcdsaPublicKey), |
72 | label, strlen (label), | 67 | label, strlen (label), |
73 | NULL, 0); | 68 | NULL, 0); |
74 | #else | ||
75 | GNUNET_CRYPTO_kdf (skey, sizeof(struct GNUNET_CRYPTO_SymmetricSessionKey), | ||
76 | pub, sizeof(struct GNUNET_CRYPTO_EcdsaPublicKey), | ||
77 | label, strlen (label), | ||
78 | ctx_key, strlen (ctx_key), | ||
79 | NULL, 0); | ||
80 | GNUNET_CRYPTO_kdf (iv, sizeof(struct | ||
81 | GNUNET_CRYPTO_SymmetricInitializationVector), | ||
82 | pub, sizeof(struct GNUNET_CRYPTO_EcdsaPublicKey), | ||
83 | label, strlen (label), | ||
84 | ctx_iv, strlen (ctx_iv), | ||
85 | NULL, 0); | ||
86 | #endif | ||
87 | } | 69 | } |
88 | 70 | ||
89 | 71 | ||