Score:0

RC4: Known plaintext key, unknown key derivation

co flag

I am working with an older piece of software that generates encrypted backups that I'd like to decrypt. I have a plaintext key, a few examples of encrypted data and I'm pretty sure the data is ASCII, but I don't know how they derive the RC4 key from the plaintext key.

How would I go about testing key derivations comprehensively? The space must be relatively small, even if I'm considering all the RC4 key lengths.

poncho avatar
my flag
Have you tried just inserting the plaintext key into the RC4 algorithm as is? It does take variable length (1-256 byte) keys, so that's the obvious way they might have implemented it.
co flag
@poncho The key itself is 237 bytes long - I believe that's too long, isn't it?
poncho avatar
my flag
No, it's not too long; RC4 can handle keys up to 256 bytes in length
co flag
@poncho, thanks that turned out to be it! It was a raw key.
Score:1
my flag

How would I go about testing key derivations comprehensively?

Why don't you start with the most obvious possibility first? RC4 takes a variable length (1-256 byte) key; perhaps they used the key you present directly as into to the RC4 key setup algorithm?

[From your comments, we already know this answer is the correct one - this is just so that the question has an official answer]

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.