aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstrongswan/crypto/aead.c
diff options
context:
space:
mode:
authorMartin Willi <martin@revosec.ch>2015-03-31 14:59:12 +0200
committerMartin Willi <martin@revosec.ch>2015-04-13 15:06:15 +0200
commit3c81cb6fc3225423ce82bbd97bd6fd9b70df8cc0 (patch)
tree73734ac0beef72de5a8ca3dff9b69c57a5e27fc1 /src/libstrongswan/crypto/aead.c
parenta4549e55250e35033cb5984d834f174eec795e9e (diff)
downloadstrongswan-3c81cb6fc3225423ce82bbd97bd6fd9b70df8cc0.tar.bz2
strongswan-3c81cb6fc3225423ce82bbd97bd6fd9b70df8cc0.tar.xz
aead: Create AEAD using traditional transforms with an explicit IV generator
Real AEADs directly provide a suitable IV generator, but traditional crypters do not. For some (stream) ciphers, we should use sequential IVs, for which we pass an appropriate generator to the AEAD wrapper.
Diffstat (limited to 'src/libstrongswan/crypto/aead.c')
-rw-r--r--src/libstrongswan/crypto/aead.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstrongswan/crypto/aead.c b/src/libstrongswan/crypto/aead.c
index afcc11fbe..d50bd4d22 100644
--- a/src/libstrongswan/crypto/aead.c
+++ b/src/libstrongswan/crypto/aead.c
@@ -172,7 +172,7 @@ METHOD(aead_t, destroy, void,
/**
* See header
*/
-aead_t *aead_create(crypter_t *crypter, signer_t *signer)
+aead_t *aead_create(crypter_t *crypter, signer_t *signer, iv_gen_t *iv_gen)
{
private_aead_t *this;
@@ -190,7 +190,7 @@ aead_t *aead_create(crypter_t *crypter, signer_t *signer)
},
.crypter = crypter,
.signer = signer,
- .iv_gen = iv_gen_rand_create(),
+ .iv_gen = iv_gen,
);
return &this->public;