¾ç¼ºÀÚ

Python OpenSSL ·¡ÆÛ
Áö±Ý ´Ù¿î·Îµå

¾ç¼ºÀÚ ¼øÀ§ ¹× ¿ä¾à

±¤°í

  • Rating:
  • ƯÇã:
  • GPL
  • °¡°Ý:
  • FREE
  • °Ô½ÃÀÚ À̸§:
  • Yann GUIBET
  • °Ô½ÃÀÚ À¥»çÀÌÆ®:
  • https://github.com/yann2192/

¾ç¼ºÀÚ Å±×


¾ç¼ºÀÚ ¼³¸í

PyelliptipicÀº OpenSSL ¾Ïȣȭ ¶óÀ̺귯¸®ÀÇ ³ôÀº ¼öÁØÀÇ ÆÄÀ̽㠷¡ÆÛÀÔ´Ï´Ù. GNU / Linux ¹× Windows.Example : #! / usr / bin / python °¡Á® ¿À±â pyelliptic # ´ëĪ ¾Ïȣȭ IV = pyelliptic.cipher.gen_iv ( 'AES-256-CFB' ) ctx = pyelliptic.cipher ( "secretkey", iv, 1, ciphername = 'aes-256-cfb') ctx.update ( 'test1') ctx.update ( 'test2') ciphertext = ctx.final () ctx2 = pyelliptic.cipher ( "secretkey", iv, 0, ciphername = 'aes-256-cfb') Àμâ ctx2.ciphering (¾ÏÈ£¹®) # ºñ´ëĪ ¾Ïȣȭ alice = pyelliptic.ecc () # ±âº» °î¼± : sect283r1 bob = pyelliptic.ecc ( °î¼± = 'sect571r1') ciphertext = alice.encrypt ( "hello bob", bob.get_pubkey) Àμâ bob.decrypt (ciphertext) signature = bob.sign ( "hello alice") # ¾Ù¸®½ºÀÇ Á÷¾÷ : pyelliptiptic.ecc Àμâ ( pubkey = bob.get_pubkey ()). È®ÀÎ (¼­¸í, "¾È³çÇϼ¼¿ä.") # ¿À·ù !!! ½ÃµµÇغ¸½Ê½Ã¿À : key = alice.get_ecdh_key (bob.get_pubkey ()) Àμâ ( "ECDH Å° °è¾àÀÇ °æ¿ì, Å°´Â µ¿ÀÏÇÑ °î¼±¿¡ Á¤ÀǵǾî¾ßÇÕ´Ï´Ù!") ¾Ù¸®½º = pyelliptic.ecc (°î¼± = 'sect571r1') Àμ⠾ٸ®½º Àμâ . get_ecdh_key (bob.get_pubkey ()). encode ( 'hex') bob.get_ecdh_key (alice.get_pubkey ())¸¦ ÀμâÇÕ´Ï´Ù. encode ( 'Çí½º') Á¦Ç° ȨÆäÀÌÁö


¾ç¼ºÀÚ °ü·Ã ¼ÒÇÁÆ®¿þ¾î