ãµã€ã¯ã«ã®ä»ã®èšäº
åã ã®å€æã®è©³çŽ°ãå«ã詳现ãªãã¬ãŒã³ããŒã·ã§ã³ã®åŸãïŒå€ãã®åºçç©ã®ããã«ãKhabrovskyãé€ãïŒä»£æ°ãã£ãŒã«ãã§ã¯ãªããïŒå ·äœçãªïŒæéã®èŠçŽ ã䜿çšããŠãRIJNDAELãAES-128ãããã³ïŒAES-128æšæºã®æäœãå®è¡ããïŒãå®è£ ãããŸãããæå·ã«å¯Ÿããæ»æã®å¯èœæ§ã®æ€èšã«é²ãããšãã§ããŸããä»ã®ãšãããç§ãã¡ã¯1ã€ã®æ»æã«éå®ããŸããç§ãã¡ã®æèŠã§ã¯ãæãç解ãããããééçã«æ§ç¯ãããïŒãã ãããããããã¹ãŠã®èªè ã«ã§ã¯ãªãïŒHabrã§ãã
ç§ã¯ãã§ã«äžå©ãªç¹ã«æ £ããŠããŸãããæªéãåè«ãèšã£ãŠããªãããšãèµ·ããããæ»æãšæåŸ ãããçµæã®åæã¯å€ãã®èè ã«ãã£ãŠè¡ãããŠããŸããããå ·äœçãªæåäŸãåã«å°è±¡çãªãã¶ã€ã³ã ãã§ã¯æããã«ååã§ã¯ãããŸãããããã§ã¯ãæ°åŠçãªèŠ³ç¹ãããäŸµå ¥è ã«ãã£ãŠæå·ããã¹ãã«å°å ¥ããããšã©ãŒã䜿çšããæ»æã«ã€ããŠæ€èšããŸãããã¢ã³ã¹ãã¬ãŒã·ã§ã³ã®ããã®æ»æãéžæãããšããèè ã¯ãããŸãã«ãããããŠããŠåä»ãªæ°åŠçãªãã®ã䜿çšãããŠãããã®ãå«ãŸãªãããã«ããŸããããåé¡ã®äž»é¡èªäœã¯éåžžã«æ·±å»ã§ããããæãã®èª¬æã«é²ãããšã¯ã§ããŸããã
ãã®åºçç©ã®éèŠãªç®æšã¯ãAES-128ã®åºç€ã圢æããæ°åŠã®å¿çšã瀺ãããšã§ãããæ®å¿µãªãããå€ãã®èè ã¯ãèªåãã¡ã®çºæããã§ãã¯ããŠææã§ãã人ã¯ã»ãšãã©ããªããšããäºå®ã«å°ãããŠãæ ¹æ ã®ãªãæ ¹æ ã®ãªããã®ãè¿åãŸãã¯èª€ã£ãŠè§£éããŠããŸãã
èšäºã®å 容ã¯å®å šã«æ»æã®å ã®æŠå¿µã§ã¯ãªããäž»ãªã¢ã¯ã·ã§ã³ã¯äœæ¥ããåãããŠããŸãããããã¯ç§ã®åŠçã«ãã£ãŠæ éã«äœæãããè£è¶³ãããå®éšçã«ãã¹ããããŸããã圌ãã¯é«ç代æ°ãšæå·åŠã®äž¡æ¹ã§è¯ãç¿æ £ãåŸãŸããã
1.AESæå·éµãžã®æ»æ
ãŸããAESãžã®æ»æãç°¡åãªã±ãŒã¹ã§èª¬æãã次ã«ãã®ãããªæ»æãã©ã®ããã«äžè¬åã§ããããæããã«ãªããŸããæ€èšäžã®æ»æã®ç®çã¯ãæå·ã®ããŒKïŒNrïŒãå埩ããããšã§ããéšåïŒã©ãŠã³ãïŒããŒKïŒNrïŒã決å®ããããšãããŒKã®ååŸã容æã«ãªããŸãã
1.1æ»æã®åå
ShiftRowsïŒNr-1ïŒæäœã®åŸã«ãç¶æ è¡åSã®å¥ã®ãã€ãïŒ16ã®1ã€ïŒã«ãšã©ãŒãεããå°å ¥ããããšã«ãã£ãŠå€æŽã§ãããšæ³å®ãããŸããã€ãŸããæåŸãã2çªç®ã®ã©ãŠã³ããããã³ç Žæãããã€ãïŒèŠçŽ ã®ïŒïŒã®ã€ã³ããã¯ã¹ïŒã»ã«ã®ïŒïŒã§ãã ïŒç¶æ ããã®æåŸã®ä»®èª¬ã¯çç¥ã§ããŸããæ»æã¡ã«ããºã ãããç°¡åã«èª¬æããããã«å°å ¥ãããŸãããç¶æ é ç®ã®æ°ããå€ã¯äžæã§ãããšèŠãªãããŸãã
ãšã©ãŒãεãã¯ãããã»ã¹ã®çµäºã¹ããŒã¿ã¹ã®4ãã€ã以äžã«ãŸã§åã³ãŸããåºåç¶æ ã®4ã€ã®å€æŽå¯èœãªèŠçŽ ãã¹ãŠã«ã€ããŠããšã©ãŒãεãã®å¯èœæ§ã®ãããã¯ãã«ã®å€ã®ã»ããïŒã»ããïŒãã»ã¯ã·ã§ã³1.4ã«ãããŸããããã«ããããã®4ã€ã®èŠçŽ ã®å¯èœãªå€ã®ã»ãããεãïŒå®çŸ©1ïŒã亀差ãããããšãå¯èœã«ãªããŸãããã®ãããªã»ããã亀差ãããšãããå°ããªã»ãããååŸããããããå®å šãªåæã«å¿ èŠãªæå·ããã¹ãã®æ°ãæžããŸãã
æåŸã«ããšã©ãŒããšã«ãåã®ã©ãŠã³ãããŒã®4ã€ã®èŠçŽ ã«ã€ããŠããã€ãã®æååãããå€ãåºåããŸããä»ã®æå·ããã¹ãã圢æãããšã4ãã€ãã®ã©ãŠã³ãããŒKïŒ10ïŒãèŠã€ãããŸãããã®æ»æã¯ããšã©ãŒã®å Žæã«é¢ããå€ãã®äžè¬çãªä»®å®ããã£ãŠãæåãããŸãŸã§ãã 9çªç®ã®MixColumnsïŒïŒå€æåã®ãšã©ãŒã®å Žæã«é¢ããæ å ±ã®æ¬ åŠãªã©ãæªã¿ãããå Žåãšãªãå Žåã®æå·ããã¹ããããªãã¯ã¹ã®éãã«ãããæªã¿ãšãã®äœçœ®ãæããã«ãªããŸãïŒãã®äŸã§ã¯ããããã¯äœçœ®0ã7ã10ã13ã§ãïŒã
ãŸããã©ãŠã³ã8ïŒ8çªç®ã®MixColumnsïŒïŒå€æã®åïŒã§å°å ¥ããããεããšã©ãŒãåæã«åœ¹ç«ã€å¯èœæ§ãããããšãæ³å®ãããŠããŸãããããåæã«ãããå®å šãªåæã«å¿ èŠãªæå·ããã¹ãã®æ°ãå¢å ããŸããæ€èšäžã®æ°å€äŸã§ã¯ããšã©ãŒäœçœ®ã®ä»®èª¬ãèæ ®ãããŠããªãæ¡ä»¶äžã§ã4ãã€ãã®ã©ãŠã³ãããŒKïŒ10ïŒãååŸããããã«çŽ10åã®æå·ããã¹ããå¿ èŠã§ãã
1.2ãšã©ãŒãã¡ãã»ãŒãžã«äžãã圱é¿ã®æ°å€äŸ
ããã§ã¯ãååä»ãäœåã®ä»é²ã«èšèŒãããŠããã®ãšåãäŸã䜿çšãããŠããŸããæå·åããã»ã¹ã®æåŸãã2çªç®ãšæåŸã®ã©ãŠã³ããèæ ®ãããŸãïŒããŒã¿ã®ãã€ãè¡šçŸã®åœ¢åŒã¯æ¬¡ã®ãšããã§ãïŒã
å ¥å= '32 43 F6 A8 88 5A 30 8D 31 31 98 A2 E0 37 07 34 ';
æå·ããŒ= '2B 7E 15 16 28 AE D2 A6 AB F7 15 88 09 CF 4F 3C';
åºå= '39 25 84 1D 02 DC 09 FB DC 11 85 97 19 6A 0B 32 ';
ãšã©ãŒ "ε" = '1E 00 00 00 00 00 00 00 00 00 00 00 00 0000'ã
次ã®å³ã¯ããããã16ãã€ãã®æå·ãããã¯é·ãšæå·ããŒé·ïŒã€ãŸããNb = 4ãšNk = 4ïŒã«åŸã£ãŠç¶æ é åã«å«ãŸããå€ã瀺ããŠããŸãã
ãšã©ãŒã®äŒæã¯ã倪åããã³16é²è¡šèšã§ç€ºãããŠããŸãã以äžã¯ãããŸããŸãªç¶æ³ã§ã®å·ã®æ£æ¹åœ¢ã§ãã
ãšã©ãŒãεã= 1Eã¯ã第9ã©ãŠã³ãã¹ããŒã¿ã¹ã®0çªç®ã®ãã€ãã«æ¿å ¥ãããæçµç¶æ ã®4ãã€ããå€æŽãããŸããç¶æ ã®ãæ£æ¹åœ¢ãã®äž»å¯Ÿè§ç·ã®ã³ãŒããŒã»ã«ã®èšç®äŸïŒ
-ãšã©ãŒãεã=
1E87â1E=10000111â00011110= 1001 1001 = 99
ã¯ã第9ã©ãŠã³ãã®ç¶æ æ£æ¹åœ¢ã®å·ŠäžïŒã³ãŒããŒïŒã»ã«ã«å ¥åãããŸã-å³äžMixColum9ãããŒãã€ãKïŒ9ïŒãšåèšãããåŸã®ç¬¬9ã©ãŠã³ãã®è§åºŠç¶æ ïŒ
BCâ6E= 1011 110010 0110 1110 = 1101 0010 = d2ã
-çµæã®ãšã©ãŒã®å€ãèšç®ããŸãã
ãšã©ãŒã®æç¡ã«ãããããã2ã€ã®ã¡ãã»ãŒãžããã¹ããååšããå Žåãç Žæããã¹ããŒã¿ã¹ãã€ãã®å€ãšäœçœ®ã¯ãäžæ¹ã®ããã¹ããããäžæ¹ã®ããã¹ãããå·®ãåŒãããšã«ãã£ãŠæ±ºå®ãããŸããç§ãã¡ã®å Žåããã®ãããªæžç®ã¯ã2ãæ³ãšããŠããã¹ããåèšããããšã«ãã£ãŠçœ®ãæããããšãã§ããŸãããœãŒã¹ããã¹ãã«å°å ¥ããããšã©ãŒã«ãã£ãŠå€æŽããããã€ãã«å¯ŸããŠã®ã¿ããŒã以å€ã®çµæãåŸãããŸãã
ããšãã°ã16é²åœ¢åŒã§ã¯ããšã©ãŒå€ãèŠã€ãããŸãã
è¡š7-ãšã©ãŒå€ã®èšç®
çµæãšããŠãå·®åãšã©ãŒ..ãæåŸã®ãšã©ãŒãã€ããèšç®ããäŸãæããŸãããïŒ
62âFB=01100010â11111011= 1001 1001 = 99ã
ãšã©ãŒã«ãã£ãŠå€æŽãããã¹ããŒã¿ã¹ãã€ãã®äœçœ®
å ¥åãããšã©ãŒãæçµçãªæçµç¶æ ã«ã©ã®ããã«åœ±é¿ããã
ãšã©ãŒãçºçãããšãã«ååŸããæ å ±ã®åæ
ããŒKïŒNrïŒã«é¢ããæ å ±ãå«ããããšãã§ããå¯äžã®æäœã¯ãæåŸã®SubBytesïŒïŒå€æã§ãããããã£ãŠã4ã€ã®æ¹çšåŒããããx0ãx1ãx2ãx3ãεã¯æªç¥ã®å€æ°ã§ãã
次ã®4ã€ã®æ¹çšåŒã®è§£ãæ±ããŸãã
ãã€ã
ãã®ãããªæ¹çšåŒã¯ãã¹ãŠãåäžã®æ¹çšåŒ
sïŒx +cεïŒ+ sïŒxïŒ=ε 'ãïŒ1ïŒ
ã«äžè¬åã§ããŸããããã§ãå®æ°å€=' 01 'ã' 02 'ããŸãã¯' 03 'ã§ããããã®æ¹çšåŒãããã«è§£ããŠãåæããŸãã
å®çŸ©1ãèšå·BïŒCε 'ïŒã§ç€ºãããåŒã§å®çŸ©ïŒããεãšã©ãŒã®åŒïŒ1ïŒã®è§£ã®éå
BïŒCε'ïŒ= SïŒCεãïŒ= {εÑGF [2 8 ]ïŒâXÑGF [2 8 ] sïŒx +cεïŒ+ sïŒxïŒ=ε '}ã| BïŒcε'ïŒ| = 127ã
ããã¯ãç¹å®ã®ãšã©ãŒÎµ 'ã«å¯Ÿå¿ããåã ã®ãšã©ãŒé åã§ããä»ã®Îµ 'ã®å Žåããšã©ãŒé åã¯ç°ãªããŸãã
å®çŸ©2ããã£ãŒã«ãGFïŒ2ïŒã§ã®ç·åœ¢å€æâãèããŠã¿ãŸãããã
âïŒGF [2 8 ]âGF [2 8 ]ã
XâX 2 + Xã
âã®ç»åã¯ãImïŒâïŒGFïŒ2ïŒ-ãã¯ãã«ç©ºéã®ãããã³ã°ã§ããGF [2 8 ]ã®èŠçŽ ã®ã»ãã
ïŒx 2 + xïŒã¯ãà 1= ImïŒâïŒãšãã®æ¬¡å dimGFïŒ2ïŒïŒE1ïŒ= 7ãè¡šããŸããΞÑ1ã®å Žåã2ã€ã®ç°ãªã解x1ãx2ÑGF[ 2 8 ]åŒX 2 + X =Ξãããã³ãœãªã¥ãŒã·ã§ã³ãæºããé¢ä¿X2 = X1 + 1åã³X 2âX1 =ΞïŒMODDÏXãïŒ2 8 -1ïŒïŒVIETAã®å®çã«ããã å€æ°Îžã¯äºæ¬¡æ¹çšåŒã®èªç±é ã§ãã èããããç·åœ¢å€æãäŸãæããŠèª¬æããŸããããäŸGFãã£ãŒã«ãã¯[2èšå®ãããŠãã8
]ãå€æxâx 2 + xã¯ãã®èŠçŽ ã«å¯ŸããŠå®è¡ãããŸãã
è¡š8 -ãã£ãŒã«ãGF [2ã®æåã®æç8 ]ããã³èŠçŽ ã®å€æã®çµæã
è¡š8ã¯ãå€æã«ãã£ãŠã10é²æ°ã®ãªã¹ãå ã®é£æ¥ãããã¢ãåããã£ãŒã«ãèŠçŽ ã«ã©ã®ããã«å€æŽããããã瀺ããŠããŸãããã®ããšãããå€æã®çµæïŒã€ã¡ãŒãžïŒã¯ãã¬ã€ã¡ãŒãžã®2åã®1ã«ãªããŸãïŒãã£ãŒã«ãã¯ãããã°2åã«å§çž®ãããŸãïŒãã»ããã®æ¬¡å ã®çž®å°ã®ãã®ååã¯ãææ¡ãããæ»æã®åºç€ã圢æããŸãã
ææ¡2ã次ã®ã¹ããŒãã¡ã³ãã¯ãλ1ãλ2ÑGF[2 8 ]-{0}ã«åœãŠã¯ãŸããŸãã
2.äžè¬åãšå®è£
ãŸããç¹å¥ãªãœãããŠã§ã¢ã¢ããªã±ãŒã·ã§ã³ã®å©ããåããŠããšã©ãŒã®ãã20åã®æå·ããã¹ããçæãããŸãããããè¡ãã«ã¯ããœãŒã¹ããã¹ããããŒããšã©ãŒãã¢ãã«ïŒããã°ã©ã ïŒã«å ¥åãããšã©ãŒãé 眮ãããäœçœ®çªå·ãèšå®ããŸãã ãéå§ããã¿ã³ãæŒããšãããã°ã©ã ã¯ã¢ã«ãŽãªãºã ãå®è£ ãããšã©ãŒã®ããããã¹ãããšã©ãŒã®ãªãããã¹ããããã³ãããã®éãã«ã€ããŠãæåŸã®2ã©ãŠã³ãã®æå·åã®çµæãå±é圢åŒã§è¡šç€ºããŸãããã®åŸãæå·ããã¹ãã¯ãšã©ãŒãªãã§ãšã©ãŒä»ãã§ä¿åãããŸãããšã©ãŒå€ã¯åšæçã«å€åãããéå§ããã¿ã³ãæŒããšããšã©ãŒã®ãã次ã®æå·ããã¹ããååŸãããŸããåã®1ã€ã®å€ã§ããšã©ãŒã®ãã5ã€ã®æå·ããã¹ãã圢æãããŸããã
æ»æãå®è£ ããã«ã¯ãããã°ã©ã ã䜿çšããŠãšã©ãŒã®ãªãæå·ããã¹ããšãšã©ãŒã®ããæå·ããã¹ãã§ãã¡ã€ã«ãéãå¿ èŠããããŸãïŒãã¡ã€ã«å ã®ããŒã¿ã¯16é²åœ¢åŒã§è¡šç€ºãããŸãïŒãæå·ããã¹ããšãããã®éãã¯ããã€ãã®æ£æ¹åœ¢é åïŒç¶æ ïŒãšããŠè¡šç€ºãããŸãã ãããŒã®æ€çŽ¢ããã¿ã³ãæŒããšãããŒã®å¯èœãªãã€ããæ€çŽ¢ããæé ãéå§ãããŸããããã»ã¹ã®çŸåšã®ç¶æ ãããã¹ãããã¯ã¹ã«è¡šç€ºãããŸãããã®åŸãå¥ã®ãšã©ãŒã®ããæå·ããã¹ããéãããæé ãç¹°ãè¿ãããŸããã©ãŠã³ã10ããŒãã€ããåä¿¡ãããšã察å¿ããã¹ã¯ãšã¢ãã€ãé åã«ã衚瀺ãããŸããåã®æ®µéã§çæããã20åã®æå·ããã¹ããã¹ãŠããšã©ãŒã§å®è¡ãããšãã©ãŠã³ã10ããŒã®ãã¹ãŠã®ãã€ãã®å€ãååŸããå¯èœæ§ãé«ããªããŸãïŒããã§ãªãå Žåã¯ããšã©ãŒã®ããæå·ããã¹ããå¿ èŠã§ãïŒããã®åŸãäžããããã¢ã«ãŽãªãºã ãæåŸã®ãµãããŒã䜿çšããŠæå·åããŒãå埩ãããã«åŸã£ãŠæå·åããŒã埩å ããŸãããã
å³11-ãšã©ãŒã®ããæå·ããã¹ããäœæããããã®ãœãããŠã§ã¢è£œåãšã©ãŒã®ããæå·ããã¹ãã
åæããæé ãé«éåããããã«ã[ããŒã®æ€çŽ¢]ãã¿ã³ã®åã«ãã§ãã¯ããŒã¯ãä»ããããšãã§ããŸãã
å³12 -æ»æã®ãœãããŠã§ã¢å®è£
ãœãããŠã§ã¢è£œåã®ã¢ã³äŸïŒ
ãœãŒã¹ã³ãŒã3243f6a8885a308d313198a2e0370734
ããŒ2b7e151628aed2a6abf7158809cf4f3cã®
ãšã©ãŒ1 1e000000000000000000000000000000
ãšã©ãŒ1ãšæå·æ
ã®å¯èœæ§ãã€ãde25841d02bdc09
å³13-ããã°ã©ã ã®æäœäŸ
ã©ãŠã³ã10ããŒd014f9a8c9ee2589e13f0cc8b6630ca6ããŒã¯å®å šã«å埩ãããŸããå埩
ãããããŒ2b7e151628aed2a6abf7158809cf4f3cäºæ³ã©ãããæå·åã»ãã·ã§ã³ã§æå®ãããããŒãšäžèŽããŸãã
2.1ããšã©ãŒäœçœ®æ å ±ããªãå Žåã®ç¶æ³
ãã®æç¹ã§ãMixColumnsæäœã®æåŸã®2åã®å®è¡ã®éã®ã¹ããŒã¿ã¹ãã€ãã«ãšã©ãŒãå«ãŸããŠãããšæ³å®ãããŸããããã¯ããšã©ãŒã1ã16ã®ãã€ãã§å²ãããšãã§ãããšããäºå®ãé€ããŠãåãã±ãŒã¹ã§ãããšã©ãŒã¯MixColumnsæäœã«ãã£ãŠä¹ç®ããã4ãã€ãã®ã¹ããŒã¿ã¹ã«åºãããŸãã
å·®åç¶æ ãããªãã¯ã¹ã®æåã®è¡ã«åŒ·å¶ãšã©ãŒãçæãããŸããããã§ã¯ã匷å¶ãšã©ãŒåã調ã¹ãããšã«ãããå ¥åããããšã©ãŒãã©ã®åã«å±ããŠããããå€å¥ã§ããŸããããã¯ãåã®èª¬æã§èª¬æããæ¹æ³ã䜿çšããŠãå ¥åããããšã©ãŒã®4ã€ã®å¯èœãªè¡äœçœ®ã調ã¹ãããšã«ãã£ãŠè¡ãããŸãã
2.2ãããŒããŠã§ã¢ããã€ã¹
AESããŒããŠã§ã¢ããã€ã¹ã«ç©ççã«å¹²æžããèœåããããšä»®å®ããŸãããããŸããAESããã€ã¹ã䜿çšããŠ10ãè¶ ããã©ã³ãã ãã¬ãŒã³ããã¹ãã®æå·ãèšç®ããŸãããã次ã«ãã©ã€ã³ãåãåããå®äºã®2ã©ãŠã³ãåã«é 眮ãããã©ãŠã³ãäžã«2ãã€ãã®éã§äžæçã«ã°ã©ãŠã³ãïŒãŸãã¯VccïŒã«æ¥ç¶ããããšã«ããããµã³ãã«ãããžã§ã¯ããå€æŽããŸããçµå±ã®ãšãããã©ãŠã³ãNk -2ã«ãã€ãããããåžžã«ã00ãïŒãŸãã¯ãFFãïŒã«çœ®ãæããããŸãã
åäœäžã®ããã€ã¹ã§åãã¡ãã»ãŒãžãããäžåºŠèšç®ããŸããã©ã³ãã ãªãã¬ãŒã³ããã¹ãã®å Žåãæ¬ é¥ã®ãããã€ãã¯ã©ã³ãã ãšã©ãŒã®ãããªãã®ã§ãããã®åäžã®ãšã©ãŒã¯ãNk -1ã©ãŠã³ãã§4ã€ã®ãšã©ãŒãNkã©ãŠã³ãã§16ã®ãšã©ãŒã«å€æãããŸãããã®å Žåãåå·®ãããªãã¯ã¹ïŒåŸ®åïŒãååŸã§ããŸããããã䜿çšãããšããšã©ãŒãåæããŠãæåŸã®ã©ãŠã³ãããŒãèŠã€ããããšãã§ããŸãã
æç®ïŒ
[1] FIPS PUB 197ïŒAdvanced Encryption Standardãcsrc.nist.gov
/ publications / fips / fips197 / fips-197.pdf [2] BonehãDeMilloãããã³Liptonãæå·åãããã³ã«ã®é害ãã§ãã¯ã®éèŠæ§ã«ã€ããŠãã³ã³ãã¥ãŒã¿ãµã€ãšã³ã¹ã®è¬çŸ©ããŒããæå·åŠã®é²æ©ãEU-ROCRYPT'97ã®è°äºé²ãppã 37-51ã1997ã
[3] E. BihamïŒAãShamirãSecret Key Cryptosystemsã®å·®åé害åæãCS 0910ãProceedings ofCrypto'97ã
[4]ãã¹J.ã¢ã³ããŒãœã³ãããŒã«ã¹G.ã¯ãŒã³ïŒæ¹ããé²æ¢-泚æäºé ãé»ååååŒæç¶ãã«é¢ãã第2åUSENIXã¯ãŒã¯ã·ã§ãããã«ãªãã©ã«ãã¢å·ãªãŒã¯ã©ã³ãã1996幎11æ18ã21æ¥ã1ã11ããŒãžãISBN 1ã880446- 83-9ã