# Eine Liste der m_1,...m_256 R = [] # Die Moduli N_1,...,N_256 N = [58004561760490386941644092115841297798718636180981250367732955170878774992607, 58488463427185492623504484759187728883411655379994776944862031723516808628817, 38210606815075307550884002538153727311100487286535543612011524859666791449269, 77844868388924590506965967240631371095764734031836050870658204719237778878237, 43073280012086851587584790115079037902931461778992564697267756427747507247657, 69235423230667588209413693027830485383936510721365374013076884481414623199059, 84401656888048926622163816435044760739200717396238477018841583372292506435237, 94736330282996239275606690371458359599697100651434197862634792163268132673817, 50472856427150135170949266193737660685320809354664911848165083546093068734149, 34444094587321285510082311224408255675386695529208565028360664690438978817447, 61391736798677594930487368772999548038857306715202506435201974717033225563893, 56254073703433197036495661319083227235566263459733294316800976688687062461371, 58479145779938529914153226843829008582788941475932989396626926901666468705581, 77662213956305123661732193732336977230717668259015972835048907753210156084921, 104385387693144899682692462521604726169830007662787997465780991712195051957023, 47934253455932062826059516457082513541016911502928971712765247232813840875441, 59660161593127316744210510520563707166010445695307045486874919237408112989403, 58334811024849989755027305000353056878507291760825688632985492439111867388583, 81448072575661014042210620500091961724274108390637368092468815470320421105341, 63369040647967907854113395686078212770462338672332343074147404385645549106649, 51975317773473206566907700978557613038230229390228766992164482050311219899883, 58001312145002180844966237784520062258380596671973611532355049822635479509171, 87342931425600983852436891227214469427750636918752966423112184963244520833109, 48505647239389150159974417902977159382042987241878887404111175396762303936171, 53279620083966689175104616290357830221975120618058298910467421796752526762393, 61030546680656627461906708936881173007496678878240645982489870809104548291363, 67072002409813379381034536006083692179244495435898518753282995981720197812061, 34390303305795135921539324004489093975217936467728097911724582184906377016871, 56837591187061739703003270381455000033513497328118825152373108335729552112043, 49247286855238935575579750935014840777069519189535731357819512523832873861513, 50891773835170478668709072738263011015308755276974324991869322776100917960649, 66010233348425061114259185219467859983442121365977210069048773456561152440507, 77056122000192403559400051578352256698764148147486137198464782968398029625319, 73910407404724247824168877764578139410630049754131272609170244185995983552181, 81412926642852222295874837693193193338434840833655284018234608174977251513889, 40507323987682346568200842164133903729322597078003078218956806332543520571439, 42450895366603727221355482925595556317307854128631398620972584517901266581557, 63313024077614310823412037834089463034872344994829060262685549343430618056309, 43574570985659611715117493104156985932076721790575301064549792482254788736363, 67514205765429925284233500897089547338680124544605672155468615176803074128019, 70773134248006671931065705445565913876693904650099886023555610642991178056821, 49564134628685987553305461684413233976516455422206225746577217037207717511967, 62264116857122661859606700978449843999807293908305786104095540588978544426919, 48282591753908959725173620480612973179861165260942129550232762548106174256449, 44288001435058895795180866425726967417082152823170835600036931050455780159237, 51644835694707751865275997391059618346452509617616740059954255632199581100827, 32826309064540986112680332407581293745087343314351011810261134511412151357979, 62624821240613205608511609721306102619653909946417692228034395999873530574339, 61720533080270590807743553877780739835961126400406696295613380782886468528761, 82680048090498960579804687506162574722394600938336895102004451668687620775991, 63365510455832789767005555318633846930569875204218471940807851804049563380843, 54405981577148245806511029266607755283434957056848295440954419142804211920539, 44682378312292937676620186918060971557677656792336418794501969223851096316579, 70629860690481290937702205130168271717797600594650423139665302750657363749657, 74895260905705397561207515099375568191077678880179763311144865022424564314093, 61497201807892572130757071033076315184724951397155263211011020585214344727673, 66025231470294238489982308194970701458706143735127183399247286344897912149941, 74086144345628897017539423346813016164822822470923760617064534186551135805593, 54786151192985643705236523814565831405791570886986937772321344776499077876909, 60053450231157673109738822524090731106981849241510663030526038693501411003477, 64539908612849507759747392031034461162640184628636725764228597334450238447657, 93463259620165196563539306728710778038927520117414237141411784754046725214027, 59033549093307927897593562376884812901635399781498134608382679042061678901017, 84471653475232509937951386743920939574020396194127048203864881710716349109821, 46568012780379499911716169438258509207062140222988883803985797644482328605477, 58183555633561356615809040080429773450397619545056680975166803474138227414771, 49234947092910949648336992080964343271180300848642305454767962167900695319319, 76879412319418131259484921116574932006172889797911401013571406956605397689747, 54631024470844245949766660910545163614562634989811681292280900872290740268363, 63550318457375171126773363950027312524949724546154851922352121752734564904287, 34247130441920591008415847327821266080645814794079337010726699249969447004921, 38468876896650180505232284023054035912419610474019179559830267745736828995893, 101629977938086464154436461001526523871257698684655836530058054816379195527691, 69559226039780198937042282607882665290982913252665093418996872912287056633597, 52210463280003511769823182060315951607885404397923470561411030072194754520099, 67843324836476739931049381516818705719512277830299653455288195397412145022563, 38401738079747130714272829771017443901421830054552692842430790214324370943771, 53630113716479833752729980340265510736830840959917155119347862274973946376159, 53627404170980749666070523153193501583592671426812911155337331927512118851199, 107007157096725574205885753625032073375592791381950403146985356214914795208937, 61492032538112236526971615034386749989782740472667953594928983883489465828287, 69390056597958613088199771718697588710315426066215123100558587271188643971899, 42967708456487790742133739604291476266551898227240642881948668067351641212789, 82672515384677026331439787606980701458705308961478665351748162560796011365193, 91389932662026804365845220901135192374329944645357251041423257426583067672279, 45061225688588317550621967964692704889216261825077073392320976978437254154627, 80712060894313979827504935000288447380967212378796271055337661773927645937339, 65989524684820377267514381976361395142850514686556729445892037876431183391069, 50631488577653016080532908646891699595468321101454685053439463053950043258641, 76038545585126249881702528923822612381629214819872592478134183195702832685819, 98689994442712759177422718065884877426673927416361972435526857529680097936221, 62871124290667811285991555777406185936773840814364906482969179098131891330161, 77650593525219735232747013606391410007826731205691701725695199453106563460811, 78555323111900990675672137899184154822481789540027266346963055557397843655239, 53744841818948539679312151719501476304243296188208900923472798060057194086857, 62750431482145405247905128452378991544453259088942358672738649020796374124333, 45023260029545298656309481624426522622781784909327033389731922954841251406581, 40433418421726754268305127503493674785434182014795540505449095468056624359879, 59736905097238349293545174968225439482475243816240067550724009470661203075623, 57286342357396625007961577679695187928455123686781218566354712891328949603207, 64480566752654095481249205767305969981670902874431437067696028262697691071121, 72420664392865193281283247645748114005162214108980774615402440181670504656283, 93778996627444841375866629889308551594874914719828012131084764170799254988237, 108779940050622814855086738467245934305442272461380141266663638609083563028209, 60723206615283147573859624520577615249071012732414638779429020995838525093119, 54502248963580573148238674580052429097894040855860717046389705551159455253331, 68735734739753118467966128246498519980869328830223558337362152766446498643571, 89309204578536084328605337730274709373285703268996313289864397417849750870297, 55156753687575321539717641571906097407375341249779163536497628334859505682151, 93408622284715399772925187514878222619160134413085831373838043117316489302207, 58068572473622829788019923709433336398965166474220835135294485461811843690549, 59126603330990774454315223001213193596975487076119895178660348429953919023769, 38092790561143143027673083627203675707844859651399411178199140652114442248821, 72999235918470282846235242583717576431555615375111326744468408449113811675423, 58656979035668816413544098441584167213186218346139558974666453655779200521767, 80151561219869431725261069356867862806722433296183640748553835138738023025189, 37537938238718178730536301368033177248380973331712082505312237633030618449999, 59885162231755327293242330178150205498317063901094940490972601913569965370461, 91368228900624499739081786066770551089668996838483180504330639370839964324817, 63484638878790293384371211770508793061243830152616689477384958796030562868169, 54927772882032236517724559338185345368463590176473301256023130523953645502271, 77071122312984040268601629837772945701372314302488058493980480908053295570299, 81234255257368569754017710690567899445569343307653954366768234375034167322629, 67348126946470215421787344300720621968554452020496622445486817932287442627911, 49376835581934905012477487331648134051718527550511448334304675256680972594729, 51775856220173710906805359958061012156387696005663352536578443958445501981573, 73691880573300752620563465480159382953192847475806124621649505182467285045941, 49292275832623763000466240644942749299766222558497640082741426249405179957589, 62596526163974665358955213492878295681846318497746171226186779606820314576939, 72201215536539553906354663126885251077329057577310235204280951862349528267541, 59763690496768926629708761138611791866403015861378374752891876582037571780437, 62441618540777439713656428622905640165899084903267423864120337019476668839449, 35648435811161839359301727163253228591925261814279660315148616607630593405287, 81053952078559810894756127848590305946016465661649132751045918884453573018269, 83706750720721879539812202391544179127474086402817044645689859740753518272001, 82344307236962617949138287329510606426885246042120759974115186810778197741689, 69530547842193572964669317090596302045391473417528850630531208152502202011269, 46584293229335498825660693700981773717989171648200131903355326836748257579151, 97425471360181427342536004821898708353742842988773901897626928759461911809989, 86319517589457149537546190659508609268883883051221007412110150292871335951847, 84866787596906940813062743283768161980677069010275087180491600068374464513901, 84148243648585596048247635200345391359412569908445369928845234694398370831467, 46919096336177870567417196691024595646024795316217616119260417131479356270847, 90355804254487748565282065233963250553953647796802920402562108677396403932123, 57552242357002803788209427620631792414312812415983567963677921402595230673841, 65477730858921015039596039953756044125943609325273880182811907958761566727023, 56601898571504177041718039025383591579543940888492264937838723090583818193499, 58047654688050078147442212781099709360043566315259660759227169210558000560323, 88322970170544829088109388517131512603573092320113611817474896232290134572703, 56527278004944267821516320486716284587273315889455587615305340099930851005651, 69778690329800929664242757611130102247252904507503385273681713556668119028709, 82343689483285634653351853452185904097178153095540096461950897822178925711051, 87874432953987886140260049760616063677783675613720177205568005047674858926013, 95504707041841428245542971825214890832440130461408450848898941563671834074047, 54385673273786104723319059780769691985095453949592959126218686785030000054423, 85418977771480256322464433851041616852237867752663106259861748355426243263769, 83983585013001434183616066339697508648656975920985850396230177867957969221953, 74768388427141298340429995950780310397246996373545610319447084715794201454677, 72915156895285854663807866099775694277809462196517619557040053945563950589453, 67101470523551190272457639459754257168735406379944354143581618254019975540237, 75879388683547773434992305772040183129670319317573303838840011895291129864237, 82460017998050469722081602996742175235072073009379423356397283714932976181969, 71068756326104783260754639191691635131456077941248286630574410140989664235469, 66673533231454916690401703354733241348742903040587568451447139716260235947289, 79896489221145781396138810256362362299855101224461564129000853990657171994073, 54952895382765006017682202056170503273527611880743463659814346789457317764577, 57922797880838761131990861332840343469138939401696810996367246131495180817307, 71438829214152996206853324455132236197801719953277139757380743949242743770907, 49102614421133917353450211545470768173880712134085746432322920624765721103669, 106910316992209234461667862245071017967022625228914275725842504522398324800857, 51195990206630204243991835133288829647320412117713618472386219832572769698943, 39998264788925872968406978318183557053728719143630277695897293660674549197093, 58047686617172212839130069771274550491024134197167935880988795355810065857927, 50666783823091731777055749010704453116136986662044302393196769824636252083773, 85376121730408235018122171225278432031585699624714021246156773859879505526571, 56540428716326164888435762134175000328013567835076932302665096877557285958389, 92950674096490423807544463893398659731185109209587779574839130033618063094573, 46396902827928025714791995577894089722821389295444499968854320876446979576159, 51469603955450971275988039302937568750620654893773239768166711208157366179149, 46935147562349881265234583193300838952104833475265508740042389576009514064129, 81018208158106873093399064900229387544702345767072352228319581508689974285247, 71610527812328541101310139105050727607639154680541002779554593708385229913317, 40194735488736711506325856518403545997972210895556780706382764163277306051749, 59024466167296243333412787550126322945147726539523182331392845434236679843429, 75311119551272569087185375814842613513243501546067225080877773596257139089353, 51673159207933279798266120780504681682612701806767298000536906919059812217789, 89466036841863330682865788553262447832469647942444141440588092393702832783251, 87263177555769410668535248630327740938016242822237104021799002941636120072373, 49760896986391500093214211262746594646679490618464587896972498988642974167217, 31008717933630017289454679500659589365712157797193438674426398421445967000029, 64680211932865049574806747475280610721868512477057913966475878351799246271541, 89800459409189710774400005238787211490071530502121868733567494771804915704819, 76587816768717089497514880032952139852828745335029027596931198729668011802161, 42035948525337403815399518410828238725913066833556288101363582809755564934247, 92768835681815374599014847520729536319334347125968068527849942912646959308407, 85099599978180002347588095291683684105221591827554499288727562578135065409087, 91975134703972095999913749278322173199333349641705825009406717847807597810113, 64152019987506933726749732396111402383953290491873595312554855408439794001857, 58309200327230152560088559050390946497206735951777359224282112347422270274367, 54406382459463429492445773890800857278816250030252118471674604481661634484861, 46493129729890566617973537713148498743139800983597331707149898415513371777711, 43544372969683977706809545737256795208493644773808702202696625114749944414091, 62591779454369373088573766530267185706075827812798340711246428158709098463143, 36083377891556005141653509323099000542088561885229492497391312523198022948793, 44893032368307373276086103048735484579061858072698467817679593242397748681989, 72738293919565467385624960437663805979397315527096270880121130279744689514387, 62914424583766624401959961266572980138710631786828823662306913677756427166773, 98210199023479543421644223621218202838686851979555344703046401669749618452841, 64623348423566280175679847338615184437606379580655698431003065814564493745431, 57492211752352498826922759174311533451598900618842878638529221784395951814757, 51479147601590136135922143703807106097126995744469184679292597680723976589487, 66244437604534240034941652567783149866923746096394556057077842720316500529369, 87909919693803649482532814833093014376420437959530119277064677218326186741191, 56939886358791121298383292756604943535158357212379433897970921596755683299029, 59248107141783815520963560217145098752513848474375266719514926129597856237983, 44114121453286403177668095069101050461765987529294132136879694095726785134971, 61309623199079568961041680425907026356805899290982632111742511931899010594989, 76087865244325546927474437142215098765528413204103202318509129134818749158061, 56851443001455186024473651107689016762531779170212770838338759041117128951993, 61639971920961271251952864390006386946045182320696147077531208483100580128301, 78223697542263033435513042279873944093186204948736086399286545134192977302623, 71918208688168667791816348994616761165547931711753007454323706354803448015163, 80877219894145638482404160578152636600637943407551442304204092501919238618017, 45124993386886849166701663711458314681777774439318434742414456187284322554329, 52214175907808959346829047508040725170586314887872918661732633304076030520439, 70997859274866444186530657907798139081649068734699996942923369300378648693657, 76354807474830449552625700953778704488572211284332768455735632184756212482157, 101203097473570596926235082787001905924779918823272385030816998240145927653063, 77579370378856682162289668449782241922499507305970418355633002128153394322663, 45335478805579059352007646578065497252826344965973716043794669581792133975873, 55402116609877409303127882068037238861880118572506074068081426917275706228463, 98588464294678452896765403648885340036881475187782944092039362376397039207751, 57859390963057435818184266852393060056878350293509523630179296748347194182139, 65829069530337306625742133887073686097597564889791299764627422008658524150657, 45360229475898661014100240858973339228409869432226085177824006500619747048239, 94872785975050361455587750747999785108109618990022308531273726883740128596049, 67024388759154140045206529809794005306123866365461615010744473619976611910759, 58267361837959902802575655282851413534628436132508465708694579616951948942627, 64088452121311706991047652331270832391028652967838675791581388449489043219503, 45433142033793007398402036505155767715385039471503730859855915782656530592229, 88115029258261851750085559140563278891640796066011745050393999543761807621687, 82238023932019525872611328785846694611883076401749525143296237857868764282713, 77710618647719165218341368142493278423350265517835553660189464118831306294599, 62002214859616723365602590191125776688670841367886268911485760215321584676219, 59991347017816966746352588806296313684756694800697753574643370981845900288467, 54941474275557599978475778446639087448069541011697117278240608474596767801739, 81053872403824963821356692521698289860825745913962293033097305826922493614193, 80186697382714277347014055510861876817509398506219035433541412858249833446813, 47327443933744463844784207694192001446637917254094069401109685413949091286429, 100180776281997748096504225526316934428876088313076975952680193980823244007073, 58499844760103884630162690366026270230637492961716927406605192283191763671613, 92372426108032570933277676985636179883342226249885842048323137518492595700697, 61024350622793584531726487227642807704670270110313287236408355758304869339641, 67151917058056932691704629660060370290857135572246804822655775122695871986017, 58265689040889536841170517662058219601124977166562234348269575746161303352391, 48520518611614000829785510857897620452784447528950874731537860489823166836219] import hashlib V = VectorSpace(GF(2),256) def hash(m): h = hashlib.sha256() h.update(m) x = h.hexdigest() y = bin(int(x,16))[2:].zfill(256) return V([int(y[i]) for i in range(256)]) def toVec(r,n): x = pow(r,65537,n) y = bin(int(x))[2:].zfill(256) return V([int(y[i]) for i in range(256)]) def vrfy(R,N,m): h = hash(m) s = sum([toVec(R[i],N[i]) for i in range(256)]) print h == s vrfy(R,N,"Kryptanalyse")