   !"$#&% (')+( *-, : . % / )< Y . G[p , ZGF=lm C ` E (M )T, l< m
1 0214365
798;:=<$:=<Vh]TXi W4Y . >4?9,@B>4AD?9C$@BE[ADZLC$\]EGFUFI^9H9_aJL`cK4b M=< N6F9OQd PS, egRUfT &{ <lI m  . C ` G $  RG AA d , A Ï  "M ;RUT9W
Y~< ~ S `LWsT , C  M = D (C) F` ;ODlImgn9oSpLqXY < .
:sr^k,j&GNU
mY.
MP MstLuIYLv
9w
kx
9y|z~{S}ka{AlIm)BsU$lIm]Fcga`SI . i g`X |pLd  ,, RSAF~lIm)Fc9iUB~9 `aRG .  ,RSA lUmBFU9X d `4
Yc9¡]FILgX
F~¢~£U¤a`¥9¦§I .
2 GNU MPMP(¨9© GMP) d , ªgf)«~ngf)¬g­g®~f¯ GNUf i±° T , ²g³X´9Xygz;`µ4¶ i < Y , C ·g¸X¨ FºÉ ¹ki¿S»4À ¼~YLUÁU½BFS{sÂ4}SÃÄXN4{WUi AD´~pk]qkV `ÆY Åº. J& $< d Y , C<º·gÇ ¸STXF~ps¾ÈADÊS»XËaÌ±Í±F9gÎ , p Y~Ï ]W=ygz;{s}S{BA`Æt9u < Yk8 kiU`4ÐÑÒT9Wk8 Y i=. Ó9Ú ÔÕF GMP AW§AÆ»ºAgÖSA[»sd ,Ög1991
MÕ×XT P$V  ×c. ÝB, Ø~[Ù Þ; ßF9È XÚGÉ Û9ç Aà4ÊLp=»9Ü&ÉËaÌÍId , f~á|â~ã$äåÛº: $Fc´~kpIæ Ï±M , FgÈ AÌUÍIdf~è ~df~áºé|ÁUFSâXãÕäê`ÆÅºJ&i±ñ9Gò 3.1: & ` X ëÊX»gY .ËBGMP
d , ìgí]{4Í;î (y9i z9f ) F=: ï4}~ðø TSãBÈ=îD½`ÓLÀ óB® ADð9i <ôÕiUYS`ýgõÕ4þ ö] i SÂº RUT Â],Ã ù9, iU ° , ìSc»±TG÷Õú$»W 4 RSA
7: 98ii WÕ 3 E§F 4 D Rivest,
1977, MITga`Æû YkÂSü×XT9WkY . i
FT U~]l±m]M &P
Adleman ÂºRUTsÓLÔB>GMP Fg$d , yºz$Fc^ºSÿ Õã4äsÆT ½ i I» Shamir,  , NXiUÕ° PkÈ±TG½ÓóBÁÆAD¾ðXô$9`IP S Wkç Yk½$S»  É i Â ö×Æ.XV U. f[S `R FJPJ*D4|OF ×º>`OB9`SKÕFRÆT )RSA< Yl.mÒRSA
Ã° îD,`v6 O[üGF SCPU ÆTIÓ a×SYLi Âkü ºH : i  ª; ×LgÈ=>]Í±~{ lI×m]XT9FXWk ¡4Y .*ã ¢Æx]Od £1¤ÕFB=" ¥ , 1024 âXã]ä "M ¦1§Õ»i Iî`ÆcX|WX×=Y9F X $i Â4ÂºÃ RU,T ,  9< ,b;×»Xî T9F Wk|Y =.×=`  `XaJb þ LX< FFW4PgYF¨ V P=f p, q `-m~b;<  , n = pq
` e z∈ Z Y . (gcd(e,λ(n) = lcm(p−1, q −1) Y d .= 1/e9Upkd , ª9f BF < 4`k Y . GMP FIªXfBd ,λ(n))
=1)
.
P
`
S
©
g
Î
Yï4}~ð "!gm;`$# _mp_size, µ&%g< x('k»S¼*)4F< d `©$ÎLY .
mod λ(n) `ªÕ
¹9}$Í=¼ _mp_d,  + ,9FUïk}sðS-` # _mp_alloc
ÂÕÃDPL$Y ./10SpLqXY .
gg d, p, qzJ{J| TXUGC =e,Mn mod n3 2436587:9m 9)< ;gmL4>M =&c< WG99ÕlUmL ?Bd , @+<  &{ M = C mod n °«
A lUFc&º¡k*p B CD ( lm FY E ) H GCD (;ºm Yº$p ­ M d®, lm pXSFqaÃ ¯, [i PgZs*Y F'XE °~¬9f ¼Æ#>½ ×£ÒE ) JF Isp±]` Kg« < YÆÅºOi JSRJMXS q9Y (J LBÕFÅºJgK ).
k()< Y, . M = M ∈2 Z  < Y .
UFcLBÕFJMONB`FPJQ
c~< FGM*T&U=4lcm~
LTcFgª1f±Æ`³³²?$<pkqkY . TVUsÕl±m$pkd , lUm Y~gÎXFU+< ;m Yº~Î9FIS"M WÕP§i Ã , lI1m ÕFg~Î9FI` TXUa , c i iU7 °  , d ëdI1Ó ´ lcm(p −þ 1, q − 1) F$A âLi ãBä x;~m]Fg~Î9FI`g T YÒO . Z~Fc1[ \SpLqXYO[PÃ Y~F~p , ;9m z$MkdkY HÕW .
T aJUGg^~n]h d=&Ø D _XAFcd¨-,Ãêj pL qXpsY 9.  *i k n < Yc 1023
`Xbd^ cf]egi
IB$` µ O < *Y ¶(§gIT , ;9mL d `º$ T i±ap  ,pi − 1, d = d mod q − 1,}gkc~¡S L*plTXmgUb < < Y$Y TX. AUGd  , PP F F` ° T&`sU±qX nY S iOoÎap  dI&= ±d `mod· i 4W$Y4$M J. J. QuisquaterÂSÃ i Jt ¸×ÆX . IF [J¹X i ÂUFY ;sm C.þ
< Y . T&U± n$d , q r&sXFSÂLü[P4ÁUFGp , A "F t Couvreurz](1)d=&Ø M_X=F4ÂSC ü mod
PLY .p, M = C mod q ` }»º iu4iI° T>q1rv~m]F AJw Ã i T&UG P M"x yþ z < Y ¼×$} Y . hzJ{J|~<iF  D B M A lcm |Æ*T B C FY   (2) ½¾*E ¿1À ©~n i ÂÕÂÃ Á Ã1(¯?
À`> Y . < B d , TVi Uº1na`aRUT , A F*TVUs
= M mod p, M = M mod q
RF MP `1
¥  Y .  , &¨ r$ M ` P `aRF` ÄÕÎLY ¼
GNU MP

PAASA

E PAmcD SA

A ...... PA

B ...... PB

touroku
PAkoukaikagibo

kensaku
PASAPAcm

DEAm

B

λ(n)ednpAqAAApdpqpAA63dqq

±F M d Fermat FI® ©~n i ÂÕÃJ ¡LãO¢Dx 1024 â~ã$ä F¨SF RSA, ¯ dpqRSA, 4Æ|lgKkM1¯$=&±×4Yº¡SãO¢[x 160 â9ã$ä
FI`$B¶VXsU .$lIm (Menezes-Vanstone lIm ) Fc9!
F "%$×ÆkY º þ %z &$F P%')Ã[`  À º JT XY .
dpqRSA #FUvXw
512 Û9$pkqLY . ·d , d þ F$âLãBä xBdIN
x9fBFi (z &BdÕiâLãBä x$*M ) ]i i PºV È , +ÕPOºsÁ) -/.  P4Y . ê '|`O^, þ X)ITLW$Y$&]dÅaÃcâX1 ã]ä x$F i 0 ýÕF z i &SM±ÅºJ4PgFGp Å1" .
$$F 23$d 4 5 4( þ PXOY ¼ ;ºm$7F 6XF 8ý$Ff4. Å9pLJBqXY=PBM ÁGÅ FgCM Å F C z]F dUþ ÷4z!} d±9ÒÓ A ´ ¡Sp±512Ó ´× 21023. %p ×: 2; ¼B A Å C F  Áà«]YsFGpÅ*< À Y$ýºz . f
RUT9W9P~. W ¼IÓ9ÙÕF ½Bi ¾*A E ¿1À ©~n]FBG ¥=p 4.>d =a?F '+i  1 ?F @ÕM V À YºFspÅ$<1×I0&BºYsMT*Åk+$IP§&OGIGd Á512 |T>×1CSp
1 DE 1Os[WXFF "(í!$SI *M G1HS<p V Y ¼24_XFO#]Fcf1±ÕFd>J& Y . ËGÖgCgô7KB{1Ls»i¼° $à]>F M]F çX 1024
d , Z=â~O ã$N=ä  , ]RSAGI 4dpqRSA
T9d~ÆTXJ¡LdgãO¢D¡kx $ã ¢[x âgã4äÄpgF þ z i ~WsT lþ!m P ic°  160.
lcm >i ÒRXÚ ;ºmÕd <ºÇ >T ® 128 â9ãÕä ic° < #Y QsVJ ,II .

M = Mp = C dp = C d+k(p−1) = C d mod p,M = Mq = C dq = C d+l(q−1) = C d mod q

M = C mod pq PkY~F~pJÅ>;m]$` ª]dOÇ B ;×Å>Æa$RUTY¼ R i
F Á Ã1(¯?a` O T "d Å Å qa = 1 mod p, pb = 1(2) O
mod q PLY a, b `cs³Ò < V È4ÂIW M¼ = aqM + bpM mod n5 ÉËÊÍÌ6Î
0 F £9Fc]Gc E d , $$F Ï$Fc~ÛJ?SpIû À êYsUSpLqXY . a ∈ F º
Y + a XY + a Y = X + a X + a X + a (5.1)? (5.1) F a FÐ]d , i gÛ?4M"i Ñ1 À , < P w(Ç Ò V , ÓJÔ"M 1~< f 6 `LÁk~Î , Õ~f û à$Y ~fF` Ö .
E(F) p]±FIgÛ¯ ?a`ªÕ < ¯ < (x, y) ∈"Ú FÛSi  , O <#J Y iI“° ×XØFÙ ” F ÚJ$` # . ÂkÃ <FÜF ¨ 0 K  , E(K)
"p?
`
Õ
ª

(5.1)
(x,y)
∈Ý OA OF Ú1 F` # < . (5.1) M=BsUSpLqXYº~Î i Kd ,i  pXP V È~PaÆP~W¯ .MkPXSWBdI4ùgGÕF`³Þ² ß< àY f4(M F̄
0 P4Y4ÂÕüP E(F̄ ) F <d F FIe~³f á*âF` # ). ·k*W ã À V È ,a Y = 3X + 2a X + a , 2Y + a X + a = 0 (5.2)
 F(5.1)F>äLd f], FM 2i pSYºPLW=TWS,P§¯> , , i 1Ú ªSÛ 9K|×[`*Lå Ygü~9ÕêM~IP)P=W O .,F 1ÕdcHgJ4pLq|Ã ,a = a = 0 ºT]ÂIW . ä~f 2 O? (5.1) *F æJç4M Y + a Y pLqXYGW w è Y “é1êW ”$F   , æçSM Y + a XY pXq9Y “ëé êW ” $F kMXV qgY . Ù$F   , V Ú i Û KBF` i åÒü±LÆP|O , a = 1 p Y . (äsf 2 FÕ d , éêW4FJ a = 0,
ë é1êW]OF 1 a = 0 [p V Y . )OF ÕsfSM 2 pÕÁ 3 pÕÁIPsWgP , ? (5.1) F æç`ì&Fí i Â]Ã ,IÔ gXqB[`kp *Á , %~î"f]ï$Fp V1 , Ú %Û ã Ka, X$` å+→üsXS−1/3aPO ,BsUÕdÕFOÏ]FIgÛ?4p±û À à$YÕºT]ÂIW .
dppq

