diff options
author | Christian Grothoff <christian@grothoff.org> | 2013-09-30 11:32:30 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2013-09-30 11:32:30 +0000 |
commit | 45b5c1f11144bc14fae34c991ae9db89d6ba8913 (patch) | |
tree | f4a2fbe70573e0d9bb56d4ccb8be29fcf0c50c55 /src/namestore | |
parent | 05ef63d9f8cf65561b7ed2234efdc80e3fb40bd0 (diff) | |
download | gnunet-45b5c1f11144bc14fae34c991ae9db89d6ba8913.tar.gz gnunet-45b5c1f11144bc14fae34c991ae9db89d6ba8913.zip |
-rename files/symbols from _aes to _symmetric
Diffstat (limited to 'src/namestore')
-rw-r--r-- | src/namestore/namestore_api_common.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/namestore/namestore_api_common.c b/src/namestore/namestore_api_common.c index 55c9055ff..d54dc3e7f 100644 --- a/src/namestore/namestore_api_common.c +++ b/src/namestore/namestore_api_common.c | |||
@@ -321,20 +321,20 @@ GNUNET_NAMESTORE_record_get_expiration_time (unsigned int rd_count, | |||
321 | * @param pub public key to use for KDF | 321 | * @param pub public key to use for KDF |
322 | */ | 322 | */ |
323 | static void | 323 | static void |
324 | derive_block_aes_key (struct GNUNET_CRYPTO_AesInitializationVector *iv, | 324 | derive_block_aes_key (struct GNUNET_CRYPTO_SymmetricInitializationVector *iv, |
325 | struct GNUNET_CRYPTO_AesSessionKey *skey, | 325 | struct GNUNET_CRYPTO_SymmetricSessionKey *skey, |
326 | const char *label, | 326 | const char *label, |
327 | const struct GNUNET_CRYPTO_EccPublicSignKey *pub) | 327 | const struct GNUNET_CRYPTO_EccPublicSignKey *pub) |
328 | { | 328 | { |
329 | static const char ctx_key[] = "gns-aes-ctx-key"; | 329 | static const char ctx_key[] = "gns-aes-ctx-key"; |
330 | static const char ctx_iv[] = "gns-aes-ctx-iv"; | 330 | static const char ctx_iv[] = "gns-aes-ctx-iv"; |
331 | 331 | ||
332 | GNUNET_CRYPTO_kdf (skey, sizeof (struct GNUNET_CRYPTO_AesSessionKey), | 332 | GNUNET_CRYPTO_kdf (skey, sizeof (struct GNUNET_CRYPTO_SymmetricSessionKey), |
333 | pub, sizeof (struct GNUNET_CRYPTO_EccPublicSignKey), | 333 | pub, sizeof (struct GNUNET_CRYPTO_EccPublicSignKey), |
334 | label, strlen (label), | 334 | label, strlen (label), |
335 | ctx_key, strlen (ctx_key), | 335 | ctx_key, strlen (ctx_key), |
336 | NULL, 0); | 336 | NULL, 0); |
337 | GNUNET_CRYPTO_kdf (iv, sizeof (struct GNUNET_CRYPTO_AesInitializationVector), | 337 | GNUNET_CRYPTO_kdf (iv, sizeof (struct GNUNET_CRYPTO_SymmetricInitializationVector), |
338 | pub, sizeof (struct GNUNET_CRYPTO_EccPublicSignKey), | 338 | pub, sizeof (struct GNUNET_CRYPTO_EccPublicSignKey), |
339 | label, strlen (label), | 339 | label, strlen (label), |
340 | ctx_iv, strlen (ctx_iv), | 340 | ctx_iv, strlen (ctx_iv), |
@@ -364,8 +364,8 @@ GNUNET_NAMESTORE_block_create (const struct GNUNET_CRYPTO_EccPrivateKey *key, | |||
364 | struct GNUNET_NAMESTORE_Block *block; | 364 | struct GNUNET_NAMESTORE_Block *block; |
365 | struct GNUNET_CRYPTO_EccPublicSignKey pkey; | 365 | struct GNUNET_CRYPTO_EccPublicSignKey pkey; |
366 | struct GNUNET_CRYPTO_EccPrivateKey *dkey; | 366 | struct GNUNET_CRYPTO_EccPrivateKey *dkey; |
367 | struct GNUNET_CRYPTO_AesInitializationVector iv; | 367 | struct GNUNET_CRYPTO_SymmetricInitializationVector iv; |
368 | struct GNUNET_CRYPTO_AesSessionKey skey; | 368 | struct GNUNET_CRYPTO_SymmetricSessionKey skey; |
369 | uint32_t rd_count_nbo; | 369 | uint32_t rd_count_nbo; |
370 | 370 | ||
371 | if (payload_len > GNUNET_NAMESTORE_MAX_VALUE_SIZE) | 371 | if (payload_len > GNUNET_NAMESTORE_MAX_VALUE_SIZE) |
@@ -391,7 +391,7 @@ GNUNET_NAMESTORE_block_create (const struct GNUNET_CRYPTO_EccPrivateKey *key, | |||
391 | &pkey); | 391 | &pkey); |
392 | derive_block_aes_key (&iv, &skey, label, &pkey); | 392 | derive_block_aes_key (&iv, &skey, label, &pkey); |
393 | GNUNET_break (payload_len + sizeof (uint32_t) == | 393 | GNUNET_break (payload_len + sizeof (uint32_t) == |
394 | GNUNET_CRYPTO_aes_encrypt (payload, payload_len + sizeof (uint32_t), | 394 | GNUNET_CRYPTO_symmetric_encrypt (payload, payload_len + sizeof (uint32_t), |
395 | &skey, &iv, | 395 | &skey, &iv, |
396 | &block[1])); | 396 | &block[1])); |
397 | if (GNUNET_OK != | 397 | if (GNUNET_OK != |
@@ -447,8 +447,8 @@ GNUNET_NAMESTORE_block_decrypt (const struct GNUNET_NAMESTORE_Block *block, | |||
447 | size_t payload_len = ntohl (block->purpose.size) - | 447 | size_t payload_len = ntohl (block->purpose.size) - |
448 | sizeof (struct GNUNET_CRYPTO_EccSignaturePurpose) - | 448 | sizeof (struct GNUNET_CRYPTO_EccSignaturePurpose) - |
449 | sizeof (struct GNUNET_TIME_AbsoluteNBO); | 449 | sizeof (struct GNUNET_TIME_AbsoluteNBO); |
450 | struct GNUNET_CRYPTO_AesInitializationVector iv; | 450 | struct GNUNET_CRYPTO_SymmetricInitializationVector iv; |
451 | struct GNUNET_CRYPTO_AesSessionKey skey; | 451 | struct GNUNET_CRYPTO_SymmetricSessionKey skey; |
452 | 452 | ||
453 | if (ntohl (block->purpose.size) < | 453 | if (ntohl (block->purpose.size) < |
454 | sizeof (struct GNUNET_CRYPTO_EccSignaturePurpose) + | 454 | sizeof (struct GNUNET_CRYPTO_EccSignaturePurpose) + |
@@ -463,7 +463,7 @@ GNUNET_NAMESTORE_block_decrypt (const struct GNUNET_NAMESTORE_Block *block, | |||
463 | uint32_t rd_count; | 463 | uint32_t rd_count; |
464 | 464 | ||
465 | GNUNET_break (payload_len == | 465 | GNUNET_break (payload_len == |
466 | GNUNET_CRYPTO_aes_decrypt (&block[1], payload_len, | 466 | GNUNET_CRYPTO_symmetric_decrypt (&block[1], payload_len, |
467 | &skey, &iv, | 467 | &skey, &iv, |
468 | payload)); | 468 | payload)); |
469 | memcpy (&rd_count, | 469 | memcpy (&rd_count, |