diff options
author | Christian Grothoff <christian@grothoff.org> | 2019-12-07 14:45:44 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2019-12-07 14:45:44 +0100 |
commit | b365e4d52a723b48bb018a8c2dbfc8fe1050988a (patch) | |
tree | e1580b45148cafa7f85dff8272f50dc18661b420 /src/gnsrecord | |
parent | 3a13f497bc0edad6e1155685f167fafa5e58e75f (diff) | |
download | gnunet-b365e4d52a723b48bb018a8c2dbfc8fe1050988a.tar.gz gnunet-b365e4d52a723b48bb018a8c2dbfc8fe1050988a.zip |
flip LSD0001 defines
Diffstat (limited to 'src/gnsrecord')
-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 | ||