Whoever made this flag aught to be slapped straight across the face. The numbers they chose makes it almost impossible to get the ■■■■ thing into a format that you can use utilities with. And doing it by hand doesn’t work either because the “key” message cannot be decoded using the normal format. The way you’d normally do it doesn’t work so you have to use a different method that does encrypt and decrypt messages but upon attemping it doesn’t work.
No matter what you do. It will no decrypt with openssl “bad magic number”. So you have to either a) use an online tool. b) use some python utility to do aes(or similar library). or c) write your own to do it. Whoever decided to use that prime I hate you.
This was definitely one of the most challenging for me in terms of calculations. However, with the assistance of @kd3n4 and @m4nu, I finally got my head around it.
Here’s some hints to get you moving
The modulus is specific type of number, noticeable when factored.
The function to determine decryption handles that specific type in a certain way. The wiki page will explain it more.
As @socialkas states, the “bad magic number” is a result of a newline character.
@133794m3r said:
Whoever made this flag aught to be slapped straight across the face. The numbers they chose makes it almost impossible to get the ■■■■ thing into a format that you can use utilities with. And doing it by hand doesn’t work either because the “key” message cannot be decoded using the normal format. The way you’d normally do it doesn’t work so you have to use a different method that does encrypt and decrypt messages but upon attemping it doesn’t work.
If anyone ought to be slapped across the face it is you and your stupid comment. All the formats used in this challenge are standard and made sense, except perhaps the encrypted flag could also have been encoded in base64 or hex. But that’s easy to work around. Nice challenge @R4J
If anyone ought to be slapped across the face it is you and your stupid comment. All the formats used in this challenge are standard and made sense, except perhaps the encrypted flag could also have been encoded in base64 or hex. But that’s easy to work around. Nice challenge @R4J
I think it is best crypto challange I solved if you know how RSA works and generated it wont take 15 minutes from your time
hint : picoctf will help you understand RSA
i think my decrypt is correct because i can read the "key file: se****** ", but i can’t decrypt with openssl (i get bad magic number) and the online tools… if someone can help me, a small detail that i forget… thank’s
same here,which online tool did you use… cant find one works for me
i think my decrypt is correct because i can read the "key file: se****** ", but i can’t decrypt with openssl (i get bad magic number) and the online tools… if someone can help me, a small detail that i forget… thank’s
same here,which online tool did you use… cant find one works for me
Hmm, I didn’t like this challenge. I knew exactly what to do after a few minutes looking at the files but it took me several hours to get things working with those high numbers. The only “challenge” was to find that one website, that basically gave me the solution I was looking for and the rest was some pain in the ■■■ coding stuff
hello guys any one could help me here with some hint im really struggling i tried to generate the private key using some mathematics but the calculation of the two prime numbers p and q are really hard im not even know if im at the right path or not
I think I’ve found the N “strangeness” and I believe I’ve accommodated for it, but Is the private key supposed to be 1535 bits long? Just want to make sure I’m on the right track.
Did anyone try to read information with asn1parse? I’m little confused by the output. I could need a nudge I think I know what to do but either my math is falling(very high probability) or my script doing something that it shouldn’t(very high probability) anyone will to help me with nudge?