Lines Matching refs:j
167 int i, j, k; in setkey() local
196 for (j=0; j<28-1; j++) in setkey()
197 C[j] = C[j+1]; in setkey()
200 for (j=0; j<28-1; j++) in setkey()
201 D[j] = D[j+1]; in setkey()
207 for (j=0; j<24; j++) { in setkey()
208 KS[i][j] = C[PC2_C[j]-1]; in setkey()
209 KS[i][j+24] = D[PC2_D[j]-28-1]; in setkey()
299 int t, j, k; in encrypt() local
309 for (j=0; j<64; j++) in encrypt()
310 L[j] = block[IP[j]-1]; in encrypt()
328 for (j=0; j<32; j++) in encrypt()
329 tempL[j] = R[j]; in encrypt()
334 for (j=0; j<48; j++) in encrypt()
335 preS[j] = R[E[j]-1] ^ KS[i][j]; in encrypt()
347 for (j=0; j<8; j++) { in encrypt()
348 t = 6*j; in encrypt()
349 k = S[j][(preS[t+0]<<5)+ in encrypt()
355 t = 4*j; in encrypt()
365 for (j=0; j<32; j++) in encrypt()
366 R[j] = L[j] ^ f[P[j]-1]; in encrypt()
371 for (j=0; j<32; j++) in encrypt()
372 L[j] = tempL[j]; in encrypt()
377 for (j=0; j<32; j++) { in encrypt()
378 t = L[j]; in encrypt()
379 L[j] = R[j]; in encrypt()
380 R[j] = t; in encrypt()
386 for (j=0; j<64; j++) in encrypt()
387 block[j] = L[FP[j]-1]; in encrypt()
393 int i, j, c; in _crypt() local
404 for(j=0; j<7; j++, i++) in _crypt()
405 ablock[i] = (c>>(6-j)) & 01; in _crypt()
425 for(j=0;j<6;j++){ in _crypt()
426 if((c>>j) & 01){ in _crypt()
427 temp = E[6*i+j]; in _crypt()
428 E[6*i+j] = E[6*i+j+24]; in _crypt()
429 E[6*i+j+24] = temp; in _crypt()
439 for(j=0; j<6; j++){ in _crypt()
441 c |= ablock[6*i+j]; in _crypt()