|
2 | 2 | "cells": [
|
3 | 3 | {
|
4 | 4 | "cell_type": "code",
|
5 |
| - "execution_count": null, |
| 5 | + "execution_count": 2, |
6 | 6 | "metadata": {},
|
7 | 7 | "outputs": [],
|
8 | 8 | "source": [
|
| 9 | + "e = 65537\n", |
| 10 | + "c1 = 10004937130983861141937782436252502991050957330184611684406783226971057978666503675149401388381995491152372622456604317681236160071166819028679754762162125904637599991943368450200313304999566592294442696755822585022667008378021280392976010576970877334159755332946926433635584313137140987588847077645814987268595739733550220882135750267567373532603503399428451548677091911410732474324157868011686641243202218731844256789044721309478991918322850448456919991540932206923861653518190974620161055008847475600980152660468279765607319838003177639654115075183493029803981527882155542925959658123816315099271123470754815045214896642428657264709805029840253303446203030294879166242867850331945166255924821406218090304893024711068773287842075208409312312188560675094244318565148284432361706108491327014254387317744284876018328591380705408407853404828189643214087638328376675071962141118973835178054884474523241911240926274907256651801384433652425740230755811160476356172444327762497910600719286629420662696949923799255603628210458906831175806791599965316549386396788014703044837917283461862338269599464440202019922379625071512100821922879623930069349084917919100015782270736808388388006084027673781004085620817521378823838335749279055639005125\n", |
| 11 | + "n1 = 343504538870081878757729748260620800783581983635281373321527119223374418103340873199654926888439040391545101913132680017655039577253974802351999985470115474655124168592386965001556620077117966153475518658881140827499124290142523464795351995478153288872749817655925271395693435582010998996210909883510311066017237567799370371513462802547313382594409676803895262837061350017911885033133654781876923251129406855067993830824618637981136966134029212516871210627954762147349788788999116702635535406398258621926040887099782494271000823401788337120154104692934583729065189687995570122890809807661370008740283447636580308161498808092269041815719148127168137018600113465985504975054319601741498799761500526467431533990903047624407330243357514588557352746347337683868781554819821575385685459666842162355673947984514687068626166144076257334426612302554448774082488600083569900006274897032242821388126274957846236552373226099112200392102883351088570736254707966329366625911183721875374731791052229266503696334310835323523568132399330263642353927504971311717117370721838701629885670598853025212521537158141447625623337563164790788106598854822686494249848796441153496412236527242235888308435573209980270776407776277489669763803746640746378181948641\n", |
| 12 | + "c2 = 4948422459907576438725352912593232312182623872749480015295307088166392790756090961680588458629287353136729331282506869598853654959933189916541367579979613191505226006688017103736659670745715837820780269669982614187726024837483992949073998289744910800139692315475427811724840888983757813069849711652177078415791290894737059610056340691753379065563574279210755232749774749757141836708161854072798697882671844015773796030086898649043727563289757423417931359190238689436180953442515869613672008678717039516723747808793079592658069533269662834322438864456440701995249381880745586708718334052938634931936240736457181295\n", |
| 13 | + "n2 = 8582505375542551134698364096640878629785534004976071646505285128223700755811329156276289439920192196962008222418309136528180402357612976316670896973298407081310073283979903409463559102445223030866575563539261326076167685019121804961393115251287057504682389257841337573435085535013992761172452417731887700665115563173984357419855481847035192853387338980937451843809282267888616833734087813693242841580644645315837196205981207827105545437201799441352173638172133698491126291396194764373021523547130703629001683366722885529834956411976212381935354905525700646776572036418453784898084635925476199878640087165680193737\n", |
9 | 14 | "p,q = 19024691283015651666032297670418553586155390575928421823630922553034857624430114628839720683172187406577114034710093054198921843669645736474448836706112221787749688565566635453151716934583685087745112614898780150391513798368931496744574075511968933800467288441832780919514199410584786925010518564670786685241724643282580795568609339268652910564215887176803735675069372979560024792322029911970574914829712553975379661212645059271137916107885326625543090473004683836665262304916304580076748336858662108554591235698235221618061328251985929904075811056422186525179189846420226944944513865790999242309352900287977666792901,18055722101348711626577381571859114850735298658417345663254295930584841136416234624852520581982069555948490061840244710773146585295336094872892685938420880462305333393436098181186277450475949236132458958671804132443554885896037342335902958516394876382378829317303693655605215373555988755516058130500801822723195474873517960624159417903134580987202400855946137101429970119186394052011747475879598126195607938106163892658285305921071673588966184054026228745012993740035399652049777986535759039077634555909031397541116025395236871778797949216479130412500655359057128438928721459688727543057760739527720641179290282309741\n",
|
10 | 15 | "primes = [10864078180916418691, 10049235158029375571, 12448177342966243757, 17093292308638969889, 16123604149048919099, 15175734709842430433, 18106525049998616747, 11092420583960163379, 15751974537676958401, 18345408081492711641, 14745811312384518031, 9949603102225364603, 12034779627328165471, 13062839684118954553, 14813953870710226847, 15332916111580607077, 17265001711647542137, 16870346804576162551, 15211380502610462057, 14678737767649343977, 13645878578452317313, 18390046459144888243, 14397830993057803133, 17543713628803023199, 16408421615173973083, 17673334943789572513, 12404642343676224637, 10547615587767500213, 11853704782834170959, 17289161209347211817, 10596280721192026229, 14619040595108594017]\n"
|
11 | 16 | ]
|
| 17 | + }, |
| 18 | + { |
| 19 | + "cell_type": "code", |
| 20 | + "execution_count": 9, |
| 21 | + "metadata": {}, |
| 22 | + "outputs": [ |
| 23 | + { |
| 24 | + "data": { |
| 25 | + "text/plain": [ |
| 26 | + "b'moectf{fACtord6_And_YAfu_Are_6oth_good_utils_to_fACtorize_num6ers_ff90S}'" |
| 27 | + ] |
| 28 | + }, |
| 29 | + "execution_count": 9, |
| 30 | + "metadata": {}, |
| 31 | + "output_type": "execute_result" |
| 32 | + } |
| 33 | + ], |
| 34 | + "source": [ |
| 35 | + "from math import prod\n", |
| 36 | + "m1 = pow(c1,pow(e,-1,(p-1)*(q-1)),n1)\n", |
| 37 | + "m2 = pow(c2,pow(e,-1,prod(x-1 for x in primes)),n2)\n", |
| 38 | + "int.to_bytes(m1,byteorder='big',length=m1.bit_length()//8+1)+int.to_bytes(m2,byteorder='big',length=m2.bit_length()//8+1)" |
| 39 | + ] |
| 40 | + }, |
| 41 | + { |
| 42 | + "cell_type": "code", |
| 43 | + "execution_count": 7, |
| 44 | + "metadata": {}, |
| 45 | + "outputs": [ |
| 46 | + { |
| 47 | + "data": { |
| 48 | + "text/plain": [ |
| 49 | + "b'od_utils_to_fACtorize_num6ers_ff90S}'" |
| 50 | + ] |
| 51 | + }, |
| 52 | + "execution_count": 7, |
| 53 | + "metadata": {}, |
| 54 | + "output_type": "execute_result" |
| 55 | + } |
| 56 | + ], |
| 57 | + "source": [] |
| 58 | + }, |
| 59 | + { |
| 60 | + "cell_type": "code", |
| 61 | + "execution_count": null, |
| 62 | + "metadata": {}, |
| 63 | + "outputs": [], |
| 64 | + "source": [] |
12 | 65 | }
|
13 | 66 | ],
|
14 | 67 | "metadata": {
|
| 68 | + "kernelspec": { |
| 69 | + "display_name": "venv", |
| 70 | + "language": "python", |
| 71 | + "name": "python3" |
| 72 | + }, |
15 | 73 | "language_info": {
|
16 |
| - "name": "python" |
| 74 | + "codemirror_mode": { |
| 75 | + "name": "ipython", |
| 76 | + "version": 3 |
| 77 | + }, |
| 78 | + "file_extension": ".py", |
| 79 | + "mimetype": "text/x-python", |
| 80 | + "name": "python", |
| 81 | + "nbconvert_exporter": "python", |
| 82 | + "pygments_lexer": "ipython3", |
| 83 | + "version": "3.11.6" |
17 | 84 | },
|
18 | 85 | "orig_nbformat": 4
|
19 | 86 | },
|
|
0 commit comments