diff options
author | Christian Pointner <equinox@anytun.org> | 2009-01-05 11:35:09 +0000 |
---|---|---|
committer | Christian Pointner <equinox@anytun.org> | 2009-01-05 11:35:09 +0000 |
commit | 58b13392f4f59e41ca130b5ad1013787915a0d46 (patch) | |
tree | 0c3f0ccdd0bd702a2e424961f1339994ad90816d /src/key_derivation.h | |
parent | cleaned up auth algo (diff) |
added alternative implementation of key derivation using ssl crypto library
Diffstat (limited to 'src/key_derivation.h')
-rw-r--r-- | src/key_derivation.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/key_derivation.h b/src/key_derivation.h index e95c276..2f1bfb5 100644 --- a/src/key_derivation.h +++ b/src/key_derivation.h @@ -35,7 +35,11 @@ #ifndef _KEY_DERIVATION_H_ #define _KEY_DERIVATION_H_ +#ifndef USE_SSL_CRYPTO #include <gcrypt.h> +#else +#include <openssl/aes.h> +#endif #define KD_LABEL_COUNT 3 enum satp_prf_label_enum { @@ -101,7 +105,12 @@ union __attribute__((__packed__)) key_derivation_aesctr_ctr_union { typedef union key_derivation_aesctr_ctr_union key_derivation_aesctr_ctr_t; struct key_derivation_aesctr_param_struct { +#ifndef USE_SSL_CRYPTO gcry_cipher_hd_t handle_; +#else + AES_KEY aes_key_; + u_int8_t ecount_buf[AES_BLOCK_SIZE]; +#endif key_derivation_aesctr_ctr_t ctr_; }; typedef struct key_derivation_aesctr_param_struct key_derivation_aesctr_param_t; |