0

The title just about says it.

The idea here is that I could disable encryption by choosing an appropriate key instead of disabling the encryption in the code.

nyholku
  • 456
  • 3
  • 15

2 Answers2

3

No, XTEA does not have weak keys where the encryption or decryption functions separately behave like the identity functions. (Or at least such a class of keys is not known.)

Artjom B.
  • 61,146
  • 24
  • 125
  • 222
  • Thanks! For the answer and also for teaching me that these are called weak keys/identity functions. I'll wait a little bit and unless someone comes up with something significantly 'better' or contradicts this I will accept this answer. – nyholku Jul 19 '17 at 18:26
  • 1
    Well, accepting answers in regards to cryptography or security is a tricky endeavor. You're just not sure how many will agree or disagree. You don't have to accept. Let the voting on my answer tell you what other people think. – Artjom B. Jul 19 '17 at 19:56
  • there is not a `KEY` that won't encrypt, but if you set rounds to 0, it won't encrypt :) (and with 0 rounds, the key is irrelevant, no key will make any difference.) – hanshenrik Feb 25 '19 at 21:55
0

No, no matter what key you use (even the key 0x00000000 + 0x00000000 + 0x00000000 + 0x00000000 ), xtea will encrypt the data.

BUT, if you don't want the encryption, just set rounds to 0, and your data won't be encrypted, which i guess is what you want :) only padding will be applied in that case. (when rounds is 0, it does not matter what your encryption key is, by the way. no encryption key will make any difference.)

hanshenrik
  • 19,904
  • 4
  • 43
  • 89
  • Thanks! That might work though I've my plan now is to simply use two keys, one that is public and I use that for public releases and one that is private that I use for protected releases. – nyholku Mar 03 '19 at 08:10