diff options
Diffstat (limited to 'src/include/gnunet_crypto_lib.h')
-rw-r--r-- | src/include/gnunet_crypto_lib.h | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/src/include/gnunet_crypto_lib.h b/src/include/gnunet_crypto_lib.h index b8e38a2a2..1d000c29a 100644 --- a/src/include/gnunet_crypto_lib.h +++ b/src/include/gnunet_crypto_lib.h | |||
@@ -209,7 +209,7 @@ struct GNUNET_CRYPTO_EccPrivateKey | |||
209 | /** | 209 | /** |
210 | * @brief type for session keys | 210 | * @brief type for session keys |
211 | */ | 211 | */ |
212 | struct GNUNET_CRYPTO_AesSessionKey | 212 | struct GNUNET_CRYPTO_SymmetricSessionKey |
213 | { | 213 | { |
214 | /** | 214 | /** |
215 | * Actual key for AES. | 215 | * Actual key for AES. |
@@ -231,7 +231,7 @@ GNUNET_NETWORK_STRUCT_END | |||
231 | * NOTE: must be smaller (!) in size than the | 231 | * NOTE: must be smaller (!) in size than the |
232 | * `struct GNUNET_HashCode`. | 232 | * `struct GNUNET_HashCode`. |
233 | */ | 233 | */ |
234 | struct GNUNET_CRYPTO_AesInitializationVector | 234 | struct GNUNET_CRYPTO_SymmetricInitializationVector |
235 | { | 235 | { |
236 | unsigned char aes_iv[GNUNET_CRYPTO_AES_KEY_LENGTH / 2]; | 236 | unsigned char aes_iv[GNUNET_CRYPTO_AES_KEY_LENGTH / 2]; |
237 | 237 | ||
@@ -352,7 +352,7 @@ GNUNET_CRYPTO_random_permute (enum GNUNET_CRYPTO_Quality mode, unsigned int n); | |||
352 | * @param key key to initialize | 352 | * @param key key to initialize |
353 | */ | 353 | */ |
354 | void | 354 | void |
355 | GNUNET_CRYPTO_aes_create_session_key (struct GNUNET_CRYPTO_AesSessionKey *key); | 355 | GNUNET_CRYPTO_symmetric_create_session_key (struct GNUNET_CRYPTO_SymmetricSessionKey *key); |
356 | 356 | ||
357 | 357 | ||
358 | /** | 358 | /** |
@@ -367,9 +367,9 @@ GNUNET_CRYPTO_aes_create_session_key (struct GNUNET_CRYPTO_AesSessionKey *key); | |||
367 | * @return the size of the encrypted block, -1 for errors | 367 | * @return the size of the encrypted block, -1 for errors |
368 | */ | 368 | */ |
369 | ssize_t | 369 | ssize_t |
370 | GNUNET_CRYPTO_aes_encrypt (const void *block, size_t len, | 370 | GNUNET_CRYPTO_symmetric_encrypt (const void *block, size_t len, |
371 | const struct GNUNET_CRYPTO_AesSessionKey *sessionkey, | 371 | const struct GNUNET_CRYPTO_SymmetricSessionKey *sessionkey, |
372 | const struct GNUNET_CRYPTO_AesInitializationVector | 372 | const struct GNUNET_CRYPTO_SymmetricInitializationVector |
373 | *iv, void *result); | 373 | *iv, void *result); |
374 | 374 | ||
375 | 375 | ||
@@ -385,9 +385,9 @@ GNUNET_CRYPTO_aes_encrypt (const void *block, size_t len, | |||
385 | * @return -1 on failure, size of decrypted block on success | 385 | * @return -1 on failure, size of decrypted block on success |
386 | */ | 386 | */ |
387 | ssize_t | 387 | ssize_t |
388 | GNUNET_CRYPTO_aes_decrypt (const void *block, size_t size, | 388 | GNUNET_CRYPTO_symmetric_decrypt (const void *block, size_t size, |
389 | const struct GNUNET_CRYPTO_AesSessionKey *sessionkey, | 389 | const struct GNUNET_CRYPTO_SymmetricSessionKey *sessionkey, |
390 | const struct GNUNET_CRYPTO_AesInitializationVector | 390 | const struct GNUNET_CRYPTO_SymmetricInitializationVector |
391 | *iv, void *result); | 391 | *iv, void *result); |
392 | 392 | ||
393 | 393 | ||
@@ -401,8 +401,8 @@ GNUNET_CRYPTO_aes_decrypt (const void *block, size_t size, | |||
401 | * @param ... pairs of void * & size_t for context chunks, terminated by NULL | 401 | * @param ... pairs of void * & size_t for context chunks, terminated by NULL |
402 | */ | 402 | */ |
403 | void | 403 | void |
404 | GNUNET_CRYPTO_aes_derive_iv (struct GNUNET_CRYPTO_AesInitializationVector *iv, | 404 | GNUNET_CRYPTO_symmetric_derive_iv (struct GNUNET_CRYPTO_SymmetricInitializationVector *iv, |
405 | const struct GNUNET_CRYPTO_AesSessionKey *skey, | 405 | const struct GNUNET_CRYPTO_SymmetricSessionKey *skey, |
406 | const void *salt, size_t salt_len, ...); | 406 | const void *salt, size_t salt_len, ...); |
407 | 407 | ||
408 | 408 | ||
@@ -415,8 +415,8 @@ GNUNET_CRYPTO_aes_derive_iv (struct GNUNET_CRYPTO_AesInitializationVector *iv, | |||
415 | * @param argp pairs of void * & size_t for context chunks, terminated by NULL | 415 | * @param argp pairs of void * & size_t for context chunks, terminated by NULL |
416 | */ | 416 | */ |
417 | void | 417 | void |
418 | GNUNET_CRYPTO_aes_derive_iv_v (struct GNUNET_CRYPTO_AesInitializationVector *iv, | 418 | GNUNET_CRYPTO_symmetric_derive_iv_v (struct GNUNET_CRYPTO_SymmetricInitializationVector *iv, |
419 | const struct GNUNET_CRYPTO_AesSessionKey *skey, | 419 | const struct GNUNET_CRYPTO_SymmetricSessionKey *skey, |
420 | const void *salt, size_t salt_len, va_list argp); | 420 | const void *salt, size_t salt_len, va_list argp); |
421 | 421 | ||
422 | 422 | ||
@@ -610,8 +610,8 @@ GNUNET_CRYPTO_hash_xor (const struct GNUNET_HashCode * a, const struct GNUNET_Ha | |||
610 | */ | 610 | */ |
611 | void | 611 | void |
612 | GNUNET_CRYPTO_hash_to_aes_key (const struct GNUNET_HashCode * hc, | 612 | GNUNET_CRYPTO_hash_to_aes_key (const struct GNUNET_HashCode * hc, |
613 | struct GNUNET_CRYPTO_AesSessionKey *skey, | 613 | struct GNUNET_CRYPTO_SymmetricSessionKey *skey, |
614 | struct GNUNET_CRYPTO_AesInitializationVector | 614 | struct GNUNET_CRYPTO_SymmetricInitializationVector |
615 | *iv); | 615 | *iv); |
616 | 616 | ||
617 | 617 | ||
@@ -685,7 +685,7 @@ GNUNET_CRYPTO_hash_xorcmp (const struct GNUNET_HashCode * h1, | |||
685 | */ | 685 | */ |
686 | void | 686 | void |
687 | GNUNET_CRYPTO_hmac_derive_key_v (struct GNUNET_CRYPTO_AuthKey *key, | 687 | GNUNET_CRYPTO_hmac_derive_key_v (struct GNUNET_CRYPTO_AuthKey *key, |
688 | const struct GNUNET_CRYPTO_AesSessionKey *rkey, | 688 | const struct GNUNET_CRYPTO_SymmetricSessionKey *rkey, |
689 | const void *salt, size_t salt_len, | 689 | const void *salt, size_t salt_len, |
690 | va_list argp); | 690 | va_list argp); |
691 | 691 | ||
@@ -701,7 +701,7 @@ GNUNET_CRYPTO_hmac_derive_key_v (struct GNUNET_CRYPTO_AuthKey *key, | |||
701 | */ | 701 | */ |
702 | void | 702 | void |
703 | GNUNET_CRYPTO_hmac_derive_key (struct GNUNET_CRYPTO_AuthKey *key, | 703 | GNUNET_CRYPTO_hmac_derive_key (struct GNUNET_CRYPTO_AuthKey *key, |
704 | const struct GNUNET_CRYPTO_AesSessionKey *rkey, | 704 | const struct GNUNET_CRYPTO_SymmetricSessionKey *rkey, |
705 | const void *salt, size_t salt_len, ...); | 705 | const void *salt, size_t salt_len, ...); |
706 | 706 | ||
707 | 707 | ||