Lines Matching refs:tmp
73 unsigned char tmp[128]; in rc2_setup() local
89 tmp[i] = key[i] & 255; in rc2_setup()
95 tmp[i] = permute[(tmp[i - 1] + tmp[i - keylen]) & 255]; in rc2_setup()
103 tmp[128 - T8] = permute[tmp[128 - T8] & TM]; in rc2_setup()
105 tmp[i] = permute[tmp[i + 1] ^ tmp[i + T8]]; in rc2_setup()
110 xkey[i] = (unsigned)tmp[2*i] + ((unsigned)tmp[2*i+1] << 8); in rc2_setup()
114 zeromem(tmp, sizeof(tmp)); in rc2_setup()
307 unsigned char tmp[2][8]; in rc2_test()
310 zeromem(tmp, sizeof(tmp)); in rc2_test()
315 rc2_ecb_encrypt(tests[x].pt, tmp[0], &skey); in rc2_test()
316 rc2_ecb_decrypt(tmp[0], tmp[1], &skey); in rc2_test()
318 if (XMEMCMP(tmp[0], tests[x].ct, 8) != 0 || XMEMCMP(tmp[1], tests[x].pt, 8) != 0) { in rc2_test()
323 for (y = 0; y < 8; y++) tmp[0][y] = 0; in rc2_test()
324 for (y = 0; y < 1000; y++) rc2_ecb_encrypt(tmp[0], tmp[0], &skey); in rc2_test()
325 for (y = 0; y < 1000; y++) rc2_ecb_decrypt(tmp[0], tmp[0], &skey); in rc2_test()
326 for (y = 0; y < 8; y++) if (tmp[0][y] != 0) return CRYPT_FAIL_TESTVECTOR; in rc2_test()