00001 #ifndef __AES_KERNEL__
00002 #define __AES_KERNEL__
00003
00004 #include <stdint.h>
00005 #include <cuda_runtime.h>
00006
00007 void AES_cbc_128_decrypt_gpu(const uint8_t *in_d,
00008 uint8_t *out_d,
00009 uint8_t *keys_d,
00010 uint8_t *ivs_d,
00011 uint16_t *pkt_index_d,
00012 unsigned long block_count,
00013 uint8_t *checkbits_d,
00014 const unsigned int threads_per_blk,
00015 cudaStream_t stream = 0);
00016
00017 void AES_cbc_128_encrypt_gpu(const uint8_t *in_d,
00018 uint8_t *out_d,
00019 const uint32_t* pkt_offset_d,
00020 const uint8_t *keys_d,
00021 uint8_t *ivs_d,
00022 const unsigned int numFlows,
00023 uint8_t *checkbits_d,
00024 const unsigned int threads_per_blk,
00025 cudaStream_t stream = 0);
00026
00027 void AES_ecb_128_encrypt_gpu(const uint8_t *in_d,
00028 uint8_t * out_d,
00029 const uint8_t * keys_d,
00030 uint16_t * pkt_index_d,
00031 unsigned long block_count,
00032 const unsigned int threads_per_blk,
00033 cudaStream_t stream = 0);
00034
00035
00036 void AES_decrypt_key_prepare(uint8_t *dec_key,
00037 const uint8_t *enc_key,
00038 unsigned int key_bits);
00039
00040 #endif