0
$\begingroup$

Given that I have a 3MByte block of data, a random key and need to use XXTea, is there any advantage in splitting the block of data into smaller blocks and encoding / decoding each separately?

Is there a sensible upper limit to the size of block as far as encryption / decryption is concerned?

$\endgroup$
4
  • 1
    $\begingroup$ XXTEA doesn't even provide semantic security. It doesn't matter much what you do with it, it won't be safe. Performance wise it'll depend on your particular system, so using a parallelizable block mode like OCB3 with 128-bit block size might be faster if you can exploit parallelism. $\endgroup$ Commented Mar 31, 2021 at 17:56
  • $\begingroup$ Thank you for the information. I can't use parallelism in my application. If I was using it to encrypt my wifi password so my kids can't guess it would it then be safe? $\endgroup$
    – Ant
    Commented Apr 1, 2021 at 8:28
  • $\begingroup$ No. It's a broken algorithm. It will never be secure. $\endgroup$ Commented Apr 1, 2021 at 13:55
  • $\begingroup$ Use case where XXTEA won't cut it, but AES-GCM does: encrypting your wifi password. Assume it's with a master key your kids never get; they get the ciphertext, however. Your kids can't make login attempts to try find the password, because the router logs that and you look at the logs. Your kids manage to see the password once, but you immediately change it. You keep changing it weekly. One week you get back to the original. Your kids know that from the ciphertext, because "XXTEA doesn't even provide semantic security": the same plaintext always enciphers to the same ciphertext. $\endgroup$
    – fgrieu
    Commented Apr 2, 2021 at 10:07

1 Answer 1

1
$\begingroup$

You should not use XXTEA, especially in its large-block variant. It's reported as broken, and that seems very credible. Some of the problem is with the overly aggressive $6+52/n$ rounds, but beside this, the cipher has not attracted wide review.

This question discuss other variants of TEA.

Except in the specific cases that you need an all-or-nothing bijection of a block (because you can't afford that encryption makes the ciphertext any larger), or code space is extremely scarce, my recommendation is to use a standard authenticated encryption cryptographic primitive such as AES-GCM. Libraries for that are available in most major languages.

$\endgroup$
2
  • $\begingroup$ Thank for the related information but it doesn't answer my question. I don't understand any cryptography terms like rounds or block variants. If I gave you a 3MB XXTEA encoded block how long would it be before you have deciphered it? $\endgroup$
    – Ant
    Commented Apr 1, 2021 at 8:23
  • $\begingroup$ @Ant: XXTEA is among ciphers that proceed by repeating an operation (called a "round") several times. When the block to encipher is large (53 bytes or more, larger than the usual 16 or 32 bytes, and what I meant by variant), XXTEA does 6 rounds, and that turns out to not be enough. Also: the assumption that a cryptanalyst only gets an enciphered block is wrong; see e.g. this, or how Enigma messages have been deciphered in WWII. And, attacks only get better; they never get worse. $\endgroup$
    – fgrieu
    Commented Apr 1, 2021 at 19:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.