Lines Matching defs:PAD
48 unsigned char PAD[16], ctr[16], CTRPAD[16], b;
143 PAD[x++] = (unsigned char)(((headerlen > 0) ? (1<<6) : 0) |
149 PAD[x++] = nonce[y];
162 PAD[x++] = 0;
165 PAD[x++] = (unsigned char)((len >> 24) & 255);
169 /* encrypt PAD */
170 if ((err = cipher_descriptor[cipher].ecb_encrypt(PAD, PAD, skey)) != CRYPT_OK) {
180 PAD[x++] ^= (headerlen>>8) & 255;
181 PAD[x++] ^= headerlen & 255;
183 PAD[x++] ^= 0xFF;
184 PAD[x++] ^= 0xFE;
185 PAD[x++] ^= (headerlen>>24) & 255;
186 PAD[x++] ^= (headerlen>>16) & 255;
187 PAD[x++] ^= (headerlen>>8) & 255;
188 PAD[x++] ^= headerlen & 255;
195 if ((err = cipher_descriptor[cipher].ecb_encrypt(PAD, PAD, skey)) != CRYPT_OK) {
200 PAD[x++] ^= header[y];
205 if ((err = cipher_descriptor[cipher].ecb_encrypt(PAD, PAD, skey)) != CRYPT_OK) {
245 /* xor the PT against the pad first */
247 *((LTC_FAST_TYPE*)(&PAD[z])) ^= *((LTC_FAST_TYPE*)(&pt[y+z]));
250 if ((err = cipher_descriptor[cipher].ecb_encrypt(PAD, PAD, skey)) != CRYPT_OK) {
265 /* xor the PT against the pad last */
268 *((LTC_FAST_TYPE*)(&PAD[z])) ^= *((LTC_FAST_TYPE*)(&pt[y+z]));
270 if ((err = cipher_descriptor[cipher].ecb_encrypt(PAD, PAD, skey)) != CRYPT_OK) {
301 if ((err = cipher_descriptor[cipher].ecb_encrypt(PAD, PAD, skey)) != CRYPT_OK) {
306 PAD[x++] ^= b;
310 if ((err = cipher_descriptor[cipher].ecb_encrypt(PAD, PAD, skey)) != CRYPT_OK) {
330 tag[x] = PAD[x] ^ CTRPAD[x];
336 zeromem(PAD, sizeof(PAD));