Day1 Challenges

main
six 2022-08-25 22:04:04 +02:00
parent a09dc4b008
commit f2bd635419
19 changed files with 575 additions and 1 deletions

View File

@ -0,0 +1,5 @@
## Entry
Welcome to a decentralized CTF! All you need to get your first 128 points is to register in the smart contract and use your skills to sign!
PK: 0x206863824a9e6b6018bd25eb36ae69b7140963ed48f428339dfb52b09d6aa30d

View File

@ -0,0 +1,5 @@
# Illusion
Sometimes what you see is far from reality. Can you solve this inaccurateness of our interpretation of reality?
Address: 0x9b2f75bc503a23f3044e27d1b98d8c0fdabf0aa2

View File

@ -0,0 +1,14 @@
// SPDX-License-Identifier: MIT
pragma solidity = 0.8.16;
contract MagikTrik {
constructor (bytes memory x) public {
assembly{
return (0xc0, 0x19e)
}
}
function flag() public returns (string memory) {
return "CCTF{0x2311157248adee133b378f46b30050bb4c7508e6bc9043eae5e6566f5fe8595e}";
}
}

View File

@ -0,0 +1,16 @@
pragma solidity >=0.8.13 <0.9.0;
contract HODL_GEN {
function collision_troll(string memory _text, string memory _anotherText)
public
pure
returns (bytes32)
{
return keccak256(abi.encodePacked(_text, _anotherText));
}
function hasher(string memory _text) public pure returns (bytes32) {
return keccak256(abi.encode(_text));
}
}

View File

@ -0,0 +1,7 @@
contract I_HODL_IT {
bytes32 public val = 0xe1dbfec2e4b2dea9b7199c38ab5a74ad5d186373c2c9c3b8a075da831e652189;
function I_HODL_THE_FLAG(string memory _flag) public view returns (bool) {
return keccak256(abi.encodePacked(_flag)) == val;
}
}

View File

@ -0,0 +1,7 @@
# Metaverse HODLer
Natoshi Sakamoto left this picture clue... Maybe you can figure out the pass for it and solve the clue.
This time you need to search in the Metaverse for the solution.
Note: this time you are looking for the private key without the CCTF{} format (just the plain key is the solution for the correct signature).

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 KiB

View File

@ -0,0 +1,17 @@
# SubContract
Natoshi Sakamoto is building a new blockchain and some smart contracts. Our clues might lead to a flag.
Clue 0: The IP address got uncovered: 95.179.227.124
Clue 1: We know we are looking for the owner of the hash "0x0000000000000000000000000000000000000000000000000000000000000002".
Clue 2: Using the owner's public key, this oldschool message can be decrypted:
-----BEGIN PGP MESSAGE-----
jA0ECQMCxQwQZkqXKrz/0n0B48hn1gl7qvamRDdFSALprgJC9o6XK0J5plk560r4
H0bDF1s0z7lbUuzMEeliU7IyKC9FfqAqOOa1xI9ZOsI9OFc2PN5a6PRzHyYZmrCE
wF7teml819Hp+dTc4iO585R8AU4xxYEEjVMYqASaEz64Km123/X8PmInnU9abQ==
=DndS
-----END PGP MESSAGE-----

View File

@ -0,0 +1,11 @@
#!/usr/bin/env python3
from Crypto.Util.number import *
from secret import x, y, flag
print(f'x*y + 37*x + 13*y = {x*y + 37*x + 13*y}')
m = bytes_to_long(flag)
c = pow(m, 31337, x * y)
print(f'c = {c}')

View File

@ -0,0 +1,2 @@
x*y + 37*x + 13*y = 78165212618609657138836880180784953147937847225293529662866015685047230804901135619861816170298320767361932994009655444276454635767070943018615661814998170196988225114090917916739405210438739233946336624923903318136213856380816539075895614337743455379152165904564622942983293828630483375617563060841436037032
c = 77659016890839762768185177448290865321689103903688518906063059972868578338626965390649161940137932439934612804680280807664502018534568684267970075208429306631612376831959148670053665126977208637383716238501111347514927281055286901278746032120016861900738163160264095274050080381725656064614271318154902797773

View File

@ -0,0 +1,19 @@
#!/usr/bin/env sage
from Crypto.Util.number import *
from secret import x, liar, flag
p = 2 ** 160 - 229233
E = EllipticCurve(GF(p), [313, 110])
m = bytes_to_long(flag.lstrip(b'CCTF{').rstrip(b'}'))
assert m < p
P = E((x, 348211368764139637940513065884307924565894663368))
Q = m * P
print(f'Q = ({Q.xy()[0]}, ?)')
for _ in liar:
a, b = _
print(f'{a} * P + {b} * Q = {(a*P + b*Q).xy()}')

View File