ddpdqi

21332246222124

1RSAdpqRSA]^`_ba

3212311222a, b ∈ F,

charF 6= 2, 3.

(5.3)
ÝA
UF$ , IkM  pXq9Y$QWa< üñð ò$d , óJç$F 3
J?SMIH B `XÁUsPºW$LI`QJ1ô YLX~F¯k± p9q
Y . ÆLd YV =A X + aX +V bi F$õ } ? −(4a + 27b )M"ë1Õö FB , V~Z FB §Ø Ã b ÃÂSÃ  .
6 ÉËÊÍÌ6Î47Í9i]GISlci m $÷ d , 1985 8 V.Miller
 w N.Koblitzh¯AÂGRù T"`ÆøJõ Ã ú < tYÕ;¸  ×V kFO û . 9ükKSXM>F ¨ V MW (< P Rcw(T~Ò WL, Y Ó .
(1) a~ f Ç V q iU° cT , Xý ¡1ù F dX9Ï aþ i [| A P
W~M~ ,i BsUÕFOù E/F dÿ sqXY ). ê , (2)E `õÕöXP; , lUm&a÷ `YXÑ9f(,&XI ÈU½ó]AQð
ôLdO+ àXT9W9P~W .
233

2

XZY>[\#Y>[0.062340
0.063842
0.005441

0.000091
0.000095
0.002743

0.000023
0.000022
0.018790

0.003346
0.001165
0.011022[1] Neal Koblitz: “A Course in Number Theory andCryptography, 2nd edition(Graduate Texts inMathematics 114)”, Springer-Verlag New York
1994.
[2] Neal Koblitz: “Algebraic Aspects of Cryptography”, Springer-Verlag New York 1999.
[3] J. J. Quisquater and C. Couvreur:“Fast decipherment algorithm for RSA public key cryptosystem”, Electronic Letters, vol. 18, pp.905907, 1982.
,: “”,, 1997.
[4][5],: “”,, 2004.

∗qq   F~~ d ` mod p, modi q < Fk icg$  ºlm1÷`IØ&_ , dpqRSA F göÕk Y .  pLd ,7W#U>V3/24Y 2 = X 3 + aX + b,STFUFVc!de%f(g1hji7kl?m>n 3poq , dpqRSA r RSA sbt!uwvpxys , z{|p} o%o~x17> 1 }!% x l s*1ox .
l>
m?~(~3  m)
s x Karatsuba m`~ #n  x7O(nmF*%r  , GMP7s?¥ Zs*tu¤¦y§  x .%¡?7¨ ¢> £ps r ª, RSA©*«y¬/s ­ dpqRSAq   n®#¯  .
8 °²±´³ µ¶·%¸#¹ m s¾½%¿ |}À , º¡#¢?º%£yy¡»B*{ ¢B£wÁ%»#Â { | !¤B¼²
  © ,. GMP
?Ã1Ä(ÅÆ»m { m %¼ Ò     ©Ô,Ó(Ç*ÕwÈ Ö~ × ¢F£ m#É!Ê , ËwÌ?Í~ÎÏFÐ?Ñ
x.
Ø1ÙÛ¼ ÚÜ 32qÝFÞ!ßOà áÞ%â%ã %ä Ãw»#{ å%æ~çFèéó7ê7ô ë ì!í(1o(r %ä Ãw»{ mî!ï Ä%ð ñ*òRSARSA64