aboutsummaryrefslogtreecommitdiffstats
path: root/src/block/aes_intel/aes_intel.cpp
blob: bd814e6c8bf4a23521f20dbec092037b48e0068e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
/**
* AES
* (C) 1999-2009 Jack Lloyd
*
* Distributed under the terms of the Botan license
*/

#include <botan/aes_intel.h>

namespace Botan {

/**
* AES Encryption
*/
void AES_Intel::encrypt_n(const byte in[], byte out[], u32bit blocks) const
   {
   for(u32bit i = 0; i != blocks; ++i)
      {
      in += BLOCK_SIZE;
      out += BLOCK_SIZE;
      }
   }

/**
* AES Decryption
*/
void AES_Intel::decrypt_n(const byte in[], byte out[], u32bit blocks) const
   {

   for(u32bit i = 0; i != blocks; ++i)
      {

      in += BLOCK_SIZE;
      out += BLOCK_SIZE;
      }
   }

/**
* AES Key Schedule
*/
void AES_Intel::key_schedule(const byte key[], u32bit length)
   {
   }

/**
* AES Constructor
*/
AES_Intel::AES_Intel(u32bit key_size) : BlockCipher(16, key_size)
   {
   if(key_size != 16 && key_size != 24 && key_size != 32)
      throw Invalid_Key_Length(name(), key_size);
   ROUNDS = (key_size / 4) + 6;
   }

/**
* Clear memory of sensitive data
*/
void AES_Intel::clear()
   {
   }

}