@ -0,0 +1,111 @@
Q = (1149184445068682391846063871207801540582566148181, ?)
988630086215088960552365492199385561429165176609 * P + 1425125798010320856068882317674624408728758262149 * Q = (891327570936736199376593816180714400577229884155, 505501515961791528437427462563346499726188382939)
1260450147755255597869480951959834842941719116575 * P + 699738988783849332839255718960955630080794695244 * Q = (944858780950308888632884662181651921121435950644, 429287656427671942225859201128821639149557960001)
127348066282706815439725877979880618543908103093 * P + 894350962161251572940964969870274141039188710311 * Q = (670434942883837254710430806097454831301828216484, 788753699995968465470731368747478709210040098146)
1043826648834429472305931240604668155611728330937 * P + 1342322396624500632270187554226846551256955209229 * Q = (362677435621982290517004688594915942429828549456, 314219895272421261208075840421092334924302526830)
803729470612530365522358877199543923902925856150 * P + 530054954779981979819724228883040083209499412793 * Q = (920346092821634616151603476038272215373999095715, 275159599532259974045396250895837600028800441112)
893723477877843320902118584410350116822895818696 * P + 211155601225987467429108044781250616637181396334 * Q = (1063850627675720120145159993376240287080986191694, 890837959711862297188002674099362027553861169687)
5007339194230261965136074875375133987796015742 * P + 1181661145340628811169250733264617512334954185830 * Q = (679918816734405330432523483123942869125974815453, 1119608671998053139878595075131105932939987602772)
1415051061375272409130906517030573639873333286310 * P + 1163062110826483903659824912056572556567650210470 * Q = (133943387840348302843484784484958673438663282701, 779958243956649805963943404943065517476824426681)
983954572138271748182102584822521998924246662662 * P + 642401554568052122962917374055758750056499767645 * Q = (1185431286492515336341939460896450473743337575659, 952983801375562470161187371120945525549806922500)
863100200243180380634619811808609485141492376330 * P + 108816122196558594129553789608904780874200772214 * Q = (1234845771517569122058823829644118186136375433103, 397971358581695452777972516888443480846254918076)
185721978764932289532903442488891915392154692941 * P + 403651881205558186080017208753540670213570057760 * Q = (858281557595733060066089965086964669123016237651, 722880557664802244340212626454249872657928456973)
1030647493503135753300227224247257891767825267025 * P + 296097860702221000475084408371905669416604018204 * Q = (1128566961843772811914433426943109095173492818402, 292610396053958515730699448673204088375471570252)
608520125969793877468823009322477932831229156635 * P + 317914491820159161829459369735419519625068860980 * Q = (1139470610553906346349393817188329317197877735270, 28904600306673683929418154406116369539091209684)
169591749925402600374976992218165204399162412069 * P + 639938287288503692804094507244802476050758218745 * Q = (1374815299423168935999479215860705017369562043519, 1143750508349763061552625148286048780114401479373)
1008018310661440307568680336067800042828386631456 * P + 739258865178338186594955677433995013333113791415 * Q = (112856964108552324762779458139020007797397010595, 129279578494141873496695905048383155643352965428)
759872533352375786134101947395855010599013658566 * P + 459596961687547506944822832369448163708908071442 * Q = (1127902347614252494705238782231680966962524703932, 228459991760960373091440325416248651991017060682)
749041215946132170033201582479452400065805827870 * P + 254034385776991394571955823013987997397735989241 * Q = (1113595794900793849721194945012257912730112581160, 180190684229770104577597308936509376328475686581)
1236397609253659679662113578432027577948515519817 * P + 1158586233022362088783770010487612443639015770011 * Q = (780680158882304061341110879018798158742559846196, 1334794111654950984266641839380422342807366398640)
1311455777072765120644867291227914648935470355528 * P + 635696152357573334774856896702844800017553963230 * Q = (196639252633148849303079067563845614755485384953, 39317710925209943984526078977801217652542441429)
990820388754383323480675553511411570306631308600 * P + 968848922471165799433718895669905415239312121382 * Q = (1015678921088030744888701606814823362239826747537, 1178936394338466698454413356426098298135984623043)
974272603666033977607364834299316220369966988438 * P + 1339713882009183183023734790734956240881790774646 * Q = (1315083696098910524644337929517592331190744803042, 348198576880448246881091758069266312127004591749)
781463747375291909695020720096929998117925944053 * P + 1281868322011440541777142748542898296547602934631 * Q = (296055139960984621382412561562337073191191903229, 449506613639598371806113833690205075985575743625)
114542818691733268318888056723223800819215172319 * P + 553510296467419048879025414832809482867791620790 * Q = (976254987906056100680722307281540185634896661999, 381789480862532053028809640985178761245830433279)
457232431407333177748889927764423747778420105046 * P + 1002115470261450859929110024025953846243146960123 * Q = (1311948966591362227412514251163264215186757329188, 8070756425233483804363631980253394605886326511)
838115147484879346130201739070318902153738883153 * P + 518114451135807778540193666295254685855505279387 * Q = (490517391056819598783410893494947357877785828517, 745245208827851129189427459423724634427852305548)
1009589871666307166300959187423785114249701835946 * P + 1404233887595918023734795383886915459641899867274 * Q = (975189770679813551229421842198414640009492022546, 724655204398926712884378771192663894990410395763)
125212613110845316041292416323769179784084313229 * P + 441285311227671645009515929717620398226026693871 * Q = (709937214248629139995730117676441195553624030386, 420500046127871308641223535452302293555733635917)
960158972974084677563521473528839670871385805119 * P + 893943408722192439271197095157532294888830732932 * Q = (734850622797133679902532574169513014151661186412, 202873404345435595667111321514503011171198273877)
196191693750277735553439652923973622016448709865 * P + 1217924103510175179485143807639704951254313988269 * Q = (852092285629195836273940940379925039114935133563, 28657806936637520367796484497888423437352307651)
1201372033038847936797784256333139170015473067777 * P + 746605167034921887388237237243039860505872643211 * Q = (1052570654981203725486825980968616756670884494880, 47451731074684740408072973258204504308273213901)
236539948945702822315642946732091859607976083835 * P + 1382160877401702593030656810336876025726611858767 * Q = (724207440190907016361225886713717072863237827685, 958076964877682615032387104634807253714136226885)
1200846896003913362837425763395307644605936884582 * P + 861112026989275072023032355176666238975298579876 * Q = (7472412216952816471123091836914041639545281410, 559957093680813618904250711191904963040185409234)
1363056900073624436627095836330958646386602487841 * P + 732417868377858556035746893616514605399194139466 * Q = (518084874461403307769827975114032699429537394781, 658211265349771228558703348939244481223500366535)
864724228976249948587336103753243100747571655710 * P + 1424503717812681289814797169977815752253765334193 * Q = (444737455598791399254555777532350835088758459674, 1363704708713334453420202041557248185769644985101)
343119025157590160851991767385607662517044084674 * P + 521943245479069280220252186877801269077647622476 * Q = (821006955206213980393287856384244440335201413615, 678024081421753824233309352387834116372628290004)
328495151520096492919611491628918475758941152909 * P + 871050659709077188701224859361181933117917627730 * Q = (961125281634916840074893431224642432122848335001, 82502299651186252030097694228387834086962759217)
13232568035956065874428654211619886855209057917 * P + 1458390948054542062128171883758960402775086702249 * Q = (286740938780051092572013434871697815578389759993, 1063505574011535810868942053641767007055270769806)
351240953625744757565127588675345639202095615751 * P + 718881006620442813909734234693948022193091119193 * Q = (1373033950795758676317594358374786420879986368744, 930101297242514808255263821561989761129038927148)
1214068158774786803837141788013410793476261483529 * P + 299402079820563266643495419086583164743163837102 * Q = (712217468307146883697167024230724959434563497036, 140133682923973244681411882036270009752896658063)
87192900838053074957140734195448207949739887727 * P + 157857892477260752819417955191416019838867573564 * Q = (379965804476207014911504158048474736182040452403, 517881249617925048704170755552678474566893150345)
1378955404717959499743124679614137028696179946735 * P + 732523804654873846648822221031100699232293806298 * Q = (905301907596232523244613282621818775878542953717, 1033672856587054238820469902676826894595670889873)
666079656484329610803328794779940181873757162654 * P + 506008217071642990135389683078028408889594809091 * Q = (1176449032327948445762115718918736354720586097259, 429608259506597155472244647783933592009831825544)
569874061748924105401701486845860574970596555748 * P + 268034769474221355476395286968268071797612375500 * Q = (569467832543343330073040169120819736935732531369, 1187078747977566303153509355870305910635200096598)
574250807825193402681173213305171464504429229026 * P + 845556384449911691501051717923232753052857737226 * Q = (592689843590270172844312760181624797833604505530, 344722778369657743864797948579169032709438046857)
35547500358400002770067902418771815038637774574 * P + 532673739466038648649617654832049576331218098911 * Q = (10485109866935673712422006211605771881880739797, 435246962396832695154969404345395604377950346307)
756806959285789301092516823507424303672192654683 * P + 858616498512340417868429780502468443057726343799 * Q = (1210178575974230294586971622362991542133509778891, 529660594449256081091132001214542259070824348704)
330890284498245655823245244008044398830057842478 * P + 151084158565983696719496542810275682171157648075 * Q = (409806846148845336305583502225562929984881493301, 126500938670960901926505110380577087796655061578)
1443156287944240181368932849369215351633133777473 * P + 75761281462035874992482199101387236305905043795 * Q = (647941532498578505549323512501402965035560878410, 539371664535988964140544333316305852413932998270)
1113159626655995370958032867268444092546403877872 * P + 1265474347163526401108011524056351245804879551701 * Q = (1315353945607106721493145174465513608731254699954, 50414669280979843008136205390997042938264765137)
234796029953380233678533803347433466247807659681 * P + 1105797688992521802555657360996000916820988812199 * Q = (408444371068115407851242898794644954130949020525, 1116824857821992572594214225341468824586928957918)
1388758844655983383342520264828234454266738163291 * P + 22366212558093182349764466735887676580312389867 * Q = (789872794090635054449090400558595596281549259768, 917463288365322797528359430142020705358360723166)
830041201387735700038630457190260474074423384974 * P + 79758032634935416377300368568009875349352361565 * Q = (881601126151818390965445385558862201255119327262, 1062164069150922922298891863579624514977351678146)
1149967512135743740456885930821209147515070830434 * P + 1391000801640767739950006869795062956244837461958 * Q = (895683176861666441446297732257422788619994082211, 1181021297027342079675798660327704160959712076349)
425486575419487513112841855580246325152347821233 * P + 843099423535105066355645343118661264746005364220 * Q = (1425124583208710324977534054845408500122882962984, 876959356522481908380575034258270993554654063704)
861659929995240897663280280285984298489643746716 * P + 730577000046299504191459998249962726963146274362 * Q = (974417815239013722718616390489889227646063187743, 715672924930579912663265729400984486921034650690)
666880732502114642567751934550434669275914954620 * P + 1387963527513619186172028676279136655604881246066 * Q = (840774351134276408972154217651625410866780652039, 128649753577647917617761783451666073667640435592)
1023875755148781425725579894463658582365210923874 * P + 1063808543494145070813290084760666331005096561514 * Q = (893256570705782134929919060126781544935053406747, 1056985105382141766853321443725944696100659666912)
855138284701250060000905943575545859758877368379 * P + 1300626926689332170867468826452390622386934395192 * Q = (1263326934246039358871192874426400087525112814145, 1015910823381021151790236506969899307880637779194)
131151585311698996264641060590956352639677342538 * P + 138764838019655197919261935531677769785795523818 * Q = (830278131067392205307654136546593316466987692985, 1443278429141197112825852971554557163919982906994)
1438308046558610569478031991194627397484760926155 * P + 556538017327362316826260662010956239612818063997 * Q = (679918816734405330432523483123942869125974815453, 1119608671998053139878595075131105932939987602772)
1407438690206414165955330765368074352888495366880 * P + 199972748685185914720817291596034220565758272627 * Q = (571335345988057449719409149667530046089059032958, 218539199401695609052358889534011569623052107937)
45365064695415548217914859873749593374734196875 * P + 430488938186544273951651609639590691994655532973 * Q = (606012024851044752276833165797639815674967754570, 1179274387370830083560385073660468680373582147506)
154201738889322128017934004293479005982541512117 * P + 1094664787920341005750922552902415988250074874869 * Q = (252768173556988853338674883035658989914356360173, 416584811246223625055278632030633891421862238049)
580893342962852494979766342250108565668706541169 * P + 1278514957999249397946757566610799963063468121390 * Q = (271167107995190941130633775074738909435277991351, 795676320126305980083680991286536051432903624902)
269612952532519625845471538421093632106863485792 * P + 1352004769977439421560568626680295912258834717761 * Q = (826864354016974841366323826109876004899899257889, 562081786413478400397882625669787085339224474649)
927213601324618751189465752830493060888912641607 * P + 281357148911401861880916773848145772564064251815 * Q = (145731500617649192240272800062059283697809963606, 894514084011180607433903717788772966085804557089)
1031464818571231832025702569483596278361367586782 * P + 766867878148878217096487519796255912296596202527 * Q = (998367342158914071809712935437443688808117233603, 35376332771138770504467466393981714091679871027)
669770921543018168199309784802031899711916929111 * P + 563333037075093095820325880855942323008791093072 * Q = (659399800255939852761451421911438442474521614109, 1208846800476587174107268426130571125808681975664)
1033968336258307561205272035774563105985131016891 * P + 404170445358306539477267952294071546451656099268 * Q = (1435901891924719254844121062980024627857171232704, 648808283860224250258296980435416134227939795576)
842698737602142255440924022034239363332353300209 * P + 662178369309994155167343526819287809067232320140 * Q = (439619159887487181503332018140768393812529584227, 693116399480613675971269288288473004416197927729)
1032704702589273419452231161613680825211126154917 * P + 979628903946939107067228108336451625485199649636 * Q = (460675565281829941399569772808225126026718000581, 1260959847030123303131345195091034769384017553115)
1196750535444873045898105555768235632304209636965 * P + 1309222986658572777845420204086875480040117736275 * Q = (222585550527884151974033677456708653217841913153, 527562977655209568429804839129826858751682478471)
887781788333456873241702180595051565618721716038 * P + 129605905860655007152845337185910810473363917741 * Q = (306928552306185255973393693594732061164403887502, 421170329022417291294548622167340087909420088739)
1168961878944621442392715222089757436080471375671 * P + 381077936813066665126379001446147357115208166466 * Q = (113979334486276922285267608072154111893231284007, 1131292508020987043352014059063058237690483773240)
1333806389960225698490428704651928563902960351744 * P + 666616121208771647867831546519152443127847651312 * Q = (1267704747531047867968758854016743073845207862723, 659979889890702243706026914613907514960755170502)
1351847991892331119833529572987431988482138294210 * P + 1198012098894873862905750556312736255830521788739 * Q = (1258380021024204591797095399787460013626115981043, 547453421961483575606540980793250480783305427227)
1245615583236924332108220540372149795183541815632 * P + 1224324032113505384836442161797453724660600351284 * Q = (535583269801662402312023770316277667840208358807, 1333684135208324943240540422039332390432649245861)
780673896240992592792941764437954147709713742492 * P + 552153493419401431973287876014903024955973363390 * Q = (692884292967231443456577228127172881766971058868, 577617191289456890185196160044490599907638457437)
975149172089402276836361128055206848437321834600 * P + 936161427956831891804189900221526117754919995568 * Q = (524769135349516490701346706350159562553244026092, 1289798720997888058060947176776019851839276169795)
62525429904127843868869594775249724469969652220 * P + 541047958475309356724419537653687808713725613060 * Q = (612731471394651863129810613788056229226165596061, 625125375656530547437218164973982977366329510784)
338508305978851903957644594092375121114276611449 * P + 1298068499747689739597888375261277492596117094053 * Q = (840472312344512974046546738998748734832840788248, 192716637249466496341133808268248178783155066618)
1212340008753579040074037442117145812263897984487 * P + 970935497194303397720041738521935955424739761531 * Q = (1245900134866391496855467751823298314908729201311, 1220882664872055421574827381223475892301892702936)
1091258685966776640459395009210312410165693214666 * P + 404183775378178658545811403490323101179672912920 * Q = (140433781910535166016836524374678145156139432997, 984172930511546324346335157646700545464711796129)
584679972884465578727030568942503367849907153134 * P + 375161359965062487131398958491874104957760271948 * Q = (1201438588487158888954716530028406014362247863815, 1125430022976228252350778537651484395051142863449)
970725556522284424669395630339638233952646243807 * P + 1339521450216227506153121214049003254119388112049 * Q = (365550715381848922239100023077919310400085567254, 402929780755666438781342041599190010253705443070)
1197438089245506342094706486132667802734219622805 * P + 1260877476240535762449178208760762877241382713212 * Q = (1339482016049009260306189593060428598707614532928, 1286454540954416085501338648966443731760385421820)
453665042936991953114958911921612945314300150561 * P + 1205338475577956075371244225813772634462861385884 * Q = (394705013040836988861171828768702133367950681404, 1458783326499990409673896424526391673353102292233)
1380643334400412529842320734118721047651681961835 * P + 526130516655867887238216092930451535583588101012 * Q = (1350492180371501238053569214525554961660869354138, 1302234868945344943680796393191679449328367922219)
852579964585721476011028893336273825197531281550 * P + 1074121786447451836142521459413821614299246198720 * Q = (220098058795523775034584645706647905760264114640, 694927823227345925864445392120394003817275633401)
65242861517611915295439872937512468573070256638 * P + 8507751475485406501123937385236819331856469558 * Q = (367816275024682233535642421114805907698284008604, 502981289900398321750020839043836075706800921909)
483635448757344508427274961747699408512346618164 * P + 1248279406012919492720168070038479617892410558398 * Q = (834877767743141026371464065597386009483929344657, 686789100239344501771937634474384082028181648972)
1430903885457210480797116067995214542549209680218 * P + 1413983024347795448804888991559305403223548283726 * Q = (181014823738451605337049888879006927910918392765, 789574957358481698254756507150334959468138563648)
171036140268547188496698577210585981717737773449 * P + 1009347576385001776407127709607738106886737076271 * Q = (1359636389168334868167174588706346704113333500900, 305192917616408056825381337258716050158594883142)
463613631442024091172292940767388926944431110821 * P + 1287299516183786388110012527393637858868061090442 * Q = (690115840770835249773603110984937581744183817453, 1322837792185693358283519907594595690105867354767)
1058742014290543549467463620560149669836120098476 * P + 1431311446012982402172744353459288537070653922361 * Q = (698841923137322828241456218094918000552619125297, 410528440815059796331826422978319945535948959100)
204835218114611820779218546468988856515961517461 * P + 642075050040169545887302064140487505476208660042 * Q = (882320320746140814328380864078829222604998642883, 266394006247579737776960598725661638585773307776)
452994853496212854059392921382304700143043435767 * P + 625830705274014263576143284955012511633948105893 * Q = (1132057131509066265937360877194068848084089359683, 593804686407956330707147555697436707251795865887)
608454470284771646977519913592084368657068895756 * P + 378351915516900520850594542380292809031804374414 * Q = (225716039010399503729150947587375381530724432408, 396313725317654192053757471988821951877713065006)
439172803865671037127977369855875235941458717867 * P + 261911840752382909636677042043499126599958317224 * Q = (507358672242501030235598540674105542666701399193, 502870264118672280754595777647273275304421224399)
897113543793646202514395649554589281106784397434 * P + 270640430473551744340293913586218237319501152418 * Q = (55256122605093653673612039404240384435361844750, 189244627139576046491647050684129826312149458653)
85020119495467141489564920642098769168707946310 * P + 1123322984988040173679949239887943994703931028844 * Q = (1050063964166161949883604475360551356584338159470, 1217716520549526574609783613515114980744627257079)
1421747829925722691446273825579241494864355589240 * P + 459896553010394656909988082567178494192861369193 * Q = (323415336245701757775241274314187175590046102073, 1081246784368941398835416949729265808521411378374)
686097341461462824003708769449443181513080965128 * P + 891449832770395306159231689042370571370757080567 * Q = (191246428340876800485699469292583767717466848555, 1245920378565920705833965580405848798142986917686)
102593186399354989691582973016012643184343175256 * P + 1277978752600538086071769140968912999751708505675 * Q = (297535416612245421444029809511709497455984239623, 979729039407181800941414190830544616418480999739)
1128453342266590121062239066922607526499402391866 * P + 982745327491334824991622695964957198283176963204 * Q = (605823071748117268016909091289766311695082536750, 531277769143898455925094017392677042521057502955)
389464115758788788403838027620478294873835053851 * P + 85355622468184792996263021646354293102385042636 * Q = (470654148723794625825452140658288524406606359067, 472513149135603923136688809495052940782771850205)
813675680431763009302956825041020682142164729892 * P + 548983297783918401251541966384373433416635429178 * Q = (1390961072781838446002684603241720503572595089964, 801413815599931738142977922555285244258274031115)
903311313222620511622537857445442960406609229013 * P + 1058045143742154789767336941415687847315846011994 * Q = (136923291510861234904345825343278225983630606014, 67181444587874442779776385264628273488527993972)
790238098843649406166070492564134283397476236141 * P + 1244285054158881006124923199542748714564729660845 * Q = (13519709908999485634292104218377459049158703951, 1425945148629020649440623000906621359121597502360)
576123111338070863983087063064211003216334213394 * P + 1347604995595414187512035418867891814186105500768 * Q = (317245596734160694862144351198603423808849248606, 1254162051786887461486645297492094769881101962608)

