118 reputation
4
bio website stackoverflow.com/users/…
location Erie, CO
age 33
visits member for 1 year, 4 months
seen Dec 19 '13 at 19:40

Mar
6
comment XOR cipher for encrypting compiled C code
Just to be clear, when I mentioned rotating the 128-bit key prior to XORing, I meant it would be rotated a different amount for every 128-bit block of plain text (the rotation number being determined by some characteristic of that block). EDIT: Hmmm, but that is stupid isn't it? The bootloader would have no way of determining what the rotation amount for a given block of cipher text should be.
Mar
6
comment XOR cipher for encrypting compiled C code
Everywhere I've used the word password I'm referring to the 128-bit key (which will be randomly chosen); I wasn't aware of the distinction. Thanks for pointing it out.
Mar
6
comment XOR cipher for encrypting compiled C code
@StephenTouset I'm not against using a real cryptographic solution; this idea has very little cost of implementation, which is why I'm considering it. If it is fundamentally flawed (and it seems to be) I'll opt for some other encryption methodology.
Mar
6
comment XOR cipher for encrypting compiled C code
Well, if you manage to decrypt the hex file, the processor's read-prevention is worthless anyway, since everything that the attacker wants is in the hex file. But you raise a very good point about the presence of ASCII strings. There are a few (very small percentage compared to the rest of the code) embedded strings. There may also be sections with consecutive 00h bytes. Does rotating the key make any difference, or is it merely a nuisance that can be overcome easily?