ãŸãã¯ãç§ãæããããšããããŠãã¢ã»ã³ãã©ãŒã«æãããæ¹æ³
ããå€ãç§ã¯æ¯åœã®å€§åŠã§ãã€ã¯ãã³ã³ãããŒã©ãŒã®ããã°ã©ããŒãšããŠä»äºã«å°±ããŸããã ç§ãã¡ã®ããŒããšã³ãžãã¢ïŒhelloãAlexeyïŒïŒãšã®ã³ãã¥ãã±ãŒã·ã§ã³ã®éçšã§ãããããåæããããããžã§ã¯ããçãŸãã顧客ãæãæšãŠãããã«ãŒãšã¬ã¯ãããã¯ã¹ã®ããã°ã©ããŒã®äžåœäººã¯ããŒã³ã®åºçŸã¯æéã®åé¡ã§ãããé«å質ã§ããç²ç ã§ããªãããšãããããŸããã ãã®ãã¹ãŠã§ãããªãã¯åŠæ³ã«é¥ãããšãã§ããŸããããŠãŒã¶ãŒã¯ççºç©ã§è¥ã®éçã§åããããªãã§ãããã
ä¿è·ã®é©åãªå°ºåºŠã¯ããœãããŠã§ã¢ã®æŽæ°ã§ãã äžåœèªã®ã¯ããŒã³ã¯ãæ°ãããã¡ãŒã ãŠã§ã¢ã®ãã³ã«èªåçã«æ¶æ» ããå¿ å®ãªãŠãŒã¶ãŒã¯ç§ãã¡ã®æãäžè©±ãæ°æ©èœãåãåããŸãã ãã¡ããããã®ç¶æ³ã®ããã³ã»ãããã¯ããã·ã¢èª-äžåœèªã³ãã¥ããã£ãåã°ããããã«ãè«çã¢ãã©ã€ã¶ãŒãHEXãšãã£ã¿ãŒãå ¥æãããã¡ãŒã ãŠã§ã¢ããã»ã¹ãéžæãå§ããŸãã
ãã®ãããªä¿è·æ段ãå¿ èŠãšãããããžã§ã¯ãã¯ãããŸããã§ããããããã¯æããã§ããããããè¡ãå¿ èŠãããããã€ã䟿å©ã«ãªãã§ãããã Googled-èŠã€ãããŸãããçºæ-å®äºããŸããã ãã®èšäºã§ã¯ãå®å šæå·åã1ãããã€ãã«åããæ¹æ³ãšãã¢ã»ã³ãã©ãŒãåªããŠããçç±ã説æããŸãã å€ãã®ããã¹ããã³ãŒããå€ãéã®ãã¡ã³ã«ãšã£ãŠã¯ã¡ãã£ãšããé©ãã
ãã©ãããã©ãŒã ãšèšèª
ATmegaã§ã®ãã¹ãŠã®ãããžã§ã¯ãã¯ãCISã§è³Œå ¥ããæ¹ãç°¡åã§å®äŸ¡ã ããã§ãã é·èãã¡ãšã®äŒè©±ããç解ããããã«ãããã¯éåžžã«ãã°ã®å€ã家æã§ãããã¹ã ãŒãºã«æ©èœãããããã«å€ãã®å¥åŠãªè¡åãå®è¡ããå¿ èŠããããŸãã ã¿ã¹ã¯ã¯é床ã«éåžžã«ææã§ãããããã¢ã»ã³ãã©ãŒã§äœæããŸããã ã³ã³ãã€ã©ã«äŸåããããšã¯äžå¯èœã§ãããã³ãŒãã®å€ãã®ã»ã¯ã·ã§ã³ã¯ã¯ããã¯ãµã€ã¯ã«ã§èšç®ãããŸããã ããã«ãäžå¯èœãªããšã¯ã¢ã»ã³ãã©ãŒã§ã®ã¿å¯èœã§ãã
ççŽã«èšã£ãŠãæåã¯ã¢ã»ã³ãã©ãŒãåŠã¶ã®ãæãã£ãã®ã§ããããããäžå¯éçãªè³æå·ãšããã°ã©ã çé害ãåŒãèµ·ãããšèããŠããŸããã ãããŠãããã¯äººã ãC-ã¢ã»ã³ãã©ãŒãçºæãããšããã ãã§ã¯ãªããéåžžã«è€éãªãã®ã§ãªããã°ãªããŸããã çµå±ã®ãšãããã¢ã»ã³ãã©ãŒã¯äžçã§æãåçŽãªèšèªã§ãã ã¢ã»ã³ãã©ãŒã»ã©ç°¡åãªãã®ã¯ãããŸããã ç§ã¯1æ¥ã§LEDãç¹æ» ãããå²ã蟌ã¿ãå ¥åããã¹ã¿ãã¯ã䜿çšããããšãåŠã³ãåäœããããã«ãªããŸããã æ°ãæåŸããã®èšäºã§èª¬æãããããžã§ã¯ããäœæããã®ã«ååãªçµéšã«ãªããŸããã
ã¢ã»ã³ãã©ãŒã«ã¯è€éãªæœè±¡åã¯ãªãããã®æããªåçŽããæäŸããŸãã ç¹ã«ãAVRããŒãžã§ã³ã«ã¯ãµã€ã¯ã«ãããããŸããã ãµã€ã¯ã«ãæŽçããã«ã¯ãã¬ãžã¹ã¿ãŒãååŸããå埩åæ°ãå ¥ããŠãããã£ã®çµããã§ã¬ãžã¹ã¿ãŒã1ã€æžããããŸã 0ã«ãªã£ãŠããªãå Žåã¯ãããã£ã®å é ã«ãžã£ã³ãããŸãïŒåŸè€å åŒã®äžéšã«ãã£ãŠïŒã ããªãã¯ãã®ãããªå¥åŠãªãã¶ã€ã³ã«ããã«æ £ããæããããšããããŸãã
ããŒãããŒããŒãšã¯
ããŒãããŒããŒã¯ããã€ã¯ãã³ã³ãããŒã©ãŒã埩掻ããçŽåŸã«èµ·åããããã°ã©ã ã§ãã ããŒãããŒããŒãè¡ãããšã¯ããã°ã©ããŒã決å®ããŸãã ååãšããŠãããŒãããŒããŒã¯ããœãããŠã§ã¢ã®æŽæ°ãOSã®ããŒãããŸãã¯æ¬¡ã®ããã°ã©ã ãæ©èœããããã®ç°å¢ã®ã»ããã¢ãããªã©ãã·ã¹ãã ã®äžéšã®æ©èœãæ åœããŸãã ããŒãããŒããŒã¯ããã€ã¯ãã³ã³ãããŒã©ãŒã®ãã¡ãŒã ãŠã§ã¢ãæŽæ°ãããšãã1ã€ã®æ©èœãå®è¡ããŸãã
AVRã¢ãŒããã¯ãã£ã§ã¯ãããŒãããŒããŒã¯2ã€ã®æ¹æ³ã§åŒã³åºãããšãã§ããŸã-ãªã»ãããã¯ãã«ãèšå®ããããBOOTRSTãã¥ãŒãºãã€ã³ã¹ããŒã«ããããšã«ããã0ã¢ãã¬ã¹ããã§ã¯ãªãããµã€ãºããã¥ãŒãºã«èšå®ãããŠããããŒãããŒããŒã®éå§ã¢ãã¬ã¹ãããã€ã¯ãã³ã³ãããŒã©ãŒã匷å¶çã«åäœãããŸãã
ãã®æ®µéã§ã©ã®ãããªåé¡ãçºçããå¯èœæ§ããããŸããïŒ Fusionã¯ç·šéã§ããŸãã ããšãã°ãé«åºŠã«ã€ã³ããªãžã§ã³ããªããŠãŒã¶ãŒãã¯BOOTRSTãåããã°ã©ã ã§ããäœæ¥ã¯ããŒãã§ã¯ãªããªã»ãããã¯ãã«ã§éå§ãããŸãã ããŒãããŒããŒã®ãµã€ãºãå€æŽããããšãã§ãããã€ã¯ãã³ã³ãããŒã©ãŒã¯ããŒãã®éäžããäœããã®ç°ç«¯ã®å®è¡ãéå§ããã·ã¹ãã ãå±éºã«ãããå¯èœæ§ããããŸãã
ãã®ããããªã»ãããã¯ãã«èªäœãããŒãããŒããŒã«ãªãã€ã¬ã¯ãããããŒãé åã®ããŸããŸãªãµã€ãºã«å¯Ÿå¿ããå Žæã§ãæ¬äœã«ç¡æ¡ä»¶ã®éå§ç¹ãžã®é·ç§»ãé 眮ããå¿ èŠããããŸãã åé¡ãããŸããã
ããŒãããŒããŒã¯ãç¹å®ã®åºåã®ã¬ãã«ã®æç¡ã«ãã£ãŠããŠãŒã¶ãŒããã°ã©ã ãå®è¡ãããããã¡ãŒã ãŠã§ã¢ã¢ãŒãã«åãæ¿ãããã決å®ããŸãã
æå·å
ä»äºãå§ããåã«ãCoursenraã®Dan Bonnetã«ããæå·åã³ãŒã¹ã®ããŒã1ãå®äºããŸããã ãã³ææã¯çµ¶ãããæå·ã·ã¹ãã ãèªåã§æžãã¹ãã§ã¯ãããŸãããããã¯ãäŒæäžã®1幎çã§ã¯ãªããå°é家ãè¡ãã¹ãã ãšèšããŸããã ãã¡ããã æ£åœãªçç±ããããã®ããŒãããŒããŒã¯ããã¹ãŠã®æ»æã«å¯ŸããŠç¡é²åãªãã®ãšããŠäœçœ®ä»ããããŠãããšã¯èšããŸããã ãã®ååšã¯åºæ¬çãªãã®ã§ã¯ãªããç¥ç財ç£ãä¿è·ããè¿œå ã®æ段ã§ãã èŠããã«ã人ã¯æŽæ°ãã¡ã€ã«ãããæ·±ãæãäžãããªã·ãã¹ã³ãŒãã«ã¶ã€ããã1é±éèŠãã¿ãããŸããããã§å°çã«ãããç§ã¯äžåœäººã«2000ãã«ãæãã圌ãã¯ãããåãæšãŠãã ããããšèãããããããã¹ãã§ãã ãœãããŠã§ã¢ãããã³ã°ã®ã³ã¹ãã¯ãç©ççãªãããã³ã°ã®ã³ã¹ããè¶ ããå¿ èŠã¯ãããŸããã
ãã€ã¯ãã³ã³ãããŒã©ãŒã¯ãªãŒãã³ã·ã¹ãã ã§ããããã¹ãŠã®ãšã³ãžãã¢ã¯ãã®æäœæ¹æ³ãç¥ã£ãŠããŸãã ãã€ã¯ãã³ã³ãããŒã©ãŒã¯ããªãŒããŒã¯ããã¯äžã«ã³ãã³ããã¹ãããã§ããç¹å®ã®äœãé»å§ã§ã®ä¿è·ããå¿ãããå¯èœæ§ããããèªã¿åããäžå¯èœãªå Žåã«RAMãããã©ãã·ã¥ã«ã³ãŒããæžã蟌ãã§å®è¡ããæ©èœãªã©ãéåžžã«ã°ãããç©Žãã§ããå¯èœæ§ããããŸãïŒäŸ-ST92FïŒã ãã¡ãŒã ãŠã§ã¢ã®æ°ãã€ãã ããå€æŽã§ããå Žåã¯ãå®å šã«ããŒãžãããŸãã ãã¡ãŒã ãŠã§ã¢ã«ã¯ãååãšããŠãäºæ³ãããæ§é ã®é åããããŸããããšãã°ãæªäœ¿çšã®å²ã蟌ã¿ãã¯ãã«ã¯ãå ¥åããããšã§ãã€ãã®ãã¢ãç°¡åã«å€æŽã§ããŸãã ããã¯ãCBC / CTRã¢ãŒãã§ã®åçŽãªãããã¯æå·ãäžå¯æ¬ ã§ããããšãæå³ããŸãã
äœããã®æ¹æ³ã§ãã¡ãŒã ãŠã§ã¢ãå€æŽããå¯èœæ§ãèš±å¯ã§ããªãå Žåã¯ãã¡ãã»ãŒãžèªèšŒã³ãŒãã䜿çšããå¿ èŠããããŸãã ãã®ãããªã³ãŒãã®äŸã¯ãCCMãGCMãEAXã§ãã æ£çŽãªãšããããªãEAXãéžãã ã®ãèŠããŠããŸããã æãå¯èœæ§ãé«ãã®ã¯ãã¢ã»ã³ãã©ãŒã§ã®å°æ¥ã®å®è£ ããç§ã«ãšã£ãŠæãåçŽãªããã«æãããšããããšã§ãã
åãã¡ãŒã ãŠã§ã¢ã«ã¯ãã©ã³ãã ã«çæãããç¬èªã®ããŒããããåå¥ã®ãã¡ã€ã«ãšããŠæ¥ç¶ãããŸãã æŽæ°ã¯åããã¡ã€ã«ã§æå·åãããŸãã é²åŸ¡çã¯ã䟵害ãããããŒã®æ°ãããã¡ãŒã ãŠã§ã¢ãåã«ãªãªãŒã¹ããªãããšã§ãã ãã¹ãŠã®ãŠãŒã¶ãŒãçŽæ¥ç¥ãå¿ èŠããããŸãããã»ãã¥ãªãã£ã«ã¯ç ç²ãå¿ èŠã§ãã ãŸããããŒã®çæäžã«ããã€ã¯ãã³ã³ãããŒã©ãŒãç¬èªã«ãããè¡ãå¿ èŠããªãããã«ãããã€ãã®å®æ°ãèšç®ãããŸãã
Eax
ãšã³ãžãã¢ãæå·åãèšè¿°ããã®ã«å¿ èŠãªããã¥ã¡ã³ãã¯ã©ããããã§ããïŒ ç§åŠäœåããæ®ã£ã2æã®åçã
ãã«ããŒã¢ã«ãŽãªãºã
ãã¡ãŒã ãŠã§ã¢ã®æå·åã®æ®µéã§ããããã¯ãµã€ãºã«å¯ŸããããŒã¿ããªã¥ãŒã ã®å€é床ãä¿èšŒããŸããããã«ããããããæ©èœãM ^ BïŒ31ïŒã«åæžãããå€æ°PïŒ32ïŒã¯äœ¿çšãããªããªããŸãã
éµçæ段éã§ãå®æ°LïŒ40ïŒãèšç®ãããã®çµæãBãèšç®ã§ããŸãã
ãé€å€ãŸãã¯ç¢å°ä»ããïŒ31ïŒã¯ãBãè¡Mã®çµããã§xor-onlyã«ãªãããšãæå³ããŸãã
æå·åããã»ã¹
Mã¯æå·åãããŠããªãããã¹ããCTã¯æå·æãKã¯ããŒãNã¯åæåãã¯ãã«ãHã¯ããããŒã§ãã
ã¢ã»ã³ãã©ãŒã§ã¯ã埩å·åé¢æ°ãèšè¿°ããã ãã§æžã¿ãŸãã
ã¡ãã»ãŒãžããããŒHãèšå®ããå€æŽãããç§ãã¡ã ããç¥ã£ãŠãããã®ãšããŸãã ã¿ã€ãã«ã¯å ¬éæ å ±ã§ãããšç解ãããŠãããããããã¯æå·åŒ·åºŠã«åœ±é¿ããŸããã ããã§ãããŒçæ段éã§H 'ïŒ23ïŒãèšç®ã§ããŸãã
50ããã³10ãšãšãã«è¡22ã24ãèŠããšãOMACã䜿çšããäžä»ãæåã®æ°åã¯ããããã¯ã®é·ãã«çããé·ãã§è¡ã®æåŸã®æåã«ç§»åããCBCã®æåã®ãããã¯ãšããŠäœ¿çšããããã€ãŸãæå·åãããŠããããšãããããŸãã ãããã®è¡ã®æå·åã¯ãããŒçæ段éã§å®è¡ã§ããŸãã ããã«ãæ°å€0ïŒL0ïŒããã³2ïŒL2ïŒã®æå·åãããè¡ã®ã¿ããããããN 'ããã³C'ãèšç®ããããã«ããŒãã¡ã€ã«ã«å«ãŸããŸãã
L0ãBãããã³Nãæå ã«ããå ŽåãNã®èšç®ã¯Eã«ãªããŸãïŒL0 ^ B ^ NïŒã
ãããã£ãŠãéµçæ段éã§ãBãL0ãL2ãH 'ãèšç®ãããŸãã
åãããŠ64ãã€ããå æããŸãã
AES-128
AESã¯ããã®ã·ã³ãã«ãã«ãããŠç¬åµçãªã¢ã«ãŽãªãºã ã§ãã ããã«ãããã©ãŒãã³ã¹ãå¿ èŠãã¹ããŒã¹ãå¿ èŠãã«ãã£ãŠãæè»æ§ãéåžžã«é«ããªããŸãã ç§ãã¡ã®å Žåãå æã¹ããŒã¹ãšã·ã³ãã«ããéåžžã«éèŠã§ãã AESã«ã€ããŠå€ãã®è¯ãèšäºãæžãããŠããŸããããã®ããã€ã¹ã®è©³çŽ°ã«ã€ããŠã¯è§ŠããŸããã
AESã®æ©èœã¯ãæå·åèªäœããã解èªãã¢ã«ãŽãªãºã çã«è€éã§ããããšã§ãã 埩å·åããã»ã¹ã§ã¯ãæçµãã£ãŒã«ãã§14ãæããå¿ èŠããããŸãã ãã®ææã«ã¯æç·ä¹ç®ããŒãã«ããªããããAESãéæšæºã§äœ¿çšããŸãã匷åãªã³ã³ãã¥ãŒã¿ãŒã§æŽæ°ãæå·åããã«ã¯ã埩å·åããã匱ããã€ã¯ãã³ã³ãããŒã©ãŒã§æå·åã解é€ããã«ã¯ãæå·åãããŸãã æå·åŒ·åºŠã«éãã¯ãããŸããã
ããŒãæ¡åŒµããããã®å¹æçïŒãã€å®å šãªïŒæ¹æ³ãæãã€ããŸããã§ããã 11åã®ã€ã³ã¹ã¿ã³ã¹ã¯ãã¹ãŠãããŒçæ段éã§æºåãããŸãã ãã®ãããååãšããŠãããŒã®ãããã¯å šäœãå®å šã«ã©ã³ãã ã«ããããšãã§ããŸããããã«ãããå€æ ããŒããŒãããã決å®ããå Žåããã«ãŒããã©ãŒã¹ã«å¯Ÿããä¿è·ããããã«åŒ·åãããŸãã
æ¡åŒµããŒã¯176ãã€ããå æããŸãã èšç®ãããå®æ°ãšåãããŠã240ãã€ãã®ãã©ãã·ã¥ãæ°žä¹ ã«äœ¿çšããããŒãã¡ã€ã«ã圢æããŸãã æ®ã784åãã€ãŸã392åã®ã¢ã»ã³ãã©ãŒåœä»€ããããŸãã
AESã®éèŠã§å€§ããªéšåã¯ãã«ãã¯ã¢ããããŒãã«ã§ããããã¯ãããã¹ãã®ãã€ãã眮ãæãããã€ãã§ãã 1ãã€ãã«ã¯256ã®å¯èœãªçµã¿åããããããããŒãã«ã¯åãéã®ãã©ãã·ã¥ã¡ã¢ãªãå æããŸãã èš±ãããªãïŒ ãããã£ãŠãèšç®ããŸãã
ã«ãã¯ã¢ããããŒãã«ã¯æ¬¡ã®ããã«èšç®ãããŸããæåã«ãããŒãã«èŠçŽ ã®æ°ã®å察ã®æ°ãèŠã€ãã次ã«ãããå察ã®å Žåã次ã®ã¢ãã£ã³å€æãå®è¡ããŸãã
x0 ... x7ã¯ããã¯ãã«åœ¢åŒã®éæ°ã§ãã ãããã¢ã»ã³ãã©ãŒã§èšè¿°ãã256ãã€ãæªæºã«åããŠå©çãåŸãå¿ èŠããããŸãã 88ãã€ãã«åãŸããŸãã å§ããŸãããã
ããã«ã¡ã¯äžçïŒ
ã¢ã»ã³ãã©ãŒããã°ã©ããŒã¯ãèªåã®äººçãåçŽåããããšã§åžžã«ããã°ã©ã ãéå§ããŸãã ããšãã°ãr16ã®ä»£ããã«temp_0ãæžã蟌ãããšãã§ããããã«ãã¬ãžã¹ã¿ã®ååãå€æŽããŸãã äŒçµ±çã«ã0ãš1ã®ã¬ãžã¹ã¿ãOP0ãšOP1ã2ãš3-NULLãšOxFFïŒå¯Ÿå¿ããå€ã§åããïŒãæ®ãã-å¿ èŠã«å¿ããŠåŒã³åºããŸãã
ç»é²
.def OP0 = r0 .def OP1 = r1 .def NULL = r2 .def OxFF = r3 .def b0 = r4 .def b1 = r5 .def b2 = r6 .def b3 = r7 .def b4 = r8 .def b5 = r9 .def b6 = r10 .def b7 = r11 .def b8 = r12 .def b9 = r13 .def bA = r14 .def bB = r15 .def bC = r16 .def bD = r17 .def bE = r18 .def bF = r19 .def temp_0 = r20 .def temp_1 = r21 .def temp_2 = r22 .def temp_3 = r23 .def temp_4 = r24 .def temp_5 = r25
ãã®äŸã§ã¯ã4çªç®ãã19çªç®ãŸã§ã®ã»ãšãã©ãã¹ãŠã®ã¬ãžã¹ã¿ã䜿çšããŠã埩å·åãããããŒã¿ãããã¯ãä¿åããå¿ èŠããããŸããã ãããã䜿ã£ãŠäœæ¥ããæ¹ãã¯ããã«ç°¡åã§é«éãªã®ã§ãç§ã¯ãããã¬ãžã¹ã¿ã«å ¥ããŸããã ãã€ã¯ãã³ã³ãããŒã©ã®RAMã䜿çšããã¢ã¯ãã£ããã£ã¯ãã¬ãžã¹ã¿ã䜿çšããããšã«ã€ãªãããŸãã
ã¬ãžã¹ã¿20ã25ã¯ãèšç®ãããããŒã¿ã®äžæçãªä¿åã«äœ¿çšãããããã«å¿ããŠååãä»ããããŸãã
26ã32ã«ã¯ãã¡ã¢ãªã®ã¢ãã¬ã¹æå®ã«äœ¿çšãããXãYãZãšããç¹å¥ãª16ãããã¬ãžã¹ã¿ããããŸãã ããã«ãZã®ã¿ããã©ãã·ã¥ã®ã¢ãã¬ã¹æå®ã«äœ¿çšã§ããŸãã ç§ãèããããã«ã圌ãã¯ç©ççã«ã€ã³ã¯ãªã¡ã³ãããã¯ãªã¡ã³ãããªãã»ããèšç®ã®ããã®æè¡çãªããã€ã¹ãæã£ãŠããã®ã§ãä»ã®ç®çã®ããã«ãããã䜿çšããããšã¯å¯èœã§ãããæªãç¿æ £ãšèŠãªãããéèŠãªã¢ããªã±ãŒã·ã§ã³ã§èš±å®¹ã§ããªãã°ãªããã«ã€ãªããå¯èœæ§ããããŸãã
ã¬ãžã¹ã¿ã®ååãå€æŽããããšã«å ããŠããã©ãã·ã¥ã¡ã¢ãªããŒãžã®ãã€ãæ°ãããŒãããŒããŒå šäœã®ãµã€ãºãæå·ãããã¯ã®ãµã€ãºãã¡ã¢ãªããŒãžã®æ°ãããŒãžããšã®ããŒã¿ãããã¯ã®æ°ãããŒãã¡ã€ã«ãé 眮ããã¢ãã¬ã¹ãªã©ãããã€ãã®æçšãªå®æ°ãèšç®ããŸãïŒ
å®æ°
.equ PAGE_BYTES = PAGESIZE*2 .equ BOOT_SIZE = 1024 .equ BLOCK_SIZE = 16 .equ PAGES = (FLASHEND+1)/PAGESIZE - BOOT_SIZE/PAGE_BYTES .equ BLOCKS_PER_PAGE = PAGE_BYTES / BLOCK_SIZE .equ KEY_ADDR = (FLASHEND + 1) â (BLOCK_SIZE*(11+4))/2
å°æ¥ã®æè»æ§ã®å¥è·¡ãè¿œå ããŸããã-UARTéä¿¡é床ãããŒããåºåãããã³ããŒãããŒããŒã«ãšã©ãŸããããŒããç¶è¡ãããã決å®ããã¬ãã«ãéžæããŸãããã ãã®ãããªå®çšçãªèšå®ã«å ããŠããã¡ãŒã ãŠã§ã¢ãäžèŠãªå Žåã«ãžã£ã³ããè¡ãããã©ãã«ã®ã¢ãã¬ã¹ãæå®ã§ããŸãããŸããããŒãããŒããŒãã¡ã¢ãªã®ãŒãããŒãžãå€æŽãããã©ããã決å®ã§ããŸãã
èšå®
;Reset address (Where to jump to if not asked to load boot) .equ RESET_VECT = 0 ;Is 0th flash page used? .equ USE_0th_PAGE = 1 ;////////////////////////PORT SETUP #define check_port \ port_settings \ /* use port letter... */\ /* A / B / C / D / E */\ C, \ /* check status of pin number...*/\ 5, \ /* load boot only if port is... */\ /* (S)ET (1) / (C)LEAR (0) */\ S ;////////////////////////BAUD RATE SETUP .equ Fosc = 16000000 ;clock frequency .equ baud = 19200 ;baud rate .equ UBRR = Fosc / ( BLOCK_SIZE * baud ) - 1 .if high( UBRR ) != 0 .error "Unsupported baud rate setting - high byte of UBRR is not 0!" .endif
次ã«ãRAMãæ±ããŸãããã AESã§ã¯ã眮æããŒãã«ããšã«256ãã€ããå¿ èŠã§ãã ããŒã¿ãããã¯ã¯ãåæåãã¯ãã«ïŒ16ãã€ãïŒãçŽæ¥ããŒã¿ïŒããŒãžãµã€ãºïŒãæŽåæ§ããã§ãã¯ããããã®ã©ãã«ïŒ16ãã€ãïŒã§æ§æãããŸãã ããŒã¿ã埩å·åããã«ã¯ãåæåãã¯ãã«ïŒå¥ã®ããŒãžãµã€ãºïŒã«åºã¥ããŠåŸ©å·åã·ãŒã±ã³ã¹ãçæããå¿ èŠããããŸãã
èšæ¶ã®å Žæãææã¡ãã
.dseg .org 0x60 SBOX: .byte 256 ;rijndael substitution box ;these three SHOULD be consecutive SAVED_IV: .byte BLOCK_SIZE ;E(L0^N^B) RCVD_PAGE: .byte PAGE_BYTES ;page to be written TAG: .byte BLOCK_SIZE ;initially - precomputed header value ENC_IV: .byte PAGE_BYTES ;IV's to xor with page to decrypt .cseg
ããŒãžãµã€ãºã64ãã€ãã®ATmega16ã§ã¯ã䜿çšãããRAMã®éã¯1024ã®ãã¡544ãã€ãã§ããATmega8ã§ã¯416ã§ããå€ãããŸãã å°éã®RAMãåãããã©ãã·ã¥ã¡ã¢ãªã®å€§ããªããŒãžãåãããã€ã¯ãã³ã³ãããŒã©ãŒããããŸãã ããããããªãã¯äœããæãã€ãããšãã§ããŸããã家æå šå¡ãšã®äºææ§ãå¿ èŠãšãã人ã¯ã»ãšãã©ããŸããã
ããªããã»ããµãã£ã¬ã¯ãã£ãã«ç²Ÿéããã®ã§ãã¢ã»ã³ãã©ã«ç§»ããŸãããã ããã°ã©ã ã¯äŒçµ±çã«ãã¹ã¿ãã¯ãã€ã³ã¿ãŒãåæåããå²ã蟌ã¿ããªãã«ããNULLããã³OxFFã¬ãžã¹ã¿ãèšå®ããUARTèšå®ãèšå®ããããšããå§ãŸããŸãã
åæå
BOOT_START: ldi temp_0, low( RAMEND) out SPL, temp_0 ldi temp_0, high(RAMEND) out SPH, temp_0 cli clr NULL mov OxFF, NULL com OxFF ldi temp_0, low( UBRR ) out UBRRH, NULL out UBRRL, temp_0 ldi temp_0, ( 1 << RXEN ) | ( 1 << TXEN ) out UCSRB, temp_0 ldi temp_0, ( 1 << URSEL ) | ( 1 << UCSZ1 ) | ( 1 << UCSZ0 ) out UCSRC, temp_0
ããããã¹ãŠã«å¯ŸããŠãç¥èªãŸãã¯ç¥èªã§ãã6ã€ã®ç°ãªãã¢ã»ã³ãã©ãŒã³ãã³ããæ¢ã«ãããŸããã ldi-ããŒããmov-移åãout-I \ Oã¬ãžã¹ã¿ãžã®åºåãcom-è£æ°ãcli-å²ã蟌ã¿ãã©ã°ã®ã¯ãªã¢ã ç§ãèšã£ãããã«ãã¢ã»ã³ãã©ãŒã¯ç°¡åããäžå¯èœã§ãã ããããçš®é¡ã®ãããŸããªUBRRHïŒUARTããŒã¬ãŒãã¬ãžã¹ã¿ãã€ãã€ãïŒãåãããå°é£ãªãéšåã¯ãããŒã¿ã·ãŒãã«è©³çŽ°ã«èšè¿°ãããŠãããæ©åšã®èšå®ã§ãã
ããŒãã®ãŸãŸã«ãããã©ããã決å®ããŸãã ãŠãŒã¶ãŒèšå®ã«å¿ããããŒãã¬ãžã¹ã¿ã®éžæã¯ãã¢ã»ã³ããªæ®µéã§å®è¡ãããŸãã
ãšã¬ã¬ã³ããªãã¯ãããããè¡ããŸãã
.macro port_settings /*PORT LETTER, PIN NUMBER, LOGIC LEVEL*/ cbi DDR@0 , @1 sbi PORT@0, @1 nop sbi@2 PINB, @1 .endmacro
ã·ãªã¢ã«ããŒãã®èªã¿åã/æžã蟌ã¿ã®æé ã¯ããããã«ç¬åµçã§ãã ã¹ããŒã¹ãã»ãšãã©ãªããé床ãé ããããäœæ¥ã®æºåã®ç¢ºèªãšããŒã¿ã®åä¿¡ãçµã¿åãããæé ãç°ãªãæ©èœãæã€ããã€ãã«åå²ããããšã«ããŸããã ã¢ã»ã³ãã©ãŒã§ã¯ãç°ãªãã©ãã«ã§ãµãã«ãŒãã³ãåŒã³åºãããšã§ãããè¡ãã®ã¯éåžžã«ç°¡åã§ãã
8ããŒã ã®æºåãšåé
;UART <- 0xC0 ;temp_0 <- UART confirm_and_read: ldi temp_0, 0xC0 ;UART <- temp_0 ;temp_0 <- UART UART_send: sbis UCSRA, UDRE ;skip next command if readiness bit is set rjmp UART_send out UDR, temp_0 ;temp_0 <- UART UART_read: sbis UCSRA, RXC rjmp UART_read in temp_0, UDR ret
éãéšåãå®æããäžçã¯å°æ¥ã®ä»äºã®ããã«æ§ç¯ãããŸãã å§ããŸãããã
88ãã€ãã®ã«ãã¯ã¢ããããŒãã«
æåã«ãæåŸã®ãã£ãŒã«ãã§æå®ãããæ°å€ã®éæ°ãèŠã€ããå¿ èŠããããŸãã ãã®æ°ã«ãããæãããšã1ã«ãªããŸããæãç®ã¢ã«ãŽãªãºã ã«ã€ããŠã¯ã wikiã®èšäºã§èª¬æããŠããŸããã説æããŸããã
æçµãã£ãŒã«ãã§å察ãèŠã€ããã®ã¯é£ããäœæ¥ã§ãã ããã§ã¯ãé«åºŠãªãŠãŒã¯ãªããã¢ã«ãŽãªãºã ãé©çšããå¿ èŠããããŸã...ããããç§ãã¡ã¯ãšã³ãžãã¢ã§ãã ç»é¢ããã³ã³ãã¥ãŒã¿ãŒãµã€ãšã³ã¹ã®åæ¥çãé£ãå»ããŸãã ä¹ç®ã䜿çšãã培åºçãªæ€çŽ¢ã«ãããéèŠçŽ ãæ¢ããŠããŸãã
éèŠçŽ æ€çŽ¢
ldi XH, high(SBOX) ;point X to SBOX memory location ldi XL, low( SBOX) ser bF ;first inc will overflow to 0 next_box: inc bF mov temp_1, bF ;save input in temp_1 cp temp_1, NULL ;if it's null - return breq sbox_byte_done ;return here mov OP0, OxFF ;so it overflows look_more: inc OP0 ;try next candidate ;temp_0 <- OP0 * temp_1 (in a Galois field) ;branching is fine, function used in precomputation only finite_multiplication: mov b0, OP0 ;operand 0 (candidate) mov b1, temp_1 ;operand 1 (current byte) ldi temp_2, 0x1B ;0x1B holder clr temp_0 ;multiplication result next_bit: lsr b0 ;operand 0 >> 1 brcc PC+2 ;if lsb of operand 0 was 1 eor temp_0, b1 ;xor operand 1 into result lsl b1 ;operand 1 << 1 brcc PC+2 ;if msb of operand 1 was 1 eor b1, temp_2 ;xor 0x1B into operand 1 cp b0, NULL ;while there are bits in operand0 brne next_bit ;work on it cpi temp_0, 1 ;if multiplication result was not 1 brne look_more ;inverse is in OP0
ãã®åŸãã¢ãã£ã³å€æãå®è¡ããçµæãã¡ã¢ãªã«ä¿åããŸãã åçŽãªãã¥ãŒãããçµã¿ç«ãŠãããŸãã ã¢ã»ã³ãã©ãŒããã°ã©ãã³ã°ã¯ãåªããè³ã®éåã§ãã åžžã«ãããšã¬ã¬ã³ããªè§£æ±ºçãèŠã€ããããã«2ã3ã®ããŒã ãæãã2ã3ã®æ段ãçµãåºãããšãã§ããŸããããã«ããã®ãããã®ç¯çŽã¯çãšæ»ã®åé¡ã«ãªãããšããããŸãã ããã¯ãã³ãŒãã£ã³ã°ããã»ã¹ãã³ã³ã¹ãã©ã¯ã¿ã¢ã»ã³ããªã«å€æãããããã°ã©ãã³ã°ã®ãã©ã¬ã«ããžãã¯ã®äžçã§ãã
ã¢ã»ã³ãã©ãŒã®ã¢ãã£ã³å€æ
clr temp_1 ;affine transform result ldi temp_5, 0b11110001 ;matrix producer ldi temp_3, 0b00000001 ;current bit mask process_bit: mov temp_4, OP0 ;multiplicative inverse and temp_4, temp_5 ;and with matrix producer pop_next_bit: lsl temp_4 ;inv&matrix << 1 brcc PC+2 ;if it had msb eor temp_1, temp_3 ;sum bit into result cp temp_4, NULL ;while operand has bits brne pop_next_bit ;work on it lsl temp_3 ;move to next bit lsl temp_5 ;cyclically shift matrix producer brcc PC+2 ;if it had msb ori temp_5, 1 ;move msb to lsb cp temp_3, NULL ;while there are bits left brne process_bit ;process next bit sbox_byte_done: ldi temp_2, 0b01100011 ;0x63 eor temp_1, temp_2 ;xor it into result st X+, temp_1 ;save to memory cpse bF, OxFF ;if we're at last byte rjmp next_box ;we're done
ããã·ã§ã³ã¯å®äºããŸããã
ã©ã®ãããéãåäœããŸããïŒ ã·ãã¥ã¬ãŒã¿ãŒã§-2203268枬å®ã 8 MHzã®åšæ³¢æ°ã§0.27ç§ã ããã¯çŽ æŽãããã¹ããŒãã ãšæããŸãã
éå§æã«256ãã€ãã®RAMãš0.27ç§ã倱ãã168ãã€ãã®ãã©ãã·ã¥ã¡ã¢ãªãç¯çŽãããã°ãããããºã«ã解ããŸããã
ãªãããŸãããŒãã«ã®æºåãã§ããããŒã®æ¡åŒµã¯ã³ã³ãã¥ãŒã¿ãŒã§è¡ãããŸã-AESãå®è£ ããããã«å¿ èŠãªãã®ã¯ãã¹ãŠãããŸãã
æå·åæšæºã®çµã¿ç«ãŠ
åºæ¬çãªæäœããå§ããŸãããã 埩å·åã®å段éã§ãããŒã¯ããŒã¿ãšåèšãããŸãã ããŒã¿ã¯ã¬ãžã¹ã¿ãã¡ã€ã«ã«ããã4çªç®ãã16åãããã¬ãžã¹ã¿Zã¯åžžã«çŸåšã®ããŒã瀺ããŸããã€ã³ã¿ã¬ãžã¹ã¿ã¯ãSRAMãŸãã¯ãã©ãã·ã¥é åã ãã§ãªããã¬ãžã¹ã¿ãã¡ã€ã«ãæãããšãã§ãããããå€§å¹ ã«ç°¡çŽ åãããŸãã寿åœãšã·ã¹ãã ã®é«éåã
ã©ãŠã³ãããŒãè¿œå
add_round_key: clr YH ;point to register file ldi YL, 4 xor_Z_to_Y: lpm temp_0, Z+ ;load key byte ld temp_1, Y ;load data byte eor temp_1, temp_0 ;xor them st Y+, temp_1 ;store back to data cpi YL, low( 4 + 16 ) ;check if it was the last byte brne xor_Z_to_Y ;if not - process next data byte ret
å¥ã®ç°¡åãªæäœã¯ãè¡ã®æ··åã§ãã ããŒã¿ã®åè¡ã¯ãç¬èªã®ã·ãªã¢ã«çªå·ã«ãã£ãŠå·Šã«åŸªç°çã«ã·ãããããŸãã ã©ã®ãã€ãã§å€æŽããããèããæåŸã«ãè¿œå ã®å€æ°ã䜿çšããã«2ã€ã®å€æ°ã®å Žæã亀æãããããã®äŸ¿å©ãªã¹ãã«ãé©çšããå¿ èŠããããŸãã ããã«ãœãªã¥ãŒã·ã§ã³-ãããã®ãã¹ãŠã®æäœãçµã¿åãããŠããµãŒãããŒãã£ã®ãã£ãã«ã«ããæ»æããããã«ä¿è·ããããšãã§ããŸãã
è¡ãã·ãã
;cyclical shift: 0_row << 0; 1_row << 1; 2_row << 2; 3_row << 3 shift_rows: ;1st row eor b1, bD eor bD, b1 eor b1, bD eor b1, b5 eor b5, b1 eor b1, b5 eor b5, b9 eor b9, b5 eor b5, b9 ;2nd row eor b2, bA eor bA, b2 eor b2, bA eor b6, bE eor bE, b6 eor b6, bE ;3rd row eor b3, bF eor bF, b3 eor b3, bF eor b7, bF eor bF, b7 eor b7, bF eor bB, bF eor bF, bB eor bB, bF ;done ret
ãã¹ãŠã®ããŒã¿ãããŒãã«ããã®å¯Ÿå¿ãã眮æã§çœ®ãæããããšã¯ãäžèŠäºçŽ°ãªäœæ¥ã§ãã é¡ã®åçŽãªã¢ãããŒãã«ã¯èŽåœçãªæ¬ é¥ããããŸãïŒããã¯ããŸãã«ãç·åœ¢ã§ãã ç·åœ¢æ§ãäžå€æ§ãããã³ç解å¯èœæ§ã¯ããµãŒãããŒãã£ã®ãã£ãã«ã«ããæ»æã®æœåšçãªè匱æ§ã§ãã 倧ãŸãã«èšãã°ãä¿è·ã¬ãã«ãé«ããããã«ãçµæãäžå€ã«ããããšãªããå®è£ ããšã«å€æŽãããã®ã¯äœããããŸããã ç§ãã¡ã¯ç°ãªã£ãè¡åãããŸãã äžåºŠã«1åãåŠçããŸãã åé¿ã®é åºãå€æŽããŸã-æ»æè ã¯ããã«1é±éèŠãã¿ãŸãã
眮æã®åŸã«ã¯åžžã«è¡ãªãã»ãããç¶ãããããããã®æé ãåé¢ããŸããã
ãµããã€ã
substitute_shift_rows: ldi XH, high(SBOX) ldi XL, low( SBOX) movw OP0, X ;one column at a time clr YH ldi YL, 4 sub_next: movw X, OP0 ldd temp_0, Y+0x08 add XL, temp_0 adc XH, NULL ld temp_0, X std Y+0x08, temp_0 movw X, OP0 ldd temp_0, Y+0x0C add XL, temp_0 adc XH, NULL ld temp_0, X std Y+0x0C, temp_0 movw X, OP0 ldd temp_0, Y+0x04 add XL, temp_0 adc XH, NULL ld temp_0, X std Y+0x04, temp_0 movw X, OP0 ldd temp_0, Y+0x00 add XL, temp_0 adc XH, NULL ld temp_0, X st Y+, temp_0 sbrs YL, 3 ;XL == 8 rjmp sub_next
ããŒã¿ã«ã¯å°çã«è¿ã¥ããŠããŸãã ããã«å ¥ãåã«ã2ã§ä¹ç®ãçºæããå¿ èŠããããŸãããšã³ãžãã¢ãªã³ã°ã®èŠ³ç¹ãããæçµãã£ãŒã«ãã§2ãä¹ç®ããããšã¯ãå·Šã«ã·ããããåŸãä¹ç®åšã®æäžäœãããã1ã§ããå Žåãçµæã«0x1Bãè¿œå ããå¿ èŠããããšããç¹ã§åçŽãšç°ãªããŸãã ãããã1ã§ããã°ã...æå·ã·ã¹ãã ã®éèŠãªé åã§é·ç§»ãšæ¡ä»¶ã䜿çšã§ããŸããã åé¡ãããŸããïŒ å·Šã«ã·ããããåã«ãäžäœããããä¿åãããããã1ã®å Žåã¯0x1BãåéãããŒãã®å Žåã¯0ãåéãããŸã§ã空ã®ã¬ãžã¹ã¿ã®ç®çã®å Žæã«æžã蟌ã¿ãŸãã
ãµãã©ã€ãº ç§ã®å®è£ ã§ã¯ã2ãä¹ç®ããæé ã¯ããŒãããŒããŒã®ãµã€ãºã®1ã€ã«ãããŸãã ãã®ãµã€ãºã®äœäžã®æç¹ã§ãç¡æ¡ä»¶ãžã£ã³ããããŒãã®å é ã«é 眮ãã2ã®ä¹ç®ã劚ããªãããã«ããžã£ã³ãããŸãã
ãµããã€ã
;temp_0 <- temp_0 * 2 (in a finite field) ;temp_0 = (temp_0 << 1) ^ (0x1B & MSB(temp_0)) ;NO BRANCHING HERE ;uses NULL in a dirty way mul_by_2: bst temp_0, 7 ;store 7th bit in T bld NULL, 0 ;we form 0x1B in NULL if T is set rjmp cont_mul rjmp BOOT_START ;0x1F80. BOOTSZ can be here cont_mul: bld NULL, 4 lsl temp_0 bld NULL, 3 bld NULL, 1 eor temp_0, NULL clr NULL ret
æåŸã®æé -ã«ã©ã ã®æ··åã ååã®èŠçŽ ã¯ã次ã®å€æãåããŸãã
äžã§æžãã2ã®ä¹ç®ã æçµãã£ãŒã«ãã®è¿œå ã¯æä»çãŸãã¯ã§ãã 3ãä¹ç®ããã«ã¯ã2ãä¹ç®ããçµæã«æ°å€ãå ç®ããå¿ èŠããããŸããç¹°ãè¿ããŸãããã¢ã»ã³ãã©ãŒã§çªç¶èšè¿°ããã®ãå°é£ã§ãããã³ãŒãã®éãå¶éãããå€ããã«ãŠã³ãããå¿ èŠããããŸãã æé©åã¯å¿ãšã³ã¡ã³ãã®äžã§è¡ãããªããã°ãªããŸããã èšç®ã®éçšãæ éã«æ€èšããã¬ãžã¹ã¿ãè³¢ã䜿çšããå¿ èŠããããŸãã
ããã¯ã¹ã«ã©ã
mix_columns: ;point to register file clr YH ldi YL, 4 next_column: ldd temp_2, Y+0x00 ;result0 ldd temp_3, Y+0x01 ;r1 ldd temp_4, Y+0x02 ;r2 ldd temp_5, Y+0x03 ;r3 mov temp_0, temp_3 ;r1 to operand rcall mul_by_2 ;r1 * 2 mov temp_1, temp_0 ;save r1 * 2 eor temp_0, temp_2 ;r0 + r1 * 2 eor temp_0, temp_5 ;r0 + r1 * 2 + r3 (lacks r2 * 3) std Y+0x01, temp_0 ;to r1 mov temp_0, temp_2 ;r0 to operand rcall mul_by_2 ;r0 * 2 mov OP0, temp_0 ;OP0 <- r0 * 2 eor temp_0, temp_1 ;r0 * 2 + r1 * 2 eor temp_0, temp_3 ;r0 * 2 + r1 * 3 eor temp_0, temp_4 ;r0 * 2 + r1 * 3 + r2 eor temp_0, temp_5 ;r0 * 2 + r1 * 3 + r2 + r3 (done) std Y+0x00, temp_0 ;to r0 mov temp_1, OP0 ;OP0 -> r0 * 2 mov temp_0, temp_5 ;r3 to operand rcall mul_by_2 ;r3 * 2 mov OP0, temp_0 ;OP0 <- r3 * 2 eor temp_0, temp_1 ;r3 * 2 + r0 * 2 eor temp_0, temp_2 ;r0 * 3 + r3 * 2 eor temp_0, temp_3 ;r0 * 3 + r1 + r3 * 2 eor temp_0, temp_4 ;r0 * 3 + r1 + r2 + r3 * 2 (done) std Y+0x03, temp_0 ;to r3 mov temp_1, OP0 ;OP0 -> r3 * 2 mov temp_0, temp_4 ;r2 to operand rcall mul_by_2 ;r2 * 2 mov OP0, temp_0 ;OP0 <- r2 * 2 eor temp_0, temp_1 ;r2 * 2 + r3 * 2 eor temp_0, temp_5 ;r2 * 2 + r3 * 3 eor temp_0, temp_2 ;r0 + r2 * 2 + r3 * 3 eor temp_0, temp_3 ;r0 + r1 + r2 * 2 + r3 * 3 (done) std Y+0x02, temp_0 ;to r2 mov temp_1, OP0 ;OP0 -> r2 * 2 ldd temp_0, Y+0x01 ;r0 + r1 * 2 + r3 eor temp_0, temp_1 ;r0 + r1 * 2 + r2 * 2 + r3 eor temp_0, temp_4 ;r0 + r1 * 2 + r2 * 3 + r3 (done) std Y+0x01, temp_0 ;to r1 adiw Y, 4 ;pointer to next column cpi YL, 20 ;if not done brne next_column ;process next ret
ãã ããããã®ç®è¡ã èšç®ã®éçšã§ãäºæ³ããã4åã§ã¯ãªã6åã®ã¡ã¢ãªã¢ã¯ã»ã¹ãçºçããŸãããæ倧éã®ç©ºéæé©åãéæãããããã§ãã
ãã®ãããAESã«å¿ èŠãªãã¹ãŠã®æå·åæé ãèšè¿°ãããŠããŸãã ãããããŸãšããŸãããã äœæ¥ãéå§ããåã«ã¹ã¿ãã¯ãžã®ãã€ã³ã¿ãŒãä¿åããåŸã§åŸ©å ããããšããå§ãããŸãã ã»ãšãã©ã®å Žåããããã¯å¥ã®å Žæã§äœ¿çšãããã¡ã€ã³ããã°ã©ã ã¯ãããã·ãŒãžã£ã®1ã€ã§ã¡ã¢ãªãžã®ãã€ã³ã¿ãå€æŽãããããªã»ããã¢ãããæåŸ ããŠããŸããã åãããšãã¹ããŒã¿ã¹ã¬ãžã¹ã¿ã«ãåœãŠã¯ãŸããŸãã ã¹ããŒã¹ã«å¶éããªãå Žå-å¿ ãæé ã®æåã«ã¹ããŒã¿ã¹ã¬ãžã¹ã¿ãä¿åããæ»ãåã«åŸ©å ããŠãã ããïŒ
æå·åèªäœ
;performs a round of encryption ;using given expanded keys and s-box Rijndael_encrypt: push ZH push ZL push YH push YL push XH push XL ldi ZH, high(KEYS*2) ldi ZL, low( KEYS*2) rcall add_round_key ldi temp_0, 9 encryption_cycle: push temp_0 ;store cycle counter rcall substitute_shift_rows rcall mix_columns rcall add_round_key rjmp continue_enc rjmp BOOT_START ;0x1F00. BOOTSZ can be here continue_enc: pop temp_0 ;restore cycle counter dec temp_0 brne encryption_cycle rcall substitute_shift_rows rcall add_round_key pop XL pop XH pop YL pop YH pop ZL pop ZH ret
åºäŒã£ããã€ãæ°ãã«ãŠã³ãããŸãããã ããŒã®è¿œå ã¯18ãã€ãã§ãã 2ã22ãã€ãã®ä¹ç®ã è¡ã·ããã¯50ãã€ãã§ãã 眮æã¯62ãã€ãã§ãã åã®ã·ã£ããã«ã¯94ãã€ãã§ãã ãã¹ãŠãªã³ã¯-56ãã€ãã åèš-302ãã€ãã ããªãããããããããšãç解ããããšã¯è²Žéã§ãã Windowså®è¡å¯èœããããŒã®å¹³åãµã€ãºãããããã«å€§ããã
ãããã¯æå·-åªããŠããŸãããç¹å¥ãªæå·åã¢ãŒãããªããã°ãå®çšçã§ã¯ãããŸããã ãããã¯æå·ã«äœã®é¢ä¿ããªãå Žåãããã圹ã«ç«ããªããããããŒã¿ã®åä¿¡ãåŠçããŸãã
æ å ±äº€æãããã³ã«
EAXã®æå·åãããããŒã¿ã®ãããã¯ã¯ãä»ã®ã»ãšãã©ãã¹ãŠã®èªèšŒãããæå·åã¹ããŒã ãšåæ§ã«ãåæåãã¯ãã«ãããŒã¿èªäœãããã³çœ²åã§æ§æãããŠããŸãã åæåãã¯ãã«ãšçœ²åã¯ãåºç€ãšãªãæå·ã®ãããã¯ã®é·ããæã¡ãããŒã¿èªäœã¯ä»»æã®é·ãã§ãããã®å ŽåãFlashããŒãžã®ãµã€ãºã§ãã ã¡ã¢ãªå²ãåœãŠã®æ®µéãèŠããŠãããŠãã ãã-ã³ã³ãã¥ãŒã¿ããããŒã¿ãåä¿¡ããããã»ã¹ã容æã«ããããã«ãããŒã¿ãããã¯ã®èŠçŽ ã¯é 次SRAMã«é 眮ãããŸãã
èšèšãç°¡çŽ åããããã«ãæ¶ç©ºã®ããŒã¿åœ¢åŒã«ã€ããŠã¯èããŸããããã©ãã·ã¥ã®ããªã¥ãŒã å šäœãåãããã¡ãŒã ãŠã§ã¢ãåãå ¥ããŸãã ãã¡ãŒã ãŠã§ã¢ã«çŽæ¥é¢ä¿ããªããã¹ãŠã®ã¡ã¢ãªé åã¯ãã©ã³ãã ãã€ãã§åããå¿ èŠããããŸãã ãããã£ãŠãæåéãããã€ãã®ã³ãã³ããä¿®æ£ããå°ããªãããããªãªãŒã¹ããããšã¯äžå¯èœã§ã-ããŒãããŒããŒã¯ãã¹ãŠãå€æŽããŸãã æéããããå ŽåããããŸãããå®å šæ§ãæãéèŠã§ãã
ããŒã¿äº€æãããã³ã«ã¯æ¬¡ã®ãšããã§ããã¹ããŒãã£ã³ã°ããŒãã«ã®çæçŽåŸãããŒãããŒããŒã¯ããŒãã«ãã€ã0xC0ïŒCOnfirmïŒãçºè¡ãããã€ã0x60ïŒGOïŒãåŸ ã¡ãŸãã ã³ã³ãã¥ãŒã¿ãŒããã®æºåå®äºä¿¡å·ã®åŸãããŒãã¯ãZãã€ã³ã¿ãŒãèšé²æžã¿ã¡ã¢ãªãŒé åã®å é ã«èšå®ããåä¿¡ã埩å·åãããã³æžã蟌ã¿ãå¿ èŠãªããŒãžæ°ãtemp_0ã«æžã蟌ã¿ãããŒãžã®åä¿¡ã«é²ã¿ãŸãã 次ã®ããã«ãªããŸãã
ã¯ããã«
wait_for_start: rcall confirm_and_read cpi temp_0, 0x60 brne wait_for_start ;/////////////////////////////PAGE ADDR INIT .if USE_0th_PAGE == 0 ldi ZH, high(PAGE_BYTES) ldi ZL, low( PAGE_BYTES) ldi temp_0, PAGES - 1 .else clr ZH clr ZL ldi temp_0, PAGES .endif next_page: ;save page counter and address push temp_0 push ZH push ZL ;/////////////////////////////BLOCK RECEPTION ;receive whole block ldi XH, high(SAVED_IV) ldi XL, low( SAVED_IV) ldi temp_1,( BLOCK_SIZE /*nonce*/ + PAGE_BYTES /*page*/ + BLOCK_SIZE /*expected tag*/ ) get_more_block: rcall confirm_and_read st X+, temp_0 dec temp_1 brne get_more_block
confirm_and_readé¢æ°ã®ãªã¹ãããèŠããŠããããã«ãæåã«0xC0ãéä¿¡ããŠãããå¿çãåŸ ã¡ãŸãã ããã«ãããæãåçŽãªåœ¢åŒã§ã³ã³ãã¥ãŒã¿ãŒãšã®åæãä¿èšŒãããŸãããœãããŠã§ã¢ã¯ãåä¿¡åŽãå®å šã«æºåãã§ãããšãã«ã®ã¿æ¬¡ã®ãã€ããéä¿¡ããå¿ èŠããããŸãã ãã¡ãããããã¯é ãã§ã-ããŒã¿ãéåä¿¡ããã®ã«ã解èªãããããæéãããããŸãã
çµã¿ç«ãŠãããEAX
ã2ã€ã®ææžåã®å³ãã«ç€ºãããŠãããšããã«EAXãæ£ç¢ºã«å®è£ ãããšãç¯å²ã«åãŸããŸããã ãããã£ãŠãã€ãã³ãã®ã³ãŒã¹ãä¿®æ£ããŸãã
眲å-CMAC \ OMACã¢ã«ãŽãªãºã ã䜿çšããŠèšç®ããããæå·åãããåæåãã¯ãã«ïŒNãNonceããïŒãããŒã¿ããããŒïŒãã®åŠçã¯ããŒçæ段éã§å®è¡ãããŸãïŒãããã³ããŒã¿èªäœã®èªèšŒã³ãŒãã®åèšã ãã®å Žã§èšç®ããã眲åã¯ãç§ãã¡ã«éããããã®ãšäžèŽããå¿ èŠããããŸãã æä»çãŸãã¯2ã€ã®åäžã®æ°å€ã¯0ã§ãããããã£ãŠãèšç®ããããã¹ãŠã®å€ãåä¿¡ãã眲åã«çŽæ¥åèšãããã®ãã¹ãŠã®å€ã0ã«ãªã£ããã©ããã確èªããŸãã
H '-ããŒãã¡ã€ã«ã«ããæå®ããã³åŠçæžã¿ããããŒãæ¢ã«ç¥ã£ãŠããŸãã åä¿¡ãã眲åã«ããã«è¿œå ããŸãã
ã¯ããã«
;/////////////////////////////TAG INITIALIZATION ;initialize precomputed header with tag ;tag <- H ^ tag header_to_tag: ldi ZH, high(PRECOMP_HEADER_TAG*2) ldi ZL, low( PRECOMP_HEADER_TAG*2) ldi YH, high(TAG) ldi YL, low( TAG) next_header_byte: lpm temp_0, Z+ ld temp_1, Y eor temp_0, temp_1 st Y+, temp_0 cpi YL, low( TAG + BLOCK_SIZE ) brne next_header_byte
次ã®ç°¡åãªã¹ãããã¯N 'ãèšç®ããããšã§ãã ããã«å¿ èŠãªãã¹ãŠã®ããŒã¿ããããŸãã ã¡ã¢ãªãããã¯ã䜿çšãããã¹ãŠã®æäœãåå¥ã®æé ã«åããããšã§ãäœæ¥ã楜ã«ãªããŸãã ããŒã¿ãããã¯ãã¬ãžã¹ã¿ãã¡ã€ã«ã«ç§»åãããããã€ã³ã¿ãŒã§2ã€ã®ããŒã¿ãããã¯ãè¿œå ãããããå¿ èŠãããå ŽåããããŸãã ã³ãŒã«ããŒã¯ã«å¿ããŠã2ã€ã®æé ã§æ¢ã«é 眮ãããŠããŸãã9ããã®ãããªæé©åãããé«ãã¬ãã«ã®èšèªã§å¯èœã§ãããšã¯èããŸããã§ããã
ãã«ããŒé¢æ°
;block <- block ^ Z xor_Z_to_block_RAM: ldi YH, 0 ldi YL, 4 ;Y <- Y ^ Z xor_Z_to_Y_RAM: ldi temp_2, BLOCK_SIZE ;Y <- Y ^ Z ( temp_2 times ) ram_xor_cycle: ld temp_3, Z+ ld temp_1, Y eor temp_1, temp_3 st Y+, temp_1 dec temp_2 brne ram_xor_cycle ret ;block -> SAVED_IV save_IV: ldi YH, high(SAVED_IV) ldi YL, low( SAVED_IV) ;block -> Y from_regs_to_Y: ldi XH, 0 ldi XL, 4 rjmp move_from_X_to_Y ;SAVED_IV -> block rest_IV: ldi XH, high(SAVED_IV) ldi XL, low( SAVED_IV) ;X -> block from_X_to_regs: ldi YH, 0 ldi YL, 4 ;X -> Y move_from_X_to_Y: ldi temp_0, 0x10 ;X -> Y ( temp_0 times ) ram_save_cycle: ld temp_1, X+ st Y+, temp_1 dec temp_0 brne ram_save_cycle ret
ããã§ã¯ãããã¥ã¡ã³ãã®åçã«åŸã£ãŠN 'ã®èšç®ãå§ããŸãããã ããã§ã¯ãéµçæã®æ®µéã§çšæãããéµBãšL0ã䜿çšãããŸãã çºçãããã¹ãŠã®ããšã¯ãåŸæ¥ãã³ã¡ã³ãã§èª¬æãããŠããŸãã èšç®ã®æåŸã«ãçµæã®N 'ã眲åã«è¿œå ãããŸãã
åæåãã¯ãã«åŠç
;/////////////////////////////NONCE ;block <- N ldi XH, high(SAVED_IV) ldi XL, low( SAVED_IV) rcall from_X_to_regs ;block <- N ^ B ldi ZH, high(PRECOMP_B*2) ldi ZL, low( PRECOMP_B*2) rcall add_round_key ;block <- N ^ B ^ L0 ldi ZH, high(PRECOMP_L0*2) ldi ZL, low( PRECOMP_L0*2) rcall add_round_key ;block <- E( N^B^L0 ) (nonce) rcall Rijndael_encrypt ;save calculated nonce rcall save_IV ;tag <- H ^ N ^ expected ldi YH, high(TAG) ldi YL, low( TAG) ldi ZH, high(SAVED_IV) ldi ZL, low( SAVED_IV) rcall xor_Z_to_Y_RAM
ããŒã¿ãæå·åããããã«ãEAXã¯CTRã«ãŠã³ã¿ãŒã¢ãŒãã§AESã䜿çšããŸãããã®ã¢ãŒãã¯ããããã¯AESãã¹ããªãŒã æå·ã«å€æããŸããã¹ããªãŒã æå·ã䜿çšãããšãåé¡ãªãä»»æã®é·ãã®ããŒã¿ãæå·åã§ããŸããåæåãã¯ãã«ã¯ãæ°ããæºåãããN 'ã§ãããåãããã¯ã¯1ãã€å¢å ããæå·åãããŸãã
1ã®å¢å ã¯åé¡ã§ãã16åã®ã©ã³ãã ãã€ããããå Žåã1ãžã®ãã¹ãŠã®è»¢éãåŠçããå¿ èŠããããŸããè€éãªããšã¯äœããããŸããã
åæã«16ã¬ãžã¹ã¿ãã€ã³ã¯ãªã¡ã³ã
;block++ ;all carrying is done properly increment_regs: ldi YH, 0 ldi YL, 20 clr temp_0 carry_next: ld temp_0, Y cpi temp_0, 1 ld temp_0, -Y adc temp_0, NULL st Y, temp_0 cpi YL, 5 brsh carry_next ret
ããŒã¿ã«æå·åãããåæåãã¯ãã«ãè¿œå ããŸã-埩å·åãããããŒã¿ãååŸããŸãã眲åã®æ€èšŒåã«æå·åã解é€ããã®ã§ã¯ãªããã¡ã¢ãªã«æžã蟌ãçŽåã«æå·åã解é€ããŸããããããN 'ã®æºåãã§ãããã埩å·åã³ãŒãã®ã¡ã¢ãªãå²ãåœãŠãããŸã-ãªãçæããªãã®ã§ããïŒ
CTRã¢ãŒã
;/////////////////////////////DECRYPTION IVs ldi YH, high(ENC_IV) ldi YL, low( ENC_IV) IV_calc_cycle: ;block <- E(IV) rcall Rijndael_encrypt ;ENC_IV <- E(IV) rcall from_regs_to_Y push YH push YL ;IV++ rcall rest_IV rcall increment_regs rcall save_IV pop YL pop YH cpi YL, low( ENC_IV + PAGE_BYTES ) brne IV_calc_cycle
æãé£ããéšåã¯ãã¡ãã»ãŒãžèªèšŒã³ãŒãã§ããããã¯ãã¢ã»ã³ããªã«æã䟿å©ãªæå·åã¢ãŒãã§ã¯ãªãCBCã«åºã¥ããŠããŸããæ£çŽãªãšããããªã人ã ãæ¥åžžç掻ã§CTRã§ã¯ãªãCBCã䜿çšããã®ãã¯ããããŸããããããã¯ãµã€ãºãžã®ã¢ã©ã€ã¡ã³ããå¿ èŠã§ã䞊ååããããæ£ããå®è£ ãããŠããªãå Žåã«ããã€ãã®é¢çœãè匱æ§ããããäžè¬çã«ã¯ããè€éã§ãã幞ããªããšã«ããã¡ãŒã ãŠã§ã¢ã®æå·åãã§ãŒãºäžã«èª¿æŽãè¡ããŸããã
åçã«ãããšãBã¯æåŸã®ãããã¯ïŒæå·åãããæååã®æåŸïŒã§ã®ã¿åèšãããããšã«æ³šæããŠãã ãããåæåãã¯ãã«ãšåæ§ã«ãååŸãããèªèšŒã³ãŒãã¯ããã«çœ²åãšåèšãããŸãã
CMAC / OMAC眲åã®èšç®
;/////////////////////////////CMAC / OMAC TAG CALCULATION ( block <- C ) ;X contains 20 after last save_IV command clear_registers: st -X, NULL cpi XL, 4 brne clear_registers ;block <- L2 ldi ZH, high(PRECOMP_L2*2) ldi ZL, low( PRECOMP_L2*2) rcall add_round_key ;last block is processed individually ldi temp_0, BLOCKS_PER_PAGE ldi ZH, high(RCVD_PAGE) ldi ZL, low( RCVD_PAGE) CBC_TAG: ;block <- block ^ m(i) ;temp_0 is fine rcall xor_Z_to_block_RAM push temp_0 cpi temp_0, 1 brne dont_add_B ldi ZH, high(PRECOMP_B*2) ldi ZL, low( PRECOMP_B*2) rcall add_round_key dont_add_B: ;Z is saved properly rcall Rijndael_encrypt pop temp_0 dec temp_0 brne CBC_TAG ;block <- H ^ N ^ C ^ expected ldi ZH, high(TAG) ldi ZL, low( TAG) rcall xor_Z_to_block_RAM
ããºã«ã®æåŸã®éšåãã€ã³ã¹ããŒã«ããã°ããã§ã眲åãäžèŽãããã©ããã確èªã§ããŸãã眲åãæ£ããæ¡ä»¶ã¯ããã¹ãŠã®ãã€ãã0ã«ãªã£ãŠããããšã§ããåŸæ¥ã®æå·ãã§ãã¯ã§ã¯ããã¹ãŠã®å€ãORã§çµã¿åãããŠãæ¡ä»¶ãªãã®å¥ã®ã¬ãžã¹ã¿ã«å ¥ããŸãããµã€ã¯ã«ã®åŸããã©ãã·ã¥ã«ããŒã¿ãæžã蟌ããã眲åãšã©ãŒãå ±åããŠæ»ã¬ãã決å®ãããŸãã
åŸæ¥ã®å®å
šãªçœ²åæ€èšŒ
;/////////////////////////////TAG CHECK clr temp_0 check_more: ld temp_1, -Y or temp_0, temp_1 cpi YL, 4 brne check_more cp temp_0, NULL breq do_write rjmp die
ãã€ã©ãã«ã¯ã0xFFããªã¯ãšã¹ãã«éä¿¡ããç¡éã«ãŒãã«éããŸããç¹æ» ããŠããããã°ã©ã ã¯ã誀ã£ã確èªãã€ãã«æ°ã¥ãããã¡ã€ã«ãé©åã§ãªãããšããŠãŒã¶ãŒã«éç¥ããå¿ èŠããããŸãã
æ°žç¶çãªãšã©ãŒãµã€ã¯ã«
;/////////////////////////////TAG FAILURE AND EXIT die: ldi temp_0, 0xFF rcall UART_send rjmp die
眲åãæ£ããå ŽåãZãã€ã³ã¿ãŒãçŸåšã®FlashããŒãžã«åŸ©å ããèšé²æé ã«é²ã¿ãŸãããã®ããŒãžãæåŸã®ããŒãžã§ããå Žåãupload_doneã©ãã«ã«ç§»åããŸãããã®ã©ãã«ã¯ãç¹æ» æåãã€ã-0x0Cãéä¿¡ãããã¹ãµã€ã¯ã«ã«å ¥ããŸãã
ãã¹ãŠé 調ã§ã-ã¬ã³ãŒãã«ç§»åããŸã
;/////////////////////////////TAG SUCCESS - CTR AND WRITE do_write: ;restore page pointers pop ZL pop ZH ;decrypt and write page rcall store_page ;restore page counter pop temp_0 dec temp_0 ;continue if not done, else - die breq upload_done rjmp next_page
Flashã§ã®åŸ©å·åãšæžã蟌ã¿ã®æé ã¯ç®ç«ããªãã®ã§ãã»ã«ãããã°ã©ãã³ã°ã«é¢ããããã¥ã¡ã³ãã«åŸããŸãããå¯äžèå³æ·±ãå Žæã¯ããã©ãã·ã¥ã«æžã蟌ãŸãããã€ããtemp_0ã¬ãžã¹ã¿ã®å 容ã§å°ç¡ãã«ããè©Šã¿ã§ããããã«ã¯ã眲åã®ããã±ãŒãžã³ã°ã®çµæãå«ãŸããŠããå¿ èŠããããŸãã眲åãæ£ããã£ãå Žå-temp_0ã¯0ã§ãããããŒã¿ã«ã¯äœãèµ·ãããŸãããäœããã®çç±ã§ãã€ã¯ãã³ã³ãããŒã©ãŒããã¹ãå šäœãæ£åžžã«ãå®è¡ããããã©ãã·ã¥ãžã®æžã蟌ã¿ãéå§ããå Žåãå°ãªããšãããã«ãŽããæžã蟌ãŸããŸãã
èªå·±ããã°ã©ãã³ã°æé ã¯éã«äŸåããŠãããä»ã®ãã€ã¯ãã³ã³ãããŒã©ã«ç§»æ€ããå Žåãããã°ã©ã ã¡ã¢ãªã®ä¿åã³ãã³ãã®åŒã³åºããä¿®æ£ããå¿ èŠãããå ŽåããããŸãã
ããŒã¿ã®åŸ©å·åãšãã©ãã·ã¥ãžã®æžã蟌ã¿
;D( RCVD_PAGE ) -> flash store_page: ;erase current page ldi temp_1, 0b00000011 rcall spm_it ldi YH, high(RCVD_PAGE) ldi YL, low( RCVD_PAGE) ldi XH, high(ENC_IV) ldi XL, low( ENC_IV) write_next: ld r0, Y+ ld temp_2, X+ eor r0, temp_2 ld r1, Y+ ld temp_2, X+ eor r1, temp_2 ;last countermeasure - if we jumped through tag check eor r0, temp_0 eor r1, temp_0 ;store word to page buffer ldi temp_1, 0b00000001 rcall spm_it adiw Z, 2 cpi YL, low( RCVD_PAGE + PAGE_BYTES ) brne write_next ;write page ;back to page start subi ZL, low( PAGE_BYTES) sbci ZH, high(PAGE_BYTES) ;write page ldi temp_1, 0b00000101 rcall spm_it ;to next page start subi ZL, low( -PAGE_BYTES) sbci ZH, high(-PAGE_BYTES) ;re-enable flash ldi temp_1, 0b00010001 rcall spm_it ret spm_it: in temp_2, SPMCSR sbrc temp_2, SPMEN rjmp spm_it out SPMCSR, temp_1 spm ret
ãã¹ãŠããŸãšãããæ£ç¢ºã«1024ãã€ãããã€ã¯ãã³ã³ãããŒã©ããã©ãã·ã¥ãããã¥ãŒãºãèšå®ããã¯ã©ã€ã¢ã³ããœãããŠã§ã¢ãæžã蟌ãããšã¯ãã®ãŸãŸã§ãã
ãã¹ãäž
ã¯ã©ã€ã¢ã³ããœãããŠã§ã¢ã«èŠããããšã¯ãããŸãããCrypto++ã䜿çšããŠãQtã§ããŒãžã§ãã¬ãŒã¿ãŒãšãã¡ãŒã ãŠã§ã¢ã®æå·åããã°ã©ã ãäœæããŸããæå·åã®ããã®éçããããŒããã£ãããšããã«å ¥åãããŸããæªäœ¿çšã®ã¡ã¢ãªé åã¯ãã¹ãŠãã©ã³ãã ãã€ãã§åããããŸãã
ãã©ãã·ã£ãŒã¯åºæ¬ã§ã-0xC0ãåŸ ã£ãŠ0x60ãéä¿¡ãããã¡ã€ã«ãçµäºãããŸã§å0xC0ã«å¿çããŠãã€ããéä¿¡ããŸãã0x0Cã«ãªã£ã-ãã¹ãŠã®æºåãã§ãã0xFFã«ãªã£ã-ãšã©ãŒãçºçãããLinuxçšã®çŽç²ãªCã§æžããŸããããç§ã¯ã©ãããããã«COMããŒããæã£ãŠããªãã®ã§...ç§ãã¡ã¯Psion 5MXã䜿çšããŸããããã¯ç§ãã5æ³å¹Žäžã§ãã
ç¥åœã®ãã³ããATmega8AãæèŒãããã¶ãŒããŒããåãåºããããŒãã§çž«ãä»ããMAX233ã§ãã¶ãŒããŒãã®äžéšã«æ¥ç¶ããPsioneã§ãã¡ãŒã ãŠã§ã¢ãçµã¿ç«ãŠãã©ã³ãã ãªã¯ã€ã€ã§å·»ãæ»ãããã¡ãŒã ãŠã§ã¢ãšãã¡ãŒã ãŠã§ã¢ã®ããŒãããã©ãã·ã¥ãã©ã€ããŒã«ç€ºããé»æºãåèµ·åããŸã...ããã»ã¹ãéå§ãããŸããã
èŠããŠãããŠãArduinoã¯
æããã«äœããèµ·ãã£ãŠããŸãã
ããŒãã«ãšãã¹ããã³ãã®ç¶æ ããforã³ããŸã-ç§ã®ç¡ç·é»åæè¡è ã¯ããŸãè¯ããããŸããã
ãã¹ãããã°ã©ã ã®å šã¿ã¹ã¯ã¯ãLEDãæ¶ããŠæ°žä¹ ã«åããããšã§ãããã¡ãŒã ãŠã§ã¢ã®åŸã圌女ã¯æåããŸããæåïŒ
å€åãªãµã€ãªã³ã¯æž¯ã«10KBã転éããæ瀺ãåŸ
ã£ãŠããŸã
LEDãæ¶ç¯
ãã®ãããªç°¡åãªæ¹æ³ã§ãäžå¯èœãªããšãå®è¡ããã«ã¹ã¿ã ã³ãŒãçšã«å€ãã®ã¹ããŒã¹ãæ®ãããšãã§ããŸããçŸåšãäžåœã®ã¹ãã€ããœãŒã¹ãçãããšãå¿é ããã«ããããå±éããæ¹æ³ããããŸãã
誰ããç§ã®å®è£ ã§é倧ãªã»ãã¥ãªãã£ãšã©ãŒãèŠã€ãããå¬ããã§ãã
ãã¹ãŠã®ãœãŒã¹ã³ãŒããšãã®èšäºã¯ãCreativeCommons Attribution-NonCommercial-ShareAlikeã®äžã§ã©ã€ã»ã³ã¹ãããŠããŸãã
GitHubãªããžããªïŒgithub.com/sirgal/AVR-EAX-AES-bootloader
ïŒPCã®ãã¹ãŠã®ã³ãŒãã¯æ¥ãã§æžãããŠããã1幎åã«ã誰ãããã®ææãä¿®æ£ããããªãåãã§ããŸãããŸã æéããããŸããïŒ