37 int aesni_set_encrypt_key(
const unsigned char *userKey,
int bits,AES_KEY *key);
38 int aesni_set_decrypt_key(
const unsigned char *userKey,
int bits,AES_KEY *key);
39 void aesni_encrypt(
const unsigned char *in,
unsigned char *out,
63 #ifdef INTEL_IPP_CRYPTO
64 ippsRijndael128Init(key, IppsRijndaelKey128,
m_keyAES1);
65 ippsRijndael128Init(key, IppsRijndaelKey128,
m_keyAES2);
96 CAMsg::printMsg(LOG_DEBUG,
"CASymCipherOFB::setKeys() - keysize %u\n",keysize);
104 #ifdef INTEL_IPP_CRYPTO
105 ippsRijndael128Init(key, IppsRijndaelKey128,
m_keyAES1);
109 aesni_set_encrypt_key(key,128,
m_keyAES1);
138 #ifdef INTEL_IPP_CRYPTO
150 #ifdef INTEL_IPP_CRYPTO
161 out[i]=in[i]^
m_iv1[0];
163 out[i]=in[i]^
m_iv1[1];
165 out[i]=in[i]^
m_iv1[2];
167 out[i]=in[i]^
m_iv1[3];
169 out[i]=in[i]^
m_iv1[4];
171 out[i]=in[i]^
m_iv1[5];
173 out[i]=in[i]^
m_iv1[6];
175 out[i]=in[i]^
m_iv1[7];
177 out[i]=in[i]^
m_iv1[8];
179 out[i]=in[i]^
m_iv1[9];
181 out[i]=in[i]^
m_iv1[10];
183 out[i]=in[i]^
m_iv1[11];
185 out[i]=in[i]^
m_iv1[12];
187 out[i]=in[i]^
m_iv1[13];
189 out[i]=in[i]^
m_iv1[14];
191 out[i]=in[i]^
m_iv1[15];
196 #ifdef INTEL_IPP_CRYPTO
211 out[i]=in[i]^
m_iv1[k];
231 #ifdef INTEL_IPP_CRYPTO
240 out[i]=in[i]^
m_iv2[0];
242 out[i]=in[i]^
m_iv2[1];
244 out[i]=in[i]^
m_iv2[2];
246 out[i]=in[i]^
m_iv2[3];
248 out[i]=in[i]^
m_iv2[4];
250 out[i]=in[i]^
m_iv2[5];
252 out[i]=in[i]^
m_iv2[6];
254 out[i]=in[i]^
m_iv2[7];
256 out[i]=in[i]^
m_iv2[8];
258 out[i]=in[i]^
m_iv2[9];
260 out[i]=in[i]^
m_iv2[10];
262 out[i]=in[i]^
m_iv2[11];
264 out[i]=in[i]^
m_iv2[12];
266 out[i]=in[i]^
m_iv2[13];
268 out[i]=in[i]^
m_iv2[14];
270 out[i]=in[i]^
m_iv2[15];
275 #ifdef INTEL_IPP_CRYPTO
287 out[i]=in[i]^
m_iv2[k];
static SINT32 printMsg(UINT32 typ, const char *format,...)
Writes a given message to the log.
SINT32 setKeys(const UINT8 *key, UINT32 keysize)
Sets the keys for crypt1() and crypt2() either to the same key (if keysize==KEY_SIZE) or to different...
SINT32 setKey(const UINT8 *key)
Sets the keys for crypt1() and crypt2() to the same key.
SINT32 crypt1(const UINT8 *in, UINT8 *out, UINT32 len)
Encryptes/Decrpytes in to out using iv1 and key1.
SINT32 crypt2(const UINT8 *in, UINT8 *out, UINT32 len)
Decryptes in to out using iv2 and key2.