Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I asked this earlierr but I forgot to mention something: I am trying to break an

ID: 3743543 • Letter: I

Question

I asked this earlierr but I forgot to mention something:

I am trying to break an arc4 encryption and I'm having a little problem. I know the plain text is "this is the secret plain text" and I know the key is:

{0x13, 0x37, (byte)0xd0, 0x0d, 0x15, 0x50, (byte)0xc0, 0x01, (byte) 0xde, (byte) 0xff, 1}

I also know the cipher text is:

;ÂÖãíAå욘'i–W¤_‚ÑϬì€3

How do I generate plain text using cipher text and the key?

This is just an example. My actual problem does not give me the entire key. Instead, it provides the first 8 bytes and we need to finish the last 3. It also gives a small part of the plain text, the word "secret". If I can create the plain text from the cipher and the part of the key I already have, I can brute force the last 3 bytes of the key. That is why I need to determine as much of the plain text as I can using the cipher text and the key.

Thanks.

Explanation / Answer

string key = "key"; string msg = "hello"; ARC4 arc4((byte*)key.data(), key.size()); arc4.ProcessData((byte*)msg.data(), (byte*)msg.data(), msg.size()); // Reset state arc4.SetKey((byte*)key.data(), key.size()); arc4.ProcessData((byte*)msg.data(), (byte*)msg.data(), msg.size()); cout
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote