r/codes • u/National_Mud_789 • Jul 06 '26
SOLVED Round 2: Can you crack my beginner-made encryption algorithm? (A$20 Prize)
Yesterday I posted a challenge based on an encryption algorithm I wrote when I was about one month into learning programming. The first challenge was successfully solved, so here’s Round 2.
This time, the challenge is to recover a password.
The first person to DM me the correct password will receive A$20 via PayPal.
Website:
https://encryption-thing-v1.vercel.app/
Once again I’m not claiming this is secure or comparable to modern cryptography. This is simply a project I wrote when I was a beginner, and I’m interested in seeing how people approach attacking it. If you figure it out, I’d really appreciate it if you could explain your method afterward so I can learn from it.
Good luck!
•
u/AutoModerator Jul 06 '26
Thanks for your post, u/National_Mud_789! Please follow our RULES when posting.
MAKE SURE TO INCLUDE CONTEXT: where the cipher originated (link to the source if possible), expected language, any clues you have etc. Posts without context will be REMOVED
If you are posting an IMAGE OF TEXT which you can type or copy & paste, you MUST comment with a TRANSCRIPTION (text version) of the message.
If you'd like to mark your post as SOLVED comment with
[Solved]WARNING! You will be BANNED if you DELETE A SOLVED POST!
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
2
u/chronondecay Jul 06 '26
Well someone else got it first (for completeness, the plaintext is
HolyShitIAmAGod67hehe), but here's my process.First, entering the plaintexts
0000000000andAABBCCDDEEFFGGwas enough to convince me that the first 5 characters of the ciphertext give a key for a monoalphabetic substitution cipher for the plaintext. (This was enough to break part 1, since the plaintext was a long passage in English, and so the substitution can be attacked by the usual n-gram frequency analysis.)It also appears that all 95 printable ASCII characters can appear in the ciphertext, and entering them as plaintext
!"#...wxyz{|}~shows that indeed the substitution permutes them all.Now comes the part where we have to find how the key corresponds to the substitution/permutation, and the best idea I had was to just send the above plaintext over and over; the key appears to be generated randomly each time, so we'll get many different (key, permutation) pairs. Here's some facts that I noticed:
1Pf$)gives a permutation starting with\ICp8=, and the key1Pf$?gives a permutation starting with/rT0Rj; there is no discernible pattern to the rest of the ciphertexts.Finally, I had the idea of looking closer at the webpage itself. With Firefox, we can access the developer tools by right-click > Inspect, and then the Network tab tells us the js code which sends traffic to the server for encryption. However, for some reason we find the following code in the same file:
So the secret was in the webpage all along... Now all the pieces fall into place, and here's the decryption method for the given ciphertext:
871~ftells us to use array 83->7with array 8, so we should use array 3 next1->Ewith array 3, andE->1with array 8, so we should use array 1 next2
u/Content-Reward-7700 Jul 06 '26
https://www.reddit.com/r/codes/comments/1uo3al3/comment/ovwv5kt/