Symmetric encryption services; combined cipher AES+TWOFISH (256-bit each) More...
Go to the source code of this file.
Macros | |
| #define | LOG(kind, ...) |
Functions | |
| void | GNUNET_CRYPTO_symmetric_create_session_key (struct GNUNET_CRYPTO_SymmetricSessionKey *key) |
| Create a new SessionKey (for symmetric encryption). | |
| static int | setup_cipher_aes (gcry_cipher_hd_t *handle, const struct GNUNET_CRYPTO_SymmetricSessionKey *sessionkey, const struct GNUNET_CRYPTO_SymmetricInitializationVector *iv) |
| Initialize AES cipher. | |
| static int | setup_cipher_twofish (gcry_cipher_hd_t *handle, const struct GNUNET_CRYPTO_SymmetricSessionKey *sessionkey, const struct GNUNET_CRYPTO_SymmetricInitializationVector *iv) |
| Initialize TWOFISH cipher. | |
| ssize_t | GNUNET_CRYPTO_symmetric_encrypt (const void *block, size_t size, const struct GNUNET_CRYPTO_SymmetricSessionKey *sessionkey, const struct GNUNET_CRYPTO_SymmetricInitializationVector *iv, void *result) |
| Encrypt a block with a symmetric session key. | |
| ssize_t | GNUNET_CRYPTO_symmetric_decrypt (const void *block, size_t size, const struct GNUNET_CRYPTO_SymmetricSessionKey *sessionkey, const struct GNUNET_CRYPTO_SymmetricInitializationVector *iv, void *result) |
| Decrypt a given block with the session key. | |
| void | GNUNET_CRYPTO_symmetric_derive_iv (struct GNUNET_CRYPTO_SymmetricInitializationVector *iv, const struct GNUNET_CRYPTO_SymmetricSessionKey *skey, const void *salt, size_t salt_len,...) |
| Derive an IV. | |
| void | GNUNET_CRYPTO_symmetric_derive_iv_v (struct GNUNET_CRYPTO_SymmetricInitializationVector *iv, const struct GNUNET_CRYPTO_SymmetricSessionKey *skey, const void *salt, size_t salt_len, va_list argp) |
| Derive an IV. | |
Symmetric encryption services; combined cipher AES+TWOFISH (256-bit each)
Definition in file crypto_symmetric.c.
| #define LOG | ( | kind, | |
| ... | |||
| ) |
Definition at line 33 of file crypto_symmetric.c.
|
static |
Initialize AES cipher.
| handle | handle to initialize |
| sessionkey | session key to use |
| iv | initialization vector to use |
Definition at line 64 of file crypto_symmetric.c.
References GNUNET_CRYPTO_SymmetricInitializationVector::aes_iv, GNUNET_CRYPTO_SymmetricSessionKey::aes_key, GNUNET_assert, GNUNET_OK, and handle.
Referenced by GNUNET_CRYPTO_symmetric_decrypt(), and GNUNET_CRYPTO_symmetric_encrypt().
|
static |
Initialize TWOFISH cipher.
| handle | handle to initialize |
| sessionkey | session key to use |
| iv | initialization vector to use |
Definition at line 94 of file crypto_symmetric.c.
References GNUNET_assert, GNUNET_OK, handle, GNUNET_CRYPTO_SymmetricInitializationVector::twofish_iv, and GNUNET_CRYPTO_SymmetricSessionKey::twofish_key.
Referenced by GNUNET_CRYPTO_symmetric_decrypt(), and GNUNET_CRYPTO_symmetric_encrypt().