Lines Matching refs:X
213 #define DES_IP(X, Y) \ argument
216 T = (((X) >> 4) ^ (Y)) & 0x0F0F0F0F; (Y) ^= T; (X) ^= (T << 4); \
217 T = (((X) >> 16) ^ (Y)) & 0x0000FFFF; (Y) ^= T; (X) ^= (T << 16); \
218 T = (((Y) >> 2) ^ (X)) & 0x33333333; (X) ^= T; (Y) ^= (T << 2); \
219 T = (((Y) >> 8) ^ (X)) & 0x00FF00FF; (X) ^= T; (Y) ^= (T << 8); \
221 T = ((X) ^ (Y)) & 0xAAAAAAAA; (Y) ^= T; (X) ^= T; \
222 (X) = (((X) << 1) | ((X) >> 31)) & 0xFFFFFFFF; \
228 #define DES_FP(X, Y) \ argument
231 (X) = (((X) << 31) | ((X) >> 1)) & 0xFFFFFFFF; \
232 T = ((X) ^ (Y)) & 0xAAAAAAAA; (X) ^= T; (Y) ^= T; \
234 T = (((Y) >> 8) ^ (X)) & 0x00FF00FF; (X) ^= T; (Y) ^= (T << 8); \
235 T = (((Y) >> 2) ^ (X)) & 0x33333333; (X) ^= T; (Y) ^= (T << 2); \
236 T = (((X) >> 16) ^ (Y)) & 0x0000FFFF; (Y) ^= T; (X) ^= (T << 16); \
237 T = (((X) >> 4) ^ (Y)) & 0x0F0F0F0F; (Y) ^= T; (X) ^= (T << 4); \
243 #define DES_ROUND(X, Y) \ argument
246 T = *SK++ ^ (X); \
252 T = *SK++ ^ (((X) << 28) | ((X) >> 4)); \
398 uint32_t X, Y, T; in mbedtls_des_setkey() local
400 X = MBEDTLS_GET_UINT32_BE(key, 0); in mbedtls_des_setkey()
406 T = ((Y >> 4) ^ X) & 0x0F0F0F0F; X ^= T; Y ^= (T << 4); in mbedtls_des_setkey()
407 T = ((Y) ^ X) & 0x10101010; X ^= T; Y ^= (T); in mbedtls_des_setkey()
409 X = (LHs[(X) & 0xF] << 3) | (LHs[(X >> 8) & 0xF] << 2) in mbedtls_des_setkey()
410 | (LHs[(X >> 16) & 0xF] << 1) | (LHs[(X >> 24) & 0xF]) in mbedtls_des_setkey()
411 | (LHs[(X >> 5) & 0xF] << 7) | (LHs[(X >> 13) & 0xF] << 6) in mbedtls_des_setkey()
412 | (LHs[(X >> 21) & 0xF] << 5) | (LHs[(X >> 29) & 0xF] << 4); in mbedtls_des_setkey()
419 X &= 0x0FFFFFFF; in mbedtls_des_setkey()
427 X = ((X << 1) | (X >> 27)) & 0x0FFFFFFF; in mbedtls_des_setkey()
430 X = ((X << 2) | (X >> 26)) & 0x0FFFFFFF; in mbedtls_des_setkey()
434 *SK++ = ((X << 4) & 0x24000000) | ((X << 28) & 0x10000000) in mbedtls_des_setkey()
435 | ((X << 14) & 0x08000000) | ((X << 18) & 0x02080000) in mbedtls_des_setkey()
436 | ((X << 6) & 0x01000000) | ((X << 9) & 0x00200000) in mbedtls_des_setkey()
437 | ((X >> 1) & 0x00100000) | ((X << 10) & 0x00040000) in mbedtls_des_setkey()
438 | ((X << 2) & 0x00020000) | ((X >> 10) & 0x00010000) in mbedtls_des_setkey()
446 *SK++ = ((X << 15) & 0x20000000) | ((X << 17) & 0x10000000) in mbedtls_des_setkey()
447 | ((X << 10) & 0x08000000) | ((X << 22) & 0x04000000) in mbedtls_des_setkey()
448 | ((X >> 2) & 0x02000000) | ((X << 1) & 0x01000000) in mbedtls_des_setkey()
449 | ((X << 16) & 0x00200000) | ((X << 11) & 0x00100000) in mbedtls_des_setkey()
450 | ((X << 3) & 0x00080000) | ((X >> 6) & 0x00040000) in mbedtls_des_setkey()
451 | ((X << 15) & 0x00020000) | ((X >> 4) & 0x00010000) in mbedtls_des_setkey()
599 uint32_t X, Y, T, *SK; in mbedtls_des_crypt_ecb() local
603 X = MBEDTLS_GET_UINT32_BE(input, 0); in mbedtls_des_crypt_ecb()
606 DES_IP(X, Y); in mbedtls_des_crypt_ecb()
609 DES_ROUND(Y, X); in mbedtls_des_crypt_ecb()
610 DES_ROUND(X, Y); in mbedtls_des_crypt_ecb()
613 DES_FP(Y, X); in mbedtls_des_crypt_ecb()
616 MBEDTLS_PUT_UINT32_BE(X, output, 4); in mbedtls_des_crypt_ecb()
687 uint32_t X, Y, T, *SK; in mbedtls_des3_crypt_ecb() local
691 X = MBEDTLS_GET_UINT32_BE(input, 0); in mbedtls_des3_crypt_ecb()
694 DES_IP(X, Y); in mbedtls_des3_crypt_ecb()
697 DES_ROUND(Y, X); in mbedtls_des3_crypt_ecb()
698 DES_ROUND(X, Y); in mbedtls_des3_crypt_ecb()
702 DES_ROUND(X, Y); in mbedtls_des3_crypt_ecb()
703 DES_ROUND(Y, X); in mbedtls_des3_crypt_ecb()
707 DES_ROUND(Y, X); in mbedtls_des3_crypt_ecb()
708 DES_ROUND(X, Y); in mbedtls_des3_crypt_ecb()
711 DES_FP(Y, X); in mbedtls_des3_crypt_ecb()
714 MBEDTLS_PUT_UINT32_BE(X, output, 4); in mbedtls_des3_crypt_ecb()