MarketXXTEA
Company Profile

XXTEA

In cryptography, Corrected Block TEA is a block cipher designed to correct weaknesses in the original Block TEA.

Cryptanalysis
An attack published in 2010 by E. Yarrkov presents a chosen-plaintext attack against full-round XXTEA with wide block, requiring 259 queries for a block size of 212 bytes or more, and negligible work. It is based on differential cryptanalysis. To cipher "212 bytes or more" algorithm performs just 6 rounds, and carefully chosen bit patterns allows to detect and analyze avalanche effect. ==Reference code==
Reference code
The original formulation of the Corrected Block TEA algorithm, published by David Wheeler and Roger Needham, is as follows: #define DELTA 0x9e3779b9 #define MX ((z>>5^y>3^z 1) { /* Coding Part */ q = 6 + 52/n; while (q-- > 0) { sum += DELTA; e = (sum >> 2) & 3; for (p=0; p> 2) & 3; for (p=n-1; p>0; p--) z = v[p-1], y = v[p] -= MX; z = v[n-1]; y = v[0] -= MX; sum -= DELTA; } return 0; } return 1; } According to Needham and Wheeler: Note that the initialization of z is Undefined behavior for n #include #define DELTA 0x9e3779b9 #define MX (((z>>5^y>3^z 1) { /* Coding Part */ rounds = 6 + 52/n; sum = 0; z = v[n-1]; do { sum += DELTA; e = (sum >> 2) & 3; for (p=0; p> 2) & 3; for (p=n-1; p>0; p--) { z = v[p-1]; y = v[p] -= MX; } z = v[n-1]; y = v[0] -= MX; sum -= DELTA; } while (--rounds); } } ==See also==
tickerdossier.comtickerdossier.substack.com