Z<-RSAC.D4F |Multiple precision stuff |Routines to treat RSA-challenge numbers Z<-ADD_ALIAS RSAC.D4S "RSAC.D4S" et|T0<-24 60 60 b 3 d #ts & 0 r DO ARGS & T1<-24 60 60 b 3 d #ts & "et=",8 z T1-T0 edrsac|WW.ED"rsac.d4f ",ARGS ldrsac|#copy"rsac.d4f" & RSAC.D4F rsac_info|3 #sed"X:d;$ rsac.inf" & Z<-WW.FSCR 3 rsacini|Z<-RSAC.INI ARGS rsac|Z<-RSAC ARGS rsactext|Z<-RSAC_TO_TXT ARGS "URL.LST" http://www.rsasecurity.com/rsalabs/challenges/factoring/challengenumbers.txt http://www.rsasecurity.com/rsalabs/challenges/factoring/RSA-640.txt Z<-RSAC STR;V |Try factorizing a number by random guessing RSA_NUM<-RSAC_GET STR Z<-7 #sed":d" #print V<-RSA_NAME #print V<-"log rsa number = ###### " zr RSA_NUM V #print RSA_NUM Z<-TRIAL_GCD "-v -cnt 1000000000 -t ", RSA_NAME, " " , RSA_NUM #print "factor= " #print Z 0 r WW.FSCR 7 "TGCD.OPTS" -cnt MAX<-#fi SHIFT -s FS<-#fi SHIFT -seed SEED<-SHIFT -v QV<-1 -t TXT<-SHIFT Z<-TRIAL_GCD STR;CNT;FS;N;MAX;Q;R;RD;RS;SEED;TXT |Select random numbers for trial gcd. |Sample every so often FS<-40; CNT<-0; MAX<-1000; QV<-0; SEED<-""; TXT<-"" Z<-N<-TGCD.OPTS GETOPTS STR IF 0CNT++ RS<-RS+RD<-(3+(2*rN)%5)c?(3*rN)%2;R<-RLONG RD;Q<-(Q*R) #mod N REPEATIF 1 #ne CNT #mod FS Z<-Q EA N IF QV; 72 t (TXT, " log10 Q ########## ->" zRS), Z BREAKIF ~"1" #equiv Z WEND Z<-RSAC_TO_TXT STR;A;FW;IDX;I;J;N;OFILE;T;TXT |Write RSA info as space delimited text file OFILE<-"" #ifndef "STR" Z<-0 #sed"X:d;$rsac.inf;.0" FW<-"10 10 10 10 10 *" Z<-(FW Y_FMT "Name Value Status Digits Sum Number"),_CR IDX<-#nfind"RSA-" WHILE 00 Z<-WW.FSCR 0 Z<-FSTR Y_FMT STR;T;FW |Format a string to specified length per field Z<-"" WHILE 0> EOF RSA-576 Prize: $10,000 Status: Factored Decimal Digits: 174 18819881292060796383869723946165043980716356337941 73827007633564229888597152346654853190606065047430 45317388011303396716199692321205734031879550656996 221305168759307650257059 Digit Sum: 785 Download Text RSA-640 Prize: $20,000 Status: Factored Decimal Digits: 193 31074182404900437213507500358885679300373460228427 27545720161948823206440518081504556346829671723286 78243791627283803341547107310850191954852900733772 4822783525742386454014691736602477652346609 Digit Sum: 806 Download Text RSA-704 Prize: $30,000 Status: Not Factored Decimal Digits: 212 74037563479561712828046796097429573142593188889231 28908493623263897276503402826627689199641962511784 39958943305021275853701189680982867331732731089309 00552505116877063299072396380786710086096962537934 650563796359 Decimal Digit Sum: 1009 Download Text RSA-768 Prize: $50,000 Status: Not Factored Decimal Digits: 232 12301866845301177551304949583849627207728535695953 34792197322452151726400507263657518745202199786469 38995647494277406384592519255732630345373154826850 79170261221429134616704292143116022212404792747377 94080665351419597459856902143413 Decimal Digit Sum: 1018 Download Text RSA-896 Prize: $75,000 Status: Not Factored Decimal Digits: 270 41202343698665954385553136533257594817981169984432 79828454556264338764455652484261980988704231618418 79261420247188869492560931776375033421130982397485 15094490910691026986103186270411488086697056490290 36536588674337317208131041051908642547932826013912 57624033946373269391 Decimal Digit Sum: 1222 Download Text RSA-1024 Prize: $100,000 Status: Not Factored Decimal Digits: 309 13506641086599522334960321627880596993888147560566 70275244851438515265106048595338339402871505719094 41798207282164471551373680419703964191743046496589 27425623934102086438320211037295872576235850964311 05640735015081875106765946292055636855294752135008 52879416377328533906109750544334999811150056977236 890927563 Decimal Digit Sum: 1369 Download Text RSA-1536 Prize: $150,000 Status: Not Factored Decimal Digits: 463 18476997032117414743068356202001644030185493386634 10171471785774910651696711161249859337684305435744 58561606154457179405222971773252466096064694607124 96237204420222697567566873784275623895087646784409 33285157496578843415088475528298186726451339863364 93190808467199043187438128336350279547028265329780 29349161558118810498449083195450098483937752272570 52578591944993870073695755688436933812779613089230 39256969525326162082367649031603655137144791393234 7169566988069 Decimal Digit Sum: 2153 Download Text RSA-2048 Prize: $200,000 Status: Not Factored Decimal Digits: 617 25195908475657893494027183240048398571429282126204 03202777713783604366202070759555626401852588078440 69182906412495150821892985591491761845028084891200 72844992687392807287776735971418347270261896375014 97182469116507761337985909570009733045974880842840 17974291006424586918171951187461215151726546322822 16869987549182422433637259085141865462043576798423 38718477444792073993423658482382428119816381501067 48104516603773060562016196762561338441436038339044 14952634432190114657544454178424020924616515723350 77870774981712577246796292638635637328991215483143 81678998850404453640235273819513786365643912120103 97122822120720357 Decimal Digit Sum: 2738 Download Text EOF Z<-RSAC_IDX STR;I;J;K;S;T;TAB Z<-0 #sed"X:d;$rsac.inf" IF 0AA TAB<-TRIM $T[#nfind"RSA-"] IF _1=K<-(4 50, 2+rTAB) PMENU TAB;Z<-"" & ->0 RSA_NAME<-TAB[K] AA: I<-#sed"X.0;./",RSA_NAME,"/" J<-1+ #sed"./Digits:/" K<-#sed"./Sum:" T<-#fi "/.*://" #rxsubs $T[K] $T[I+i4] Z<-(Z #ne " ")/Z<-,$T[J+iK-J] S<-+/(#av Z)-48 7 #print $T[I+i4] IF S #ne T; Z<-"NaN" Z<-TRIM X;U;J |Delete leading and trailing blank rows of a matrix J<-f\U<-f/X=" " |Leading blanks J<-J c m f\mU Z<-(~J)/X Z<-RSAC_GET STR;I;J;K;S;T |Find section in info {and start testing} |Export RSA_NAME STR<-"" #ifndef "STR" IF "!" = 1tSTR; Z<-1dSTR & ->0 Z<-0 #sed"X:d;$rsac.inf;.0" IF 0=rSTR; STR<-4 d #deb $T[Z[?rZ<-1 d #nfind"RSA-"]] I<-#sed"./","RSA-",STR,"/" RSA_NAME<-#deb $T[I] J<-1+ #sed"./Digits:/" K<-#sed"./Sum:" T<-#fi "/.*://" #rxsubs $T[K] $T[I+i4] Z<-(Z #ne " ")/Z<-,$T[J+iK-J] S<-+/(#av Z)-48 7 #print $T[I+i4] IF S #ne T; Z<-"NaN" Z<-A EA B;C;D;R |Euclidean algorithm with A>B R<-A #mod B & D<-B WHILE ~R #equiv "0"; C<-D & D<-R & R<-C #mod D & WEND Z<-D Z<-VAR YDX J;K;V;M |Get components J from string of long ints. Z<-"" & V<-+\U<-" "=VAR<-#deb VAR & M<-1++/U WHILE 0