Lines Matching refs:R
516 #define IP(L, R, T) \ argument
517 ROL(R, 4); \
519 L ^= R; \
521 R ^= L; \
523 ROL(R, 12); \
525 L ^= R; \
527 R ^= L; \
529 ROR(R, 14); \
531 L ^= R; \
533 R ^= L; \
535 ROL(R, 6); \
537 L ^= R; \
539 R ^= L; \
541 ROR(R, 7); \
543 L ^= R; \
545 R ^= L; \
549 #define FP(L, R, T) \ argument
552 L ^= R; \
554 R ^= L; \
556 ROL(R, 7); \
558 L ^= R; \
560 R ^= L; \
562 ROR(R, 6); \
564 L ^= R; \
566 R ^= L; \
568 ROL(R, 14); \
570 L ^= R; \
572 R ^= L; \
574 ROR(R, 12); \
576 L ^= R; \
578 R ^= L; \
580 ROR(R, 4);
582 #define ROUND(L, R, A, B, K, d) \ argument
584 B ^= R; A ^= R; \
784 u32 L, R, A, B; in des_encrypt() local
788 R = get_unaligned_le32(src + 4); in des_encrypt()
790 IP(L, R, A); in des_encrypt()
792 ROUND(L, R, A, B, K, 2); in des_encrypt()
793 ROUND(R, L, A, B, K, 2); in des_encrypt()
795 FP(R, L, A); in des_encrypt()
797 put_unaligned_le32(R, dst); in des_encrypt()
805 u32 L, R, A, B; in des_decrypt() local
809 R = get_unaligned_le32(src + 4); in des_decrypt()
811 IP(L, R, A); in des_decrypt()
813 ROUND(L, R, A, B, K, -2); in des_decrypt()
814 ROUND(R, L, A, B, K, -2); in des_decrypt()
816 FP(R, L, A); in des_decrypt()
818 put_unaligned_le32(R, dst); in des_decrypt()
847 u32 L, R, A, B; in des3_ede_encrypt() local
851 R = get_unaligned_le32(src + 4); in des3_ede_encrypt()
853 IP(L, R, A); in des3_ede_encrypt()
855 ROUND(L, R, A, B, K, 2); in des3_ede_encrypt()
856 ROUND(R, L, A, B, K, 2); in des3_ede_encrypt()
859 ROUND(R, L, A, B, K, 2); in des3_ede_encrypt()
860 ROUND(L, R, A, B, K, 2); in des3_ede_encrypt()
863 ROUND(L, R, A, B, K, 2); in des3_ede_encrypt()
864 ROUND(R, L, A, B, K, 2); in des3_ede_encrypt()
866 FP(R, L, A); in des3_ede_encrypt()
868 put_unaligned_le32(R, dst); in des3_ede_encrypt()
876 u32 L, R, A, B; in des3_ede_decrypt() local
880 R = get_unaligned_le32(src + 4); in des3_ede_decrypt()
882 IP(L, R, A); in des3_ede_decrypt()
884 ROUND(L, R, A, B, K, -2); in des3_ede_decrypt()
885 ROUND(R, L, A, B, K, -2); in des3_ede_decrypt()
888 ROUND(R, L, A, B, K, -2); in des3_ede_decrypt()
889 ROUND(L, R, A, B, K, -2); in des3_ede_decrypt()
892 ROUND(L, R, A, B, K, -2); in des3_ede_decrypt()
893 ROUND(R, L, A, B, K, -2); in des3_ede_decrypt()
895 FP(R, L, A); in des3_ede_decrypt()
897 put_unaligned_le32(R, dst); in des3_ede_decrypt()