RSA Challenges via ZeroDaysCTF Training Site
- RSA Level 0: None Shall Enter
This series of challenges is for students on my Secure Communications and cryptography module. You'll need to enter the password to continue.
If you are not in my class but would like to try out the challenges feel free to contact me and ask for access. [email protected]
There are 11 levels of increasing difficulty..You shouldn't use any RSA CTF tools and should code any solutions yourself.
Good luck.
Flag: Password Protected
- RSA Level 1
Use the RSA values in the attached file to encrypt the given message and submit your first flag.
Message = RSA isn't really that hard
Submit your flag in the following format: ZD{encrypted_message} your encrypted message should be a big number in decimal format.
File: rsa1
| Script: level_1
Flag: ZD{13309476856206179288137278795001286676504235122200291222905951541015281640474228799375180129564959032261555135231635439690367282451635413048574322588643043250005501837597608399627442074603517951858976430767446724730937928672932493206869274420288717036712376949408229648116702610597844919828482630797157003777363091998366855062763360538948110895070725322039940644906900772757193759215740687066380017485804644723367158972689710477927318380335919282326398046586751715463059075476044138690978986063001880735783893361380726584661054926968590764176030209214513123458853087059980258593405395678238799024217478961749328706800}
- RSA Level 2
Using the RSA values from Level 1. Can you decrypt this ciphertext?
12060751446986145559753258604964288613009905939999612142364090162932784553289274985360758786650150438909964774489580594646537566480131089578622598287608280958826485540308546699201437758196408375494069165098540792161560520821702762571130453590350894456351542803892333747581478520236785140328470857700892653885938706372579150142033036479912415927913687580857324142121399292745144946430853334522298591089627330825281302600321017113877555269059227306217943736817867883165263245345825896646180907782570834990026416074994773400197992710509066779111650705105160806274734336871715369410205954061055784649468877193662056626998
Script: level_2
Flag: ZD{Well Done you have decrypted correctly}
- RSA Level 3
What are the values of n,d and e in this private key?
Submit your flag in the following format: ZD{n,e,d} ...where n,d,e are large decimal numbers
File: mykey2
| Script level_3
Flag: ZD{25804750360904248224329381618104859031736073222395248860499133051128513648896523325052435992237099000924849024564826844234697029915822571039994777064514824635243492963301478168480948385273501322600327794162141312212647635059765199895820389754402745012084674140342116327728380193544092902468871988407101113210818201750378837933282937750636399588218292079918162950294282004250547116764896324653457065316101365613347914317959505469586731762453963212022535424803572822031093301253062385003468990260150084465026582297271243286096414015105084255301102689693963566336024015793743350044649378818363190804537712326729609503119,65537,25564173244610971210351548452585197331194535758994673657884351015114666175874020376311922413781312689534869581593541780807512387877301314484073132668426835287971970400465565582293880630212968962130535153634911375813942663745522611172864711921423815900248860235223648392420965446176110834882493594752879241898541637225074107295433979711279703743206408857411263301020537809364614125840424406332180800207630227259634428188684178985515460114123914453650465520564263249152086786817100938246123146166512963816583276055667323176816331368813221646162976565638562106256552057858358804329568634212548081342870432443412497223185}
- RSA Level 4
Can you find the flag for this one?
Ciphertext = 474862643754336865489984490773307542016161159436213530034995807183836312346778617047666360854948178434525541089212091928949344492697684657497682106740050084305554758259427768463395264318566101255923490595579348647860471822284428834756812967844672795316325109976652375135659724572710513755433401072885408968307124213606768098411795080747616961236626790699862671834311406129266854138764009952421206625693567227556664511584573464971029270576495696636132292906861410359486612705079004947333371264698887189359265840678094723729950785568382017843975809503403984016678927664449791524785943376314787680072596720311587221852
File: mykey3
| Script: level_4
Flag: ZD{OK time to move onto some harder stuff}
- RSA Level 4.5
All the challenges from here on will offer you hints to help you solve the challenge.
However use the hints wisely as they are not free. You have been warned.
Viewing a hint will cost you 40% of the marks available for that particular challenge. So only use them if you are really stuck.
Viewing a hint does guarantee you'll be able to solve the challenge.
The flag for this challenge is in the hint :)
No file or script needed. Check hint to find the flag.
Flag: ZD{Viewing hints will cost you marks. You've been warned!!!}
- RSA Level 5
Can you decode this one?
File: key
| Script: level_5
Flag: ZD{Those extra private key values are meant to make it easier?}
- RSA Level 6
We seem to be missing the decryption key d? Can you help us somehow decode the ciphertext?
File: key
| Script: level_6
Flag: ZD{You are doing very well, you must be starting to understand RSA by now!}
- RSA Level 7
We've just got the public key this time.. don't think there is any way we can crack this one?
File: publickey
| Script: level_7
Flag: ZD{Only 4 more challenges to go!}
- RSA Level 8
OK no more extra bits of information for you. Good luck trying to solve this one. Just a public key and a ciphertext so should be impossible.
File: values
| Script: level_8
Flag: ZD{We always need to watch the size of our message}
- RSA Level 9
OK I'm so confident with this RSA stuff I'm using it to send messages to all my friends.
Can you figure out this message I've sent to all my friends?
File: values
| Script: level_9
Flag: ZD{Impressive: small_e_is_the_killer 38247601923468}
- RSA Level 10
n1 = 26810032903919470751417184091163731146806121331508070138277149500696322442971096175884120790304857828577982069290158633180100251942955342417542170410605715464381639432699234575800532573171123313101039133182999372766586273295415906566816349148163606213448711796691911721106409801179014678228860658715782559345893999568360161119880197256475135027884453469771185252450235587582025015666381441336406498311093901010840648225477283137781817222768955048218849523758778037997640541529505267901219992736813659659861269305793309604318766412566007430086799932995256182029067580771661764264766250121073118028809461680663575310081
e1 = 65537
n2 = 26810032903919470751417184091163731146806121331508070138277149500696322442971096175884120790304857828577982069290158633180100251942955342417542170410605715464381639432699234575800532573171123313101039133182999372766586273295415906566816349148163606213448711796691911721106409801179014678228860658715782559345893999568360161119880197256475135027884453469771185252450235587582025015666381441336406498311093901010840648225477283137781817222768955048218849523758778037997640541529505267901219992736813659659861269305793309604318766412566007430086799932995256182029067580771661764264766250121073118028809461680663575310081
e2 = 3
c1 = 7260766775102654657103431656742441990353148979141061124307181644983295046231107327430423691452627616157433441672231524455424228382285023845396142577444059128435224669183854573983185393024329156189822712662511116569420962360954623545400595204562408256820513940689193850920644698878217512292950416554931062728033829588894529471625359766244038958641807661419724452655415523369090378106418026735257613942016521972218694980364584576257654630239995015408104622801206625513029332885950345185037430856958499992603649288484209396652173200391934831459927051606716189209524840476734248211027925057233244321218681091073539258752
c2 = 11470173511333387826671287679003421156929670961823461275017682796745559415904602218760953321935593676675323236825060054973638032835676476860429091158485500015124230815770279169046878292335353131961947230502423954865968276122363702577392093721031987918924919887457819356718276460712079449251273113171432305369682840183450263334464494258055631111604123197495702165241358930802926382937042734028068862458721
Script: level_10
Flag: ZD{Only one more to go.. the force is strong with this one!}
- RSA Level 11
OK Last one... You've done very well getting this far.. lets see how you do on this last one.
File: values
| Script: level_11
Flag: ZD{Go take a well earned break.. Happy holidays.}