Lines Matching refs:r

573 #define F1(D,m,r)  (  (I = ((m) + (D))), (I=rol((r),I)),   \  argument
575 #define F2(D,m,r) ( (I = ((m) ^ (D))), (I=rol((r),I)), \ argument
577 #define F3(D,m,r) ( (I = ((m) - (D))), (I=rol((r),I)), \ argument
584 u32 l, r, t; in cast5_encrypt() local
596 r = inbuf[4] << 24 | inbuf[5] << 16 | inbuf[6] << 8 | inbuf[7]; in cast5_encrypt()
607 t = l; l = r; r = t ^ F1(r, Km[0], Kr[0]); in cast5_encrypt()
608 t = l; l = r; r = t ^ F2(r, Km[1], Kr[1]); in cast5_encrypt()
609 t = l; l = r; r = t ^ F3(r, Km[2], Kr[2]); in cast5_encrypt()
610 t = l; l = r; r = t ^ F1(r, Km[3], Kr[3]); in cast5_encrypt()
611 t = l; l = r; r = t ^ F2(r, Km[4], Kr[4]); in cast5_encrypt()
612 t = l; l = r; r = t ^ F3(r, Km[5], Kr[5]); in cast5_encrypt()
613 t = l; l = r; r = t ^ F1(r, Km[6], Kr[6]); in cast5_encrypt()
614 t = l; l = r; r = t ^ F2(r, Km[7], Kr[7]); in cast5_encrypt()
615 t = l; l = r; r = t ^ F3(r, Km[8], Kr[8]); in cast5_encrypt()
616 t = l; l = r; r = t ^ F1(r, Km[9], Kr[9]); in cast5_encrypt()
617 t = l; l = r; r = t ^ F2(r, Km[10], Kr[10]); in cast5_encrypt()
618 t = l; l = r; r = t ^ F3(r, Km[11], Kr[11]); in cast5_encrypt()
619 t = l; l = r; r = t ^ F1(r, Km[12], Kr[12]); in cast5_encrypt()
620 t = l; l = r; r = t ^ F2(r, Km[13], Kr[13]); in cast5_encrypt()
621 t = l; l = r; r = t ^ F3(r, Km[14], Kr[14]); in cast5_encrypt()
622 t = l; l = r; r = t ^ F1(r, Km[15], Kr[15]); in cast5_encrypt()
624 t = l; l = r; r = t ^ F1(r, Km[0], Kr[0]); in cast5_encrypt()
625 t = l; l = r; r = t ^ F2(r, Km[1], Kr[1]); in cast5_encrypt()
626 t = l; l = r; r = t ^ F3(r, Km[2], Kr[2]); in cast5_encrypt()
627 t = l; l = r; r = t ^ F1(r, Km[3], Kr[3]); in cast5_encrypt()
628 t = l; l = r; r = t ^ F2(r, Km[4], Kr[4]); in cast5_encrypt()
629 t = l; l = r; r = t ^ F3(r, Km[5], Kr[5]); in cast5_encrypt()
630 t = l; l = r; r = t ^ F1(r, Km[6], Kr[6]); in cast5_encrypt()
631 t = l; l = r; r = t ^ F2(r, Km[7], Kr[7]); in cast5_encrypt()
632 t = l; l = r; r = t ^ F3(r, Km[8], Kr[8]); in cast5_encrypt()
633 t = l; l = r; r = t ^ F1(r, Km[9], Kr[9]); in cast5_encrypt()
634 t = l; l = r; r = t ^ F2(r, Km[10], Kr[10]); in cast5_encrypt()
635 t = l; l = r; r = t ^ F3(r, Km[11], Kr[11]); in cast5_encrypt()
640 outbuf[0] = (r >> 24) & 0xff; in cast5_encrypt()
641 outbuf[1] = (r >> 16) & 0xff; in cast5_encrypt()
642 outbuf[2] = (r >> 8) & 0xff; in cast5_encrypt()
643 outbuf[3] = r & 0xff; in cast5_encrypt()
653 u32 l, r, t; in cast5_decrypt() local
662 r = inbuf[4] << 24 | inbuf[5] << 16 | inbuf[6] << 8 | inbuf[7]; in cast5_decrypt()
665 t = l; l = r; r = t ^ F1(r, Km[15], Kr[15]); in cast5_decrypt()
666 t = l; l = r; r = t ^ F3(r, Km[14], Kr[14]); in cast5_decrypt()
667 t = l; l = r; r = t ^ F2(r, Km[13], Kr[13]); in cast5_decrypt()
668 t = l; l = r; r = t ^ F1(r, Km[12], Kr[12]); in cast5_decrypt()
669 t = l; l = r; r = t ^ F3(r, Km[11], Kr[11]); in cast5_decrypt()
670 t = l; l = r; r = t ^ F2(r, Km[10], Kr[10]); in cast5_decrypt()
671 t = l; l = r; r = t ^ F1(r, Km[9], Kr[9]); in cast5_decrypt()
672 t = l; l = r; r = t ^ F3(r, Km[8], Kr[8]); in cast5_decrypt()
673 t = l; l = r; r = t ^ F2(r, Km[7], Kr[7]); in cast5_decrypt()
674 t = l; l = r; r = t ^ F1(r, Km[6], Kr[6]); in cast5_decrypt()
675 t = l; l = r; r = t ^ F3(r, Km[5], Kr[5]); in cast5_decrypt()
676 t = l; l = r; r = t ^ F2(r, Km[4], Kr[4]); in cast5_decrypt()
677 t = l; l = r; r = t ^ F1(r, Km[3], Kr[3]); in cast5_decrypt()
678 t = l; l = r; r = t ^ F3(r, Km[2], Kr[2]); in cast5_decrypt()
679 t = l; l = r; r = t ^ F2(r, Km[1], Kr[1]); in cast5_decrypt()
680 t = l; l = r; r = t ^ F1(r, Km[0], Kr[0]); in cast5_decrypt()
682 t = l; l = r; r = t ^ F3(r, Km[11], Kr[11]); in cast5_decrypt()
683 t = l; l = r; r = t ^ F2(r, Km[10], Kr[10]); in cast5_decrypt()
684 t = l; l = r; r = t ^ F1(r, Km[9], Kr[9]); in cast5_decrypt()
685 t = l; l = r; r = t ^ F3(r, Km[8], Kr[8]); in cast5_decrypt()
686 t = l; l = r; r = t ^ F2(r, Km[7], Kr[7]); in cast5_decrypt()
687 t = l; l = r; r = t ^ F1(r, Km[6], Kr[6]); in cast5_decrypt()
688 t = l; l = r; r = t ^ F3(r, Km[5], Kr[5]); in cast5_decrypt()
689 t = l; l = r; r = t ^ F2(r, Km[4], Kr[4]); in cast5_decrypt()
690 t = l; l = r; r = t ^ F1(r, Km[3], Kr[3]); in cast5_decrypt()
691 t = l; l = r; r = t ^ F3(r, Km[2], Kr[2]); in cast5_decrypt()
692 t = l; l = r; r = t ^ F2(r, Km[1], Kr[1]); in cast5_decrypt()
693 t = l; l = r; r = t ^ F1(r, Km[0], Kr[0]); in cast5_decrypt()
696 outbuf[0] = (r >> 24) & 0xff; in cast5_decrypt()
697 outbuf[1] = (r >> 16) & 0xff; in cast5_decrypt()
698 outbuf[2] = (r >> 8) & 0xff; in cast5_decrypt()
699 outbuf[3] = r & 0xff; in cast5_decrypt()