Lines Matching refs:X

254 #define DES_IP(X,Y)                                                       \  argument
257 T = (((X) >> 4) ^ (Y)) & 0x0F0F0F0F; (Y) ^= T; (X) ^= (T << 4); \
258 T = (((X) >> 16) ^ (Y)) & 0x0000FFFF; (Y) ^= T; (X) ^= (T << 16); \
259 T = (((Y) >> 2) ^ (X)) & 0x33333333; (X) ^= T; (Y) ^= (T << 2); \
260 T = (((Y) >> 8) ^ (X)) & 0x00FF00FF; (X) ^= T; (Y) ^= (T << 8); \
262 T = ((X) ^ (Y)) & 0xAAAAAAAA; (Y) ^= T; (X) ^= T; \
263 (X) = (((X) << 1) | ((X) >> 31)) & 0xFFFFFFFF; \
269 #define DES_FP(X,Y) \ argument
272 (X) = (((X) << 31) | ((X) >> 1)) & 0xFFFFFFFF; \
273 T = ((X) ^ (Y)) & 0xAAAAAAAA; (X) ^= T; (Y) ^= T; \
275 T = (((Y) >> 8) ^ (X)) & 0x00FF00FF; (X) ^= T; (Y) ^= (T << 8); \
276 T = (((Y) >> 2) ^ (X)) & 0x33333333; (X) ^= T; (Y) ^= (T << 2); \
277 T = (((X) >> 16) ^ (Y)) & 0x0000FFFF; (Y) ^= T; (X) ^= (T << 16); \
278 T = (((X) >> 4) ^ (Y)) & 0x0F0F0F0F; (Y) ^= T; (X) ^= (T << 4); \
284 #define DES_ROUND(X,Y) \ argument
287 T = *SK++ ^ (X); \
293 T = *SK++ ^ (((X) << 28) | ((X) >> 4)); \
424 uint32_t X, Y, T; in mbedtls_des_setkey() local
426 GET_UINT32_BE( X, key, 0 ); in mbedtls_des_setkey()
432 T = ((Y >> 4) ^ X) & 0x0F0F0F0F; X ^= T; Y ^= (T << 4); in mbedtls_des_setkey()
433 T = ((Y ) ^ X) & 0x10101010; X ^= T; Y ^= (T ); in mbedtls_des_setkey()
435 X = (LHs[ (X ) & 0xF] << 3) | (LHs[ (X >> 8) & 0xF ] << 2) in mbedtls_des_setkey()
436 | (LHs[ (X >> 16) & 0xF] << 1) | (LHs[ (X >> 24) & 0xF ] ) in mbedtls_des_setkey()
437 | (LHs[ (X >> 5) & 0xF] << 7) | (LHs[ (X >> 13) & 0xF ] << 6) in mbedtls_des_setkey()
438 | (LHs[ (X >> 21) & 0xF] << 5) | (LHs[ (X >> 29) & 0xF ] << 4); in mbedtls_des_setkey()
445 X &= 0x0FFFFFFF; in mbedtls_des_setkey()
455 X = ((X << 1) | (X >> 27)) & 0x0FFFFFFF; in mbedtls_des_setkey()
460 X = ((X << 2) | (X >> 26)) & 0x0FFFFFFF; in mbedtls_des_setkey()
464 *SK++ = ((X << 4) & 0x24000000) | ((X << 28) & 0x10000000) in mbedtls_des_setkey()
465 | ((X << 14) & 0x08000000) | ((X << 18) & 0x02080000) in mbedtls_des_setkey()
466 | ((X << 6) & 0x01000000) | ((X << 9) & 0x00200000) in mbedtls_des_setkey()
467 | ((X >> 1) & 0x00100000) | ((X << 10) & 0x00040000) in mbedtls_des_setkey()
468 | ((X << 2) & 0x00020000) | ((X >> 10) & 0x00010000) in mbedtls_des_setkey()
476 *SK++ = ((X << 15) & 0x20000000) | ((X << 17) & 0x10000000) in mbedtls_des_setkey()
477 | ((X << 10) & 0x08000000) | ((X << 22) & 0x04000000) in mbedtls_des_setkey()
478 | ((X >> 2) & 0x02000000) | ((X << 1) & 0x01000000) in mbedtls_des_setkey()
479 | ((X << 16) & 0x00200000) | ((X << 11) & 0x00100000) in mbedtls_des_setkey()
480 | ((X << 3) & 0x00080000) | ((X >> 6) & 0x00040000) in mbedtls_des_setkey()
481 | ((X << 15) & 0x00020000) | ((X >> 4) & 0x00010000) in mbedtls_des_setkey()
632 uint32_t X, Y, T, *SK; in mbedtls_des_crypt_ecb() local
636 GET_UINT32_BE( X, input, 0 ); in mbedtls_des_crypt_ecb()
639 DES_IP( X, Y ); in mbedtls_des_crypt_ecb()
643 DES_ROUND( Y, X ); in mbedtls_des_crypt_ecb()
644 DES_ROUND( X, Y ); in mbedtls_des_crypt_ecb()
647 DES_FP( Y, X ); in mbedtls_des_crypt_ecb()
650 PUT_UINT32_BE( X, output, 4 ); in mbedtls_des_crypt_ecb()
719 uint32_t X, Y, T, *SK; in mbedtls_des3_crypt_ecb() local
723 GET_UINT32_BE( X, input, 0 ); in mbedtls_des3_crypt_ecb()
726 DES_IP( X, Y ); in mbedtls_des3_crypt_ecb()
730 DES_ROUND( Y, X ); in mbedtls_des3_crypt_ecb()
731 DES_ROUND( X, Y ); in mbedtls_des3_crypt_ecb()
736 DES_ROUND( X, Y ); in mbedtls_des3_crypt_ecb()
737 DES_ROUND( Y, X ); in mbedtls_des3_crypt_ecb()
742 DES_ROUND( Y, X ); in mbedtls_des3_crypt_ecb()
743 DES_ROUND( X, Y ); in mbedtls_des3_crypt_ecb()
746 DES_FP( Y, X ); in mbedtls_des3_crypt_ecb()
749 PUT_UINT32_BE( X, output, 4 ); in mbedtls_des3_crypt_ecb()