View File

@ -0,0 +1 @@
To be released on Friday 10:00!

View File

@ -0,0 +1,225 @@
p = SECRET
pubkey = CENSORED
ENC = [130730895301824689236116409952605427561271445110616961938879486597736539677282357197751494237964518436712079126987272,
134545828750848592304511356496320248908435278910569864461098929886082384612332909627784407543898233009612473135208943,
130706440220404298545121860977277861571107194473811448907299440031565761291469285169162564237093926088792207514204909,
135903667308732468662676834401919937262534832214341065290499605902948694839441280074789546150488416258754670209207839,
120233245955528013013187402241863081619461844565287435046622168403578433759819149883788301587243657215180726245937645,
113859304450394335097415139383465004848695755774791663713330527706506938459643987439761937829655555973219131724121521,
122610143974909296298418387810253222348276470920393828990818618403310099789500897881628565505279413259540065575811551,
109298778343566141661420425651102868600583620001954012591128273210209668782242619448749013646102796917897993725814730,
113336425110199844342651734783459850300940842526402983766837612226541083578098883756496710092534383286697006566783418,
124127062429537424680599101451798856647776018158268579210205142427155211009679078500203666341167415811024102823551410,
147443192593449828831969077897952666141675048583925655490144298960150637644361375125117624061222730818706802382714989,
122057120571132572859033134182938049968651214857441053955828934212654449447026337123412160319567284478213549478753127,
125966637764385560674378791033648031440168201063593513362304318673273458142227532524622353832109952626191807942890680,
122874161069991819355525551071838321712955372465327306527445646629180766525660361782566259874739602124024993139083034,
128287581851657555122085176711201165133154295324411112479104596618595920710048987759399756427432086729526658357509523,
121079284051783804127026088256275328349860570018055040401032698296121177594539478260302905116001737708899525406011273,
119361659878103304604376326725693016340840960018305274117561675675878266417943990201589509950431528098494724616293174,
124885092755305873284908096699640523516709400987535284972246243235880978203121656988692704875859949332914990425381360,
138987616119417318023449670298589420981151577901534321136783468479083204256095405627472200819949255096500376598734973,
99467461500235869072783575659841954507110051493128505553842980717892644503272333116814896833685192230514454621056796,
142331125052791734333902339907677538898868822653583877757113948351947622780314873616701162429821797713636218257914651,
127159112869683066824975921016306375187224507754714018214122761097867292603194301144257505470519666056519950864483268,
142331125052791734333902339907677538898868822653583877757113948351947622780314873616701162429821797713644710665920795,
128723982408813244435157960280988473875670070162152572752584036320595697108457615809821699315056795161722775044339342,
128224013580724497146235157831051586945665338072804712145363173061255504069246389131542921612514281535043723626577474,
132335328979727214982911618638282536753325662143200572238474006912991938117884643148463300980844830242224283255666276,
138159915752978101665582019380908436793076976537172865570607263071117985801776629505982245522350392381805407034503167,
118529076588108942915334016684334437029810126381170429243102398394661646128426405695063292404866295136443911930799393,
114110430402001872291946560413836622917488700270961099752372571051960567068602434058086546324230172173861015113974848,
133051127751366842581855901303931760655532306298095266715652867833241521001778509443358563399864605147603121501071809,
135381495092712505217048188625381872655957980509249422925501138348445777152996922273675349082655884168772935354622058,
127618058273474467615721182698229689594170884922604777078075447213796880932512821411894204329414158158384658345114463,
123159993109937613678523719440942356046563253191511703907801331015412271139449671573180480366633718648307644849856964,
133538588388976529272009131174257092469593363768080768119743558081779369656710665215988719398622620318802757386071627,
124301625644835676443098549357597586530904433232441525164319757762373340970732860224738658492469848616243744123129446,
121137831264462528759827616216817960182226832546171980161785780055720858746889336848412737715715001892354662024637246,
112883923792929596536626918177273790270177223562805803708496735845891895892708265919662069138331787356492073764041863,
123583694029322254554299305394122452104953478584118209425681675118012817405671366854348995907298012736578448892060632,
123570198597983047002362276768440020092817128413569093933142787983248851408760403094842476946449524359682200536935881,
138618682294415608850730298825871468245481612245446086641380532066624342150612513271895006967630120143368581693694209,
130067040873987695885837970604240827853100137965217935518863260562168132615203166529251281732620450788790363354841216,
123282199786429436807961573476234202625975044234970792284207516011452859800525131329532136981500078060045843326717684,
122711388503912006154675164311363640466130813201028500604923976457530386918006289125859702462787089318279548047278383,
122481437075327079235835656728423763956319492307070079139061587885894763513936936537519033301705508601889546984500444,
118840389737572433806749929743314941465090274568654824876658520360571230755129030551951251956321870881103165190975048,
118296566074041170667037524965918792858548077173041213784557325785078048252767429349604506208448536702135588744541732,
124334007389403709554532209352879951387744198793187367011131191399558237055113260744356007698458916846751957690150225,
119359081135834061233608524030385399934221161597360778283564482802764194556603617185206697641343545346102256955501797,
134866284484918132831721417059632585145407091813790496417340049295356875408164362676624284851188249309375813416038294,
119981807762984725822981665904137803338763197667591620004753001289856481341278616497086928112088125452890167016220215,
119157740332362646030755197815423582878305975138905068681345113416758556214848438421283911782335446501202557583492886,
130160432370115887222167103146409897924679874475709007742455668023428231484187270808422575638622646734197460659163251,
132310080411892389647566386833828613238423037875034618188935219437288985907971409117748334441073022876699430060511949,
112945554025988094803467570776868768207006126945807346968363527048899403339044700033639195944938496255877578472576967,
117789567249482592870508641577035623598622586028532286403704388810450927380146401359728399097281527718165659397805851,
138342780617030621486746621948813420542688137057383918171676326461619834263370884245747244795967749690807437658881352,
139269372917378799208899633528052475057120740585167603436035177893808413585041497135332697732972549813282652855125900,
117416898642377908332819464678727074154839959599619779361919803976817716351019021057400477093635403804072425393520553,
123826556557253964436193589057802641052012903200252966688412425583125689121965561089319416720629612016774079980271900,
141235182915090748771600151955715388463979009195272125585755809687212752517721591452376735446461365457164491575708113,
135451363541409982688658309267244481087361294165849436422507599373492746368121429953416930472923115388429740031757727,
131966494791313750299524040711235005583245266810060774219871378330833816762984736172102347614751225193276024114967975,
124993372265379686238392084328879724302641716318075540036394605319549818377612796334693743982155940759483330007956809,
119239323670345370579746957877594411124088548553284648070417851312391881695273299753020842462489415876015286170070876,
142208788845033800309272971059578933682116411188563251709970123988461238057644183168132494941879685491135938231476734,
135633524874074888281908142445722667446490645707489440189766212886014163243940986912773165624880782489367700843604123,
135223540763555411558639523879175971295110483195322997802056911834439372171639878328669777219415750284468878158164538,
127382988408328180748671355856222863392851824258140096881693137097690836058448826080714554238155300488867561542197137,
121646369935908161217156878049833435487751305061238060686388691454416524407973602476771377263640246502760774797638968,
128582439699954249379502467199194088997666367984285656980091554812204496591628848439335069864633067411807027649410802,
118825841701186664326584100956854094009048117641014196892574723506768635540472563747948071709073678798194833626963182,
127018094458567765925187973336536053669723022490357602780858198777671250138210808309670605501642265095683578316649067,
141705544343835111656162472945845754675406205095766388043291745327268476697741041076999161457868465830808937886818736,
122119741528545472843783990998312777467575696459697946313387059163078303955494411004191080201983624926381461271425867,
141939873572082157108666294853222997328662500713684655884389502782045678408821214900821224154061160215306769055825522,
108840043506084802786589320432745767801167688966813043459825768214166785586786065997377902883780384054781541385444515,
137012577819424891496686215704971377587608327712879737586353652324797211002046026447559186498313619964533892484181202,
137341534758028359037551169959387216038647029914205885290641194158165621165026550666447873538680154845345186563019855,
123215636438418552390866495257575273183287506751023897876534758178221191075884251511443403300738956489232108402329912,
133153635659924452846820957022958610983802897863425468929651671536646878750784917955000888394398961245407340716091812,
117588239883285545991835054580633645496537367846820990662612624276055623524676489887176764923974045244426271099885637,
125117208704806871472308464500871550009672692797619317613888337739028941567028758939078015237960949108262464281906445,
122702579940920755453105891556167196242229588736512040022529093778125351758257423278740776609395333709642057719127535,
139782812650948567681689754564929900116001984571432271691591088081490936819514342830953376180370931443583765238647962,
135876690959428922569102282419727180276276072285393491970030106726413366915731016995585659407544054018686501873286791,
130040064524684149792263418622048070866841378036270362198393761385632804691492903450047394989676088548667636779124996,
137083843226390733141480328042627878395327301438242884527306046473271291037221656956102996211108272310105208906476003,
124659720876556278928233036805726153009271276774472165174331780655819001418000768856432294470551318285596687572293507,
130300786528376430291463449691747429507625203858909182014027568948443480103936134110411975321644107186101759985498892,
126036481691813344267761677480669504215707623238180044888383940857834353395118529868968058735387093662311017160858139,
136966707144109682330638924645401184834979623571695139516920077805850762615358178452374785333499168267114369851311372,
132750261314710577899943091299657693438143920605428144542200901745909905677198087888342527868142164101075083576411638,
144948812543497235575660809880687309763357660925309714915306088490860906292058294628802965735388446008805096545255656,
132711918265282017004056418148269278976510481839683037828722742498232651815535764121446457208130617147124101376297959,
129937608708489662099336357105321639660487504652255655823794842429184235080073651887774950229636368639559709998030302,
133992922114859826550105319965781786438757631538370223183273021776496567933496845208412072007488687484196186373814522,
124912267822110921805683803516363637283345601016119626154425544864618653522347199068221841874473169468481367325912399,
113427720461165415550348979321231337011159090680678457393713170084614913824306580627980674837709374325876935442979016,
131482749370932233506197999373633715145382025599705237135884795970109239364730011379309744877645863079643413489223118,
124787998644906276252646715646501105716169489793492666983955576589797705614385159315182312993502789114513001710523677,
114464558345445683140283519023649943347245482369644384474172581209303334587569416958405044956464899364677681658660178,
142005608214954820989199386437932834722879106552417334466854760349382320310026892292819354790740591492423029970424815,
135682062103509115774090986845025841550129575379235377673940974285199878876007054573633045870219818357897515426170742,
126510663861475165715508903991196150644066043478012660031023202691032326141173290816734686751082967987879209728587389,
109843909368752473283561149377955131807534259061180415471654527882774667843437204892641966686846218696427487581559010,
137172196947395250422427214284121500049109630554016481770667676431063879925989059531898199842642453770735603945933371,
112501289040514416441706105310536397261597763358312310067605273310403962316426868271029758527283434404434012874839655,
131154288554317076081560746054127561663445769884227561512511451895165212824085091474820349273446402627696891593492398,
129578857123336914544822180268298435689324871130327913649510948920248267494278060514211547497408433650329696770536305,
126725128131505414690997379291172506467927209015763082987952919057180693894113381735961305864188515631278077438959311,
117526269602385609804214543882039270594145465319706356758774566517362523789776855505081206535520133155471567024415361,
136054649337043505090483326967949230385429405315588084916194670296314886133727637824786848479569804154952926622310983,
122662567691237772092813084261841880601886181609153649581532255024866323308188299065574280543634042384855702352694376,
128105022482479902291112259512402780445026867813017825272098980519022462973797023260699748898609066221091712716179567,
125288191984375548378809572439248566043519216835396351054919498762354109992222615350441011987658768152391585269165451,
122788975919868532307948252620515390928703263460326454221189442196106755782797222168282521164615369488216610922740112,
135468348685568980711366403705006975480530398553980711695735093968854941685370411600777709331451905833471222672101529,
129721417476875151547343617348672612937256160429536653135879041953098811661926070425221205829595481242243224553347157,
124106056768384871827089346763657964473686276159179751379219535946382188408651999595712784984062303047010175757892516,
103798174062618452825263900851608614495840945023171872104660302774447297553729871857661332182406336962051505596483713,
117678768731007125971711776177474023426697870342101592804398170041917323790159070984412791493873758190386162957421461,
125899673236304773786261673571946619087854057387012096311326049757349503894523110647509304702732770682011536970801466,
129573904176259505146023171211648876328819901404730487079113871141065935520401043961209302406273907763585475457314031,
146852502777466245711242929028641620522237923306266459800860103267845822000108232455350133426265167429372584602487778,
129918642998857293113256966122707583807500484757118338026925831385884892696307711196691885826065150108131021733625220,
126339336437622003633944439434782928061168335860634061470646255098483578178623804367112498676610165060047492494984354,
136243799599653859099018093806207816068223845990013579814001629498412856710993690451253432663015014730678433448903129,
114924764957465440451973530156944880554392098215566134304773594533831212697694803369836749607460402584526964062920277,
116015714854477878002825014948436587968288921072608457948666605692757907070320360087495277722880196011955198248401703,
130549065074894675009229440144603897697872001895351898894305063821625164719793268378345963300258201248227160003746105,
123656087532247346351160496384160253927248973652422890851028220600944900668755804484884214640873416542982419527539238,
127768431309431291525683300058556563250501912653053986304903383213555655561590102253109880967414812186513437194050212,
138942197298726096322469757822173685594081568395517035998408921089425041835610928662966765743797020555497917518405229,
132409206173203238332753652834264403530767758006595540364369089889879581307343262173797291446095695399803879923230377,
133650435369317473363614432223211181268325307778866671944560383417729411387747855226011017664714144645489623558376179,
116774926792936469108456630539774960652663138246938015675700310234471076392125085358590508738676960000077446230504898,
123998434955185493788435676034290478348829263668908273199266590571329822629098906895969408362869923907634398233555833,
128232643837731096610575171672958847261378011019475159289443819281255463277283819207862289972346091644092262561955136,
121213333363954519101837715587564199901134534700505318904622382317308722533904618190989512997194479983642056493817361,
141859690055425583624110493601323868665262494116009206061745490499923643927439989399630534539546466470819573917506076,
123153078435881046435407702653616950794658438707747371272073391271146058408478549303112769268283828020127149713855191,
120435498416459774677923384640604312200392429675870742925287202763021464552324289454193110861240627951380207300047827,
135691036265666015560502200135064370118878679757255191956599200156273504351950902790859290353878671852236843850179028,
126307886004760808496006394717604002501222694736495640141632242212453849598313970926294104277692046220505466099009564,
116554472994416645010063741046037740170333834353295173374578654354563268814598679175732760725879307201122346283921022,
124133101457049806831810623199779148523418268627591118795014754970904780021565756955642446619898297016154030845954825,
130428160846734831658740916812118167973988966602550250168243427599386714694286554876533885632966311959102721780633700,
112662606576622024409942747546494563078596011818461862130714282403152373104275690999156173262463940367846039069280718,
129024551065766433816187006384748574563953281507119575172216297731562014904023516300426209764876668756818991880461404,
133974270198100561132086542369806099688775587008211801160726260543014891916626842491155205200860991840809619321267940,
145152354149066404517005272667372130521222796350177228720231426154049219594781485052634868519509013223643065185838227,
138929394576608888427696801709599398457924516019717373546664757947545370266505565459204693394703204225246872108590034,
119137825415859466543559956863612332011584385556300481336908050348031672799075752229151574451814931573524683848471241,
114487574852777163734684114316474197355698040888589999103561562303745114599792744413753171381324708909710177131130253,
132051381741110675126010567899158970140912198757549844104647994243820469066278953654985218791543663494366910971610262,
137215542998598300148291638688276933624456260736133430467936657649054702976580432207775979107389881286825167733806089,
136713168844353056024744603302248503150136686646411725207630348035740524084848543576456747322857323380730266454168994,
127188858164516685495039226994113199127242655142260556448464541856665515295761151598894766339094946962286235133275823,
132774482674982096743026644754317493563798112608802878778200709336486001481195912908924094303544318307224363575759374,
115470432430380265809739651162743865329611380451465473231346140018019121940732343316609428800094796690212496008343076,
138197628489400676059186745541039097392194394795668938542652071054275509806763385310447308174715719235759124881696043,
117738892990560156425117411913112187494348297236063750511337909802753566214139105503373962288470104470708906861393128,
116474491426987988747971254764800908744386612930693898061727078919219878704980438539055627746598697984107588627843079,
110957148556480139723545378060994367098591319009427345218103470545961205125753082167320884547772576265690548638348506,
127884521593576380678571737294287455927769326734630451130161512829247206138710055604198203766218808787884671055421101,
127420869438823212359964383472854237817668791643507668413042404660202371602241788549460162188697262534295001541684924,
136810507579690704567397086392569594808339917624003157384103067036230453695059674543918145714731249997867694445406092,
133282622630824456432723928076939737717239778135542769403306051581001383086734214074091941324468271101173726043517223,
123691710927724768695946612531287152901799747893741126748602932725885414605530341148115546312129906757975026942194753,
132526192245426097791272843822005351340659188665367518421580498573068238452103813437882971691236806888840431920493885,
121889042966446339758351313420531417004807415246312005061953684251371171447608786383974964804686921956871435686164089,
111182032265674212258664558255708030330986463215792129807129885481953921125523744425537809795575342644610596213771143,
139305022901399977959399024248072636342299236240261055589704315577040064598102915905606825753046909406212848553202923,
130327133227614977748068137703103510331323647907186297965533203889149123786359820060327763218461666383910580050908319,
132790117698759633921991863430615886606726358030673743034532513885384984323039173262330987647073695081542298545957670,
132967788376141720038722174414668186876792406443519583707172864329750859230638800934438086907804923899691842297241962,
123257055976826831512441285317162625241350095436927839531496521941718296161043829072632381655421483423959209817818201,
142678762459285820862634524780500192452350531358755996457548292297251429290757607843930854187654511478486581076780423,
119763254508019769072091904054351642877677873583655181068711735322869959048880857317753329152500107862794013040571911,
115027976748148399021737190397957868062908236858512752492085982981857145467887252385714044800477579673567307197879862,
129212450409466027671142665888381214295574625269450539258818701661342626647440070057881743867184988908370836536322321,
122628578893616446208889963100723492746622677012725364157446119393873027272175672826352654461089558753174229912140196,
134064599425330148139711983322219232632710264510428305265428617591065369521953454034055580927622065486636354885065106,
142472588694756674133530284957471587739792345264323042708360761086359868685761962026868022219424765806219441167733837,
98421982965219867012977181998197559034272230327996139068500278053194782653864660333179719532498764001894552857691670,
126944940748659776191495651511002317669535518477595865434212176620438777524381865410882713830326123564958027069314932,
133424931864388386406987058725292040924763227597446236057529474796055717570314607507115965425354004621623275719617589,
120802422658913227809588957920884764902241612642445628777892569680875304987984585665380188597019921797419899512595427,
120035277089716914991119246324493968517106130146911192472453005955124177409930495967396331028475781606080125396668819,
131329892606493021824590541882847798869778503914256757506942296305392240818944837542740915311634539672731884642988423,
129679479997786102142243342854152227563060418053904674137578522712363049603190146542181200037856332656432411640697173,
123924778598406245811816090618923128924339943352154929633389674764005873945317905017692524257381885053266816770056029,
132937370957335875476986139315972448087615623881997456349539363453189589169600298881533297774318352333697735463578912,
126209176415275352428922326635709887859344585993561337199389566774275808125765430524497626590009687895876206281988104,
124659278937489018511192932293776482281954442473488134501423998831608589689982639575445807891893314489604224462196389,
133526323474159199884000402132535421402557990193487743158262103929474392190021490670916461667212312752445315064312740,
124460437262777588598593561393488499952872197297852750132953711112810926860723442252289315208500466156623601360738430,
129150903116432335904017701323544105245733184092726631470041046411047487969149410805004541970540831006743697157164547,
129194045850209621941819696204866668904387405852385754004901626976788177657734622312794704948994737730544430745154752,
134873219331274098573078143206217241342569639106202358990444548104141222276164719614680016708358826313300427463963815,
125471589199199588243812679130702085488858613936292316367622512905457680019100201595654545462399112217858159958142479,
127408282746209388439728542219693671213558308608394039423533241923186151886659164873959162917028585286168121969550922,
127783932019406793955118549117254147512574788720735844049197985032276969825737671461627776967766638268276578867349019,
136102979873854638487378243354287384620005973512448758121630355155099727773036324975928411907733359514353214713674910,
146389759928732329878935405669128329797036132419228145842836377553196335762821855627126155292472413572792766944637418,
110407692653075771685601208517210293097700178147432500065493297290098969385410085996072736641875409331250442403063072,
140082772065243194217534220881318854176174242269610753613664096572360049358564292456965464863197347729059965582547693,
122932603345413592383652049956900971793919490123734495515103623762182888682468216147222522534521688981068795728338104,
132774482674982096743026644754317493563798112608802878778200709336486001481195912908924094303544318307273097397736819,
125966060894534996216339971492488056560677372710365082909587637393292411053005591291046504639445962296219641080846529,
116248043121464747306482803812493523592618976369601613053622194487592423703031850338486776347099555603450470173038929,
145727528348862410039644279839852507133560737725772393004147224308287281232308040571409372224543474015150292230946825,
120432161638684124411623605628653447110184017559954579697836042453579722620623057405722784044705880247142747352521927,
121728791124688832888939767720163299541507526405831410350903708411737534654801926349882819057484649739946943099388585,
130445895338287544838919072807135926392080819979863745872280479725618784047488209092275614642947251260486151428064248,
133051570829953105566734085829167974131602510967702892722793528480995625154702175532421703383671689997359187039868045,
137279288684130795662283661495937929900902450919895506844327549938052649411706149112348143088823914738128110539991641,
129578477175781178076797483671566133645125538775601504756036464885601885326984835541337158872830177651850712676170873,
130175260994058553323151340329924084139734907908846103673244971334130402019746321955651932316841913925236354225657979,
127120003002166947678051573468580170600280405950840546239590438572870756277661366994444126656974821487751292158028530,
118356573411029937884864404586883535448951885642507025374758457814211731891404613331536090237727053849518775757108760,
125355778432864464828595483293060748107000643582740547880271228519878712708211084735273881312010871087491903419597793,
138542284652940889280033317344090573043930964065722097766540624070267469471846241701107854676542700214247123492690805]

