aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2013-09-30 11:22:48 +0000
committerChristian Grothoff <christian@grothoff.org>2013-09-30 11:22:48 +0000
commit05ef63d9f8cf65561b7ed2234efdc80e3fb40bd0 (patch)
tree7c00b58220e87d7f2f050b46e0e2f59c3795e703 /src/include
parent814457c05d62c8f0c167c6bc2015201151355249 (diff)
downloadgnunet-05ef63d9f8cf65561b7ed2234efdc80e3fb40bd0.tar.gz
gnunet-05ef63d9f8cf65561b7ed2234efdc80e3fb40bd0.zip
-encrypt using both AES and TWOFISH, with independent symmetric keys
Diffstat (limited to 'src/include')
-rw-r--r--src/include/gnunet_crypto_lib.h16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/include/gnunet_crypto_lib.h b/src/include/gnunet_crypto_lib.h
index 9b065e747..b8e38a2a2 100644
--- a/src/include/gnunet_crypto_lib.h
+++ b/src/include/gnunet_crypto_lib.h
@@ -212,22 +212,30 @@ struct GNUNET_CRYPTO_EccPrivateKey
212struct GNUNET_CRYPTO_AesSessionKey 212struct GNUNET_CRYPTO_AesSessionKey
213{ 213{
214 /** 214 /**
215 * Actual key. 215 * Actual key for AES.
216 */ 216 */
217 unsigned char key[GNUNET_CRYPTO_AES_KEY_LENGTH]; 217 unsigned char aes_key[GNUNET_CRYPTO_AES_KEY_LENGTH];
218
219 /**
220 * Actual key for TwoFish.
221 */
222 unsigned char twofish_key[GNUNET_CRYPTO_AES_KEY_LENGTH];
218 223
219}; 224};
225
220GNUNET_NETWORK_STRUCT_END 226GNUNET_NETWORK_STRUCT_END
221 227
222/** 228/**
223 * @brief IV for sym cipher 229 * @brief IV for sym cipher
224 * 230 *
225 * NOTE: must be smaller (!) in size than the 231 * NOTE: must be smaller (!) in size than the
226 * struct GNUNET_HashCode. 232 * `struct GNUNET_HashCode`.
227 */ 233 */
228struct GNUNET_CRYPTO_AesInitializationVector 234struct GNUNET_CRYPTO_AesInitializationVector
229{ 235{
230 unsigned char iv[GNUNET_CRYPTO_AES_KEY_LENGTH / 2]; 236 unsigned char aes_iv[GNUNET_CRYPTO_AES_KEY_LENGTH / 2];
237
238 unsigned char twofish_iv[GNUNET_CRYPTO_AES_KEY_LENGTH / 2];
231}; 239};
232 240
233 241