Lines Matching refs:X

232 #define DES_IP(X,Y)                                                       \  argument
235 T = (((X) >> 4) ^ (Y)) & 0x0F0F0F0F; (Y) ^= T; (X) ^= (T << 4); \
236 T = (((X) >> 16) ^ (Y)) & 0x0000FFFF; (Y) ^= T; (X) ^= (T << 16); \
237 T = (((Y) >> 2) ^ (X)) & 0x33333333; (X) ^= T; (Y) ^= (T << 2); \
238 T = (((Y) >> 8) ^ (X)) & 0x00FF00FF; (X) ^= T; (Y) ^= (T << 8); \
240 T = ((X) ^ (Y)) & 0xAAAAAAAA; (Y) ^= T; (X) ^= T; \
241 (X) = (((X) << 1) | ((X) >> 31)) & 0xFFFFFFFF; \
247 #define DES_FP(X,Y) \ argument
250 (X) = (((X) << 31) | ((X) >> 1)) & 0xFFFFFFFF; \
251 T = ((X) ^ (Y)) & 0xAAAAAAAA; (X) ^= T; (Y) ^= T; \
253 T = (((Y) >> 8) ^ (X)) & 0x00FF00FF; (X) ^= T; (Y) ^= (T << 8); \
254 T = (((Y) >> 2) ^ (X)) & 0x33333333; (X) ^= T; (Y) ^= (T << 2); \
255 T = (((X) >> 16) ^ (Y)) & 0x0000FFFF; (Y) ^= T; (X) ^= (T << 16); \
256 T = (((X) >> 4) ^ (Y)) & 0x0F0F0F0F; (Y) ^= T; (X) ^= (T << 4); \
262 #define DES_ROUND(X,Y) \ argument
265 T = *SK++ ^ (X); \
271 T = *SK++ ^ (((X) << 28) | ((X) >> 4)); \
402 uint32_t X, Y, T; in mbedtls_des_setkey() local
404 X = MBEDTLS_GET_UINT32_BE( key, 0 ); in mbedtls_des_setkey()
410 T = ((Y >> 4) ^ X) & 0x0F0F0F0F; X ^= T; Y ^= (T << 4); in mbedtls_des_setkey()
411 T = ((Y ) ^ X) & 0x10101010; X ^= T; Y ^= (T ); in mbedtls_des_setkey()
413 X = (LHs[ (X ) & 0xF] << 3) | (LHs[ (X >> 8) & 0xF ] << 2) in mbedtls_des_setkey()
414 | (LHs[ (X >> 16) & 0xF] << 1) | (LHs[ (X >> 24) & 0xF ] ) in mbedtls_des_setkey()
415 | (LHs[ (X >> 5) & 0xF] << 7) | (LHs[ (X >> 13) & 0xF ] << 6) in mbedtls_des_setkey()
416 | (LHs[ (X >> 21) & 0xF] << 5) | (LHs[ (X >> 29) & 0xF ] << 4); in mbedtls_des_setkey()
423 X &= 0x0FFFFFFF; in mbedtls_des_setkey()
433 X = ((X << 1) | (X >> 27)) & 0x0FFFFFFF; in mbedtls_des_setkey()
438 X = ((X << 2) | (X >> 26)) & 0x0FFFFFFF; in mbedtls_des_setkey()
442 *SK++ = ((X << 4) & 0x24000000) | ((X << 28) & 0x10000000) in mbedtls_des_setkey()
443 | ((X << 14) & 0x08000000) | ((X << 18) & 0x02080000) in mbedtls_des_setkey()
444 | ((X << 6) & 0x01000000) | ((X << 9) & 0x00200000) in mbedtls_des_setkey()
445 | ((X >> 1) & 0x00100000) | ((X << 10) & 0x00040000) in mbedtls_des_setkey()
446 | ((X << 2) & 0x00020000) | ((X >> 10) & 0x00010000) in mbedtls_des_setkey()
454 *SK++ = ((X << 15) & 0x20000000) | ((X << 17) & 0x10000000) in mbedtls_des_setkey()
455 | ((X << 10) & 0x08000000) | ((X << 22) & 0x04000000) in mbedtls_des_setkey()
456 | ((X >> 2) & 0x02000000) | ((X << 1) & 0x01000000) in mbedtls_des_setkey()
457 | ((X << 16) & 0x00200000) | ((X << 11) & 0x00100000) in mbedtls_des_setkey()
458 | ((X << 3) & 0x00080000) | ((X >> 6) & 0x00040000) in mbedtls_des_setkey()
459 | ((X << 15) & 0x00020000) | ((X >> 4) & 0x00010000) in mbedtls_des_setkey()
610 uint32_t X, Y, T, *SK; in mbedtls_des_crypt_ecb() local
614 X = MBEDTLS_GET_UINT32_BE( input, 0 ); in mbedtls_des_crypt_ecb()
617 DES_IP( X, Y ); in mbedtls_des_crypt_ecb()
621 DES_ROUND( Y, X ); in mbedtls_des_crypt_ecb()
622 DES_ROUND( X, Y ); in mbedtls_des_crypt_ecb()
625 DES_FP( Y, X ); in mbedtls_des_crypt_ecb()
628 MBEDTLS_PUT_UINT32_BE( X, output, 4 ); in mbedtls_des_crypt_ecb()
704 uint32_t X, Y, T, *SK; in mbedtls_des3_crypt_ecb() local
708 X = MBEDTLS_GET_UINT32_BE( input, 0 ); in mbedtls_des3_crypt_ecb()
711 DES_IP( X, Y ); in mbedtls_des3_crypt_ecb()
715 DES_ROUND( Y, X ); in mbedtls_des3_crypt_ecb()
716 DES_ROUND( X, Y ); in mbedtls_des3_crypt_ecb()
721 DES_ROUND( X, Y ); in mbedtls_des3_crypt_ecb()
722 DES_ROUND( Y, X ); in mbedtls_des3_crypt_ecb()
727 DES_ROUND( Y, X ); in mbedtls_des3_crypt_ecb()
728 DES_ROUND( X, Y ); in mbedtls_des3_crypt_ecb()
731 DES_FP( Y, X ); in mbedtls_des3_crypt_ecb()
734 MBEDTLS_PUT_UINT32_BE( X, output, 4 ); in mbedtls_des3_crypt_ecb()