View File

@ -0,0 +1,34 @@
#!/usr/bin/env sage
from Crypto.Util.number import *
from random import *
from flag import flag
def keygen(nbit, l):
p = getPrime(nbit)
pubkey = []
for _ in range(l):
r, s = getPrime(nbit), getPrime(nbit >> 1)
pubkey.append(r * p + s)
return p, pubkey
def encrypt(msg, pubkey, size, nbit):
bmsg = bin(bytes_to_long(msg))[2:]
ENC, ERR = [], [getRandomNBitInteger(nbit >> 2) for _ in range(len(pubkey))]
I = [[getRandomRange(0, l) for _ in range(size)] for _ in range(len(bmsg))]
J = I.copy()
shuffle(J)
for i in range(len(bmsg)):
BSE = [pubkey[_] for _ in I[i]]
NSE = [ERR[_] for _ in J[i]]
ENC.append((p - 1337) * sum(BSE) + 31337 * sum(NSE) + int(bmsg[i]))
return ENC
nbit, l, size = 128, 19, 5
p, pubkey = keygen(nbit, l)
ENC = encrypt(flag, pubkey, size, nbit)
print(f'p = SECRET')
print(f'pubkey = CENSORED')
print(f'ENC = {ENC}')

View File

@ -0,0 +1,2 @@
PUBKEYS = [(64, 5097817878965528130491999342033509383671964377259616798715086934670476350727067457961522894098176448758455154790088591291492140436888345341524809013526529, 2719656862057675929701181954473487234560053809504182870159883838830483677151615636749895148757512803297431604023949928845798307274620135893628483730370165), (64, 7060901523045984042726080087295157550812603117014135470810146736924359487877594696955935359761087723618432268625961633499242025342993080599272255219826689, 4236820856373471395975112418570159264049442285065614702317560670715324826831495654542690903261317999410969993239143341056856173969712835598894202769388189), (64, 5886668253670710710014305751042288929482573229210648408256360809410689379782338231757686802389194096652696623501426797782671696086916718671567800963694593, 677368525715501885225550495329044026746223906252509513138088716119365842650677326813318891234654722631402944420811717518465312218123608617232162852424170), (64, 6114696543898743304257013154635488204390945532201859491053616049905885027429927049234156928074388068529709328066036749070246579808959041037459892329250817, 1021087898515549606893085024245043948068246289952806903035703154407844021232228744683154236268344854762246167228090127959207385970329548719938322873853549)]
ENC = [1286907403972341066242889039669746312604706856103274344009103676324327972578841290574873287897323982618297132672952263919380020818444548599642494468594665, 1838915271351575639601282561214303786600921537529533284271544284380414309392526991211419383097531042880836480777627616721634975396626109131764273669068589, 1895763364891005946887146248268886690926567718566562720182936733403281150463031165139138495033281798780786067518579648144178418947406635436838517465170080, 865258808401079606933739673880885312400885776434889955425887632635573328068544052188598492574428785517787870375464753706677205587063007358817267526317094]

