diff options
author | Martin Willi <martin@revosec.ch> | 2010-08-13 14:11:38 +0200 |
---|---|---|
committer | Martin Willi <martin@revosec.ch> | 2010-08-13 17:11:53 +0200 |
commit | 42cbe87fc7fc80e23d3941b712acfadc29e00a2c (patch) | |
tree | b4826718551482e1319650440f0f557de438292f /src/libstrongswan/crypto/crypters/crypter.h | |
parent | 3b77c27a5b30f726bbc86f175439e1fcb3f36a31 (diff) | |
download | strongswan-42cbe87fc7fc80e23d3941b712acfadc29e00a2c.tar.bz2 strongswan-42cbe87fc7fc80e23d3941b712acfadc29e00a2c.tar.xz |
Implemented AES/Camellia counter mode in gcrypt
Diffstat (limited to 'src/libstrongswan/crypto/crypters/crypter.h')
-rw-r--r-- | src/libstrongswan/crypto/crypters/crypter.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/libstrongswan/crypto/crypters/crypter.h b/src/libstrongswan/crypto/crypters/crypter.h index 70697e207..6596d469c 100644 --- a/src/libstrongswan/crypto/crypters/crypter.h +++ b/src/libstrongswan/crypto/crypters/crypter.h @@ -42,6 +42,7 @@ enum encryption_algorithm_t { ENCR_DES_IV32 = 9, ENCR_NULL = 11, ENCR_AES_CBC = 12, + /** CTR as specified for IPsec (RFC5930/RFC3686), nonce appended to key */ ENCR_AES_CTR = 13, ENCR_AES_CCM_ICV8 = 14, ENCR_AES_CCM_ICV12 = 15, @@ -51,6 +52,7 @@ enum encryption_algorithm_t { ENCR_AES_GCM_ICV16 = 20, ENCR_NULL_AUTH_AES_GMAC = 21, ENCR_CAMELLIA_CBC = 23, + /* CTR as specified for IPsec (RFC5529), nonce appended to key */ ENCR_CAMELLIA_CTR = 24, ENCR_CAMELLIA_CCM_ICV8 = 25, ENCR_CAMELLIA_CCM_ICV12 = 26, @@ -109,6 +111,10 @@ struct crypter_t { /** * Get the block size of the crypto algorithm. * + * get_block_size() returns the smallest block the crypter can handle, + * not the block size of the underlying crypto algorithm. For counter mode, + * it is usually 1. + * * @return block size in bytes */ size_t (*get_block_size) (crypter_t *this); @@ -123,6 +129,10 @@ struct crypter_t { /** * Get the key size of the crypto algorithm. * + * get_key_size() might return a key length different from the key + * size passed to the factory constructor. For Counter Mode, the nonce + * is handled as a part of the key material and is passed to set_key(). + * * @return key size in bytes */ size_t (*get_key_size) (crypter_t *this); |