| µµ±¸ »óÀÚ :: cryptotp. ÀÏȸ¼º Æеå À¯Çü ¾ÏȣȷÎÇؼ Àç»ýµË´Ï´Ù. |
Áö±Ý ´Ù¿î·Îµå |
µµ±¸ »óÀÚ :: cryptotp. ¼øÀ§ ¹× ¿ä¾à
- ƯÇã:
- Perl Artistic License
- °Ô½ÃÀÚ À¥»çÀÌÆ®:
- http://search.cpan.org/~docg/
µµ±¸ »óÀÚ :: cryptotp. ű×
µµ±¸ »óÀÚ :: cryptotp. ¼³¸í
ÀÏȸ¼º Æеå À¯Çü ¾ÏȣȷΠÇØ°áÇϽʽÿÀ. µµ±¸ »óÀÚ :: CryptoTP´Â ÀÏȸ¼º Æеå À¯Çü ¾ÏȣȷΠÀç»ýÇÒ ¼öÀÖ´Â Perl ¸ðµâÀÔ´Ï´Ù. Synopsis »ç¿ë µµ±¸ »óÀÚ :: CryptoTP; $ plaintextfile = "doc.txt"; # ÀÓÀÇÀÇ Æе带 »ý¼º $ pad_file = rand_pad ( "myPad.otp"); # encrypt_file ÆÄÀÏÀ» ¾ÏÈ£ÈÇϽʽÿÀ ($ PlainTextFile, "ciphertext.txt", "myPad.otp", "myPad.otp"); # decorypt_file ( "ciphertext.txt", "decrypted-plain.txt", "myPad.otp" ""decrytext.txt ")¸¦ ´Ù½Ã Çص¶ÇÕ´Ï´Ù. # ¹®ÀÚ¿À» ¾ÏÈ£ÈÇÕ´Ï´Ù $ PRALEXT = "SQUEAMISH OSSIFRAGE"; $ garbage = ENCRYPT_STRING ($ PRALEXT, 'F4'); # $ text = decrypt_string ($ grabage, 'f4')À» ´Ù½Ã Çص¶ÇÕ´Ï´Ù. ¸ðµâÀº Abotu ¾Ïȣȸ¦ ¹è¿ì´Â µ¥ °ü½ÉÀÌÀÖ´Â ºÐµéÀ» À§ÇØ ÀǹÌÇÕ´Ï´Ù ... ¿©±â¿¡ »ç¿ë µÈ ¹æ¹ýÀº ¾ÈÀüÇÏÁö ¾ÊÀ¸·Á´Â °ÍÀº ¾Æ´Ï¸ç ¿øÄ¢À» ÀÌÇØÇÏ´Â °Í¸¸À¸·Î ÀüÀûÀ¸·Î »ç¿ëÇؾßÇÕ´Ï´Ù. ¾ÏÈ£ÈÀÇ ÀÌ ¸ðµâÀÇ ±â´ÉÀ» »ç¿ëÇÏ¿© Áß¿äÇÑ µ¥ÀÌÅ͸¦ º¸È£ÇÏ·Á°í ½ÃµµÇÏÁö ¸¶½Ê½Ã¿À.ÀÌ ±â´ÉÀº "ÀÏȸ¼º Æеå"¾Ïȣȸ¦ ±¸ÇöÇÕ´Ï´Ù. ÆÄÀÏ ¾ÏÈ£È / ¾ÏÈ£ Çص¶ ±â´ÉÀÇ °æ¿ì ´Ù¸¥ ÆÄÀÏÀ» 'PAD'·Î ÁöÁ¤ÇÕ´Ï´Ù. ÇϳªÀÇ ºí·Ï ÀÌÀÌ ÆÄÀÏ¿¡¼ ÀÐÇôÁö°í ÀÔ·ÂÀÇ °¢ ºí·Ï¿¡ Àû¿ëµË´Ï´Ù (Âü°í : ÀÌ°ÍÀº Å« º¸¾È °áÇÔÀÔ´Ï´Ù). µ¿ÀÏÇÑ Æе带 »ç¿ëÇÏ¿© Ãâ·ÂÀ» ´Ù½Ã ½ÇÇàÇϸé ÀÏ¹Ý ÅؽºÆ®¸¦ º¹±¸ÇؾßÇÕ´Ï´Ù. ÀÚ¼¼ÇÑ Á¤º¸´Â Richard E. SmithÀÇ "ÀÎÅÍ³Ý ¾ÏÈ£È"¸¦ ÂüÁ¶ÇϽʽÿÀ. ÀÌ Ç׸ñ°ú ¸¹Àº ´Ù¸¥ ±âŸ¸¦ ´Ù·ì´Ï´Ù. Encrypt_File (ÀÔ·Â, Ãâ·Â, Æеå) Decrypt_File (ÀÔ·Â, Ãâ·Â, Æеå) ÆÄÀÏÀ» ¾ÏÈ£ÈÇϰųª Çص¶ÇÕ´Ï´Ù. ¾ÏÈ£ÈÀÇ °æ¿ì ÀÔ·ÂÀº ÀÏ¹Ý ÅؽºÆ®À̸ç Ãâ·ÂÀº ¾ÏÈ£¹®ÀÔ´Ï´Ù. ¾ÏÈ£ Çص¶ÀÇ °æ¿ì, ÀÔ·ÂÀº ¾ÏÈ£¹®ÀÌ°í, Ãâ·ÂÀº ÀÏ¹Ý ÅؽºÆ®ÀÔ´Ï´Ù. Æеå´Â µÎ ÇÔ¼ö°£¿¡ °øÀ¯µË´Ï´Ù. ¸ðµç Àμö´Â ÆÄÀÏ À̸§ (ÆÄÀÏ ÇÚµéÀÌ ¾Æ´Ô)ÀÔ´Ï´Ù. encrypt_string ( "string", 'ff') decrypt_string ( "f2fe3222", 'ff')Àº ¹®ÀÚ¿À» ¾ÏÈ£ÈÇϰųª Çص¶ÇÕ´Ï´Ù. Æеå´Â 2 ÀÚ¸® 16 Áø¼ö (00 - FF)·Î ÁÖ¾îÁý´Ï´Ù. ±×°ÍÀº plaintext / ciphertextÀÇ °¢ ¹®ÀÚ¿¡ Àû¿ëµË´Ï´Ù. Plaintext.rand_pad ( "filename.pad")ÀÇ ¾ÏÈ£¹®À» ¹ÝȯÇÕ´Ï´Ù. ´Ù¼Ò ÀÓÀÇÀÇ Æеå ÆÄÀÏÀ» »ý¼ºÇÏ°í ¹ÙÀÌÆ®¸¦ ±æ°Ô Â÷´ÜÇÕ´Ï´Ù. ÀÚ½ÅÀÇ Æеå ÆÄÀÏÀ» ãÀ» ¼ö¾ø´Â °æ¿ìÀÌ »ç¿ëÇϽʽÿÀ. ¿ä±¸ »çÇ× : ¡¤ Perl.
µµ±¸ »óÀÚ :: cryptotp. °ü·Ã ¼ÒÇÁÆ®¿þ¾î