View File

@ -0,0 +1,27 @@
#!/usr/bin/env python3
from Crypto.Util.number import *
from secret import PUBKEYS, flag
def keygen(nbit, k): # Public key generation function
while True:
p, q = [2 ** k * getRandomNBitInteger(nbit - k) + 1 for _ in '01']
if isPrime(p) and isPrime(q):
while True:
y = getRandomRange(2, p * q)
if pow(y, (p - 1) // 2, p) == p - 1 and pow(y, (q - 1) // 2, q) == q - 1:
pubkey = k, p * q, y
return pubkey
def encrypt(pubkey, m):
k, n, y = pubkey
assert k >= len(bin(m)[2:])
x = getRandomRange(2, n)
return pow(y, m, n) * pow(x, 2 ** k, n) % n
flag = flag.lstrip(b'CCTF{').rstrip(b'}')
flag = [bytes_to_long(flag[i*8:i*8 + 8]) for i in range(4)]
print(f'PUBKEYS = {PUBKEYS}')
ENC = [encrypt(PUBKEYS[_], flag[_]) for _ in range(4)]
print(f'ENC = {ENC}')

View File

@ -1 +1,72 @@
To be added on Aug 26. 10:00 GMT +8
## CCTF vol9 Info
Max points = 4096
Registration => https://polygonscan.com/address/0x36a1424da63a50627863d8f65c0669da7347814a
How to and rules => https://cryptoctf.org/2022/08/22/decentralized-ctf/
If you have not found a private key, but a standard string, use one of this API:
http://209.250.246.26:6789/get?flag=CCTF{test}
fyord7wc4lzrgp4g4v2z7nhftoymolmmhmuixgkmnvo6f2bvlqdtjjid.onion
Start date, Day 0: 2022 August 25, 10:00, Singapore Time - UTC/GMT +8
Release of Day 1 challenges: Start date: 2022 August 26, 10:00, Singapore Time - UTC/GMT +8
Finish date: 2022 August 26., 16:00, Singapore Time - UTC/GMT +8
## Challenges
| Name | Points | Level | Author | Required skills |
|-----------------|----------|-----------------|-----------------|----------------------------------------------------|
|Entry | 128 | Sminem | six and silur | Base hacking skills |
|Illusion | 512 | HODLer | six | Solidity hacking, solidity debugging |
|Metaverse HODLer | 512 | HODLer | six | Solidity hacking |
|SubContract | 1024 | Natoshi | six | Substrate hacking, ink! hacking, web hacking |
|Asinve | 128 | Sminem | factoreal | Cryptography hacking, Math, RSA |
|Mazlos | 256 | Crypto Wojak | factoreal | Cryptography hacking, Math, Factorization |
|Ratato | 512 | HODLer | factoreal | Cryptography hacking, Math, SageMath, Encryption |
|Tifany | 1024 | Natoshi | factoreal | Cryptography hacking, Math, SageMath, Encryption |
## Challenge signers
Name ENTRY
flagID 0
Point 128
Recovered signer: 0x882b74a4a2F17762b48Da013dD8Bd796D8c2C7fa
Name ILLUSION
flagID 1
Point 512
Recovered signer: 0x6B187213799bde630f134af7ABaC6486F1b9a3e5
Name Metaverse HODLer (Released on Friday)
flagID 2
Point 512
Recovered signer: 0x58Bab2f728dc4FC227A4C38CaB2ec93B73B4E828
Name SubContract (Released on Friday)
flagID 3
Point 1024
Recovered signer: 0x1e7b826154c3529F6A95D01fdD78a67a60c63Af5
Name Asinve
flagID 4
Point 128
Recovered signer: 0x5282162D07DE30C4Fc17b50ea4223aFdAFB94fe1
Name Mazlos
flagID 5
Point 256
Recovered signer: 0x3Aa773c173a816eF0ab31C4e94Cdb9395C6F38BD
Name Ratato (released on Friday)
flagID 6
Point 512
Recovered signer: 0x1d2170D349d8b8703d8f375cFCE74E6330E3663E
Name Tifany
flagID 7
Point 1024
Recovered signer: 0x51bBDEF4b96be66b90837E778eCDD2AA4aBe4F83