

Meet-in-the-Middle Attacks on Reduced-Round XTEA.
#Xtea block cipher code full#
An attack on the full Block TEA was described in (Saarinen, 1998), which also details a weakness in Block TEA's successor, XXTEA. Because it operates on the entire message, Block TEA has the property that it does not need a mode of operation. Presented along with XTEA was a variable-width block cipher termed Block TEA, which uses the XTEA round function, but Block TEA applies it cyclically across an entire message for several iterations. The paper presents two attacks, one without and with a weak key assumption, which corresponds to 2 64.98 bytes of data and 2 126.44 operations, and 2 63.83 bytes of data and 2 104.33 operations respectively. In 2009, Lu presented a related-key rectangle attack on 36 rounds of XTEA, breaking more rounds than any previously published cryptanalytic results for XTEA. presented a related-keydifferential attack on 27 out of 64 rounds of XTEA, requiring 2 20.5chosen plaintexts and a time complexity of 2 115.15 (Ko et al., 2004). To additionally improve speed, the loop can be unrolled by pre-computing the values of sum+key. The recommended value for the 'num_rounds' parameter is 32, not 64, as each iteration of the loop does two Feistel-cipher rounds.
#Xtea block cipher code code#
The reference source code omitted redundant parentheses, using C precedence to write the round function as e.g.The reference source code did not use const types.The reference source code used the unsigned long type rather than the 64-bit clean uint32_t.The changes from the reference source code are minor: This standard C source code, adapted from the reference code released into the public domain by David Wheeler and Roger Needham, encrypts and decrypts using XTEA: Several differences from TEA are apparent, including a somewhat more complex key-schedule and a rearrangement of the shifts, XORs, and additions. Like TEA, XTEA is a 64-bit blockFeistel cipher with a 128-bit key and a suggested 64 rounds. Modern block ciphers require the choice of an algorithm, mode, feedback size, padding, and sometimes rounds. Crypto offers over 25 Block Ciphers, ranging from AES to XTEA. The cipher's designers were David Wheeler and Roger Needham of the Cambridge Computer Laboratory, and the algorithm was presented in an unpublished technical report in 1997 (Needham and Wheeler, 1997). In cryptography, XTEA (eXtended TEA) is a block cipher designed to correct weaknesses in TEA. Variable recommended 64 Feistel rounds (32 cycles)Ī related-key rectangle attack on 36 rounds of XTEA (Lu, 2009)
