Author Topic: cryptography + message digest แบบต่างๆ  (Read 11642 times)

golfreeze

  • Administrator
  • Hero Member
  • *****
  • Posts: 2140
    • View Profile
    • นั่งสมาธิ สติปัฏฐานสี่ พาเที่ยววัด แนะนำวัด แจกcd ธรรมะฟรี
    • Email
cryptography + message digest แบบต่างๆ
« on: มกราคม 20, 2014, 05:03:53 PM »
ปกติแล้วการเข้ารหัส จะแบ่งออกเป็นหลักๆ อยู่สองแบบ คือ symmetric cryptography และ asymmetric cryptography

1.symmetric cryptography

จะอาศัยการเข้ารหัสข้อมูลแบบ ใช้ "secret key" ร่วมกัน ระหว่าง ฝั่งผู้ส่งข้อมูล(JO) และ ฝั่งผู้รับข้อมูล (CAT)
เช่น ตกลงว่าใช้รหัส abc123ka ในการถอดรหัส
ซึ่งถ้ารหัส ถูกดักจับไป hacker ก็สามารถเข้าถึงข้อมูล ที่ JO กับ CAT ใช้สื่อสารกันได้



2.asymmetric cryptography

จะอาศัยในส่วนของ (Key pair) ที่เป็น private key และ public key ในการเข้ารหัส (encryption) และถอดรหัส (decryption) ข้อมูล
ซึ่งผู้ส่งข้อมูล จะถือ private key ไว้ แล้วก็ส่งข้อมูลไปให้ทาง ผู้รับข้อมูล ซึ่งถือ public key
หลังจากรับข้อมูลที่เข้ารหัสมาแล้ว ฝั่งผู้รับข้อมูล ก็ทำการ ใช้ public key ที่ถือไว้ในการถอดรหัสข้อมูลนั้น




3. hash function ( one way cryptography) เป็นการเข้ารหัสทางเดียว ซึ่งจะไม่มีใครทราบ key ได้เลย
ข้อมูลจะถูกเข้ารหัสไว้ ซึ่งคนที่เห็นข้อมูลนั้น จะไม่ทราบเลยว่าเป็นข้อความอะไร  

                            Symmetric encryption                                                Asymmetric encryption
1. Key                    ใช้ Secret key เดียวกันระหว่างผู้ส่งกับผู้รับ                              ใช้หลัก Key pair ได้แก่ Private key และ Public key
2. การแลกเปลี่ยน Key    ต้องส่ง Secret key ผ่านช่องทางมั่นคงปลอดภัยเท่านั้น                 การส่ง Public key สามารถเปิดเผยให้กับผู้ใดก็ได้ แต่ Private key ต้องเก็บรักษาไว้กับตนเอง
                                ต้องทำการเปลี่ยน Secret key บ่อยๆ เพื่อความมั่นคงปลอดภัย
3. ความเร็ว                    ความซับซ้อนน้อยมีความเร็วในการทำงานสูง                                ความซับซ้อนมาก มีความเร็วในการทำงานช้ากว่า Symmetric encryption 100-1000 เท่า
4. เหมาะกับใช้ในด้าน    การรักษาความลับข้อมูล                                                        การรักษาความลับข้อมูลการยืนยันตัวตน การปฏิเสธการรับผิดชอบ

« Last Edit: มกราคม 21, 2014, 11:53:32 AM by golfreeze »

golfreeze

  • Administrator
  • Hero Member
  • *****
  • Posts: 2140
    • View Profile
    • นั่งสมาธิ สติปัฏฐานสี่ พาเที่ยววัด แนะนำวัด แจกcd ธรรมะฟรี
    • Email
Re: cryptography แบบต่างๆ
« Reply #1 on: มกราคม 21, 2014, 10:11:55 AM »
4. hybrid cryptography

เป็นการอาศัยหลักการของทั้ง symmetric crypto + asymmetric crypto ในการเข้ารหัสข้อมูล

S/MIME is an excellent example of a hybrid cryptographic solution, combining the powers of symmetric and asymmetric ciphers and hash functions. (For an introduction to cryptography, see the Windows IT Security article "Keep Your Secrets Safe," August 2005, InstantDoc ID 46871.)

จากรูป shows the steps in a typical-S/MIME scenario. Alice wants to send a secure message (meaning it has guaranteed confidentiality, integrity, data authentication, and nonrepudiation) to Bob. The S/MIME exchange follows these steps:

    1.Alice uses her private key to create a digital signature for the message.
    2.Alice uses a symmetric bulk encryption key to encrypt the message.
    3.To create a secure channel that can protect the confidentiality of the encryption key while it's transmitted across a public communication channel, Alice uses Bob's public key (found in Bob's certificate) to encrypt the encryption key. This step produces a lockbox that contains an encrypted copy of the encryption key.
    4.Bob uses his private key to decrypt the lockbox. This decryption process produces the bulk encryption key.
    5.Using the bulk encryption key, Bob decrypts the message. Bob can now read the message.
    6.Bob uses Alice's public key to verify the authenticity and integrity of the message by verifying the digital signature, which is found in Alice's certificate.

S/MIME provides persistent, end-to-end encryption of mail messages. This means that when you use S/MIME to encrypt a message, the message is not only encrypted while in transmission, it's also encrypted when stored in your local Microsoft Outlook personal folder store (.pst) or in your Microsoft Exchange Server mailbox store.

« Last Edit: มกราคม 21, 2014, 10:42:29 AM by golfreeze »

golfreeze

  • Administrator
  • Hero Member
  • *****
  • Posts: 2140
    • View Profile
    • นั่งสมาธิ สติปัฏฐานสี่ พาเที่ยววัด แนะนำวัด แจกcd ธรรมะฟรี
    • Email
Re: cryptography + message digest แบบต่างๆ
« Reply #2 on: มกราคม 21, 2014, 11:52:26 AM »
เรื่องของ message digest แบบต่างๆ

1. SHA1 (Secure Hash Algorithm)
       เป็นรูปแบบการเข้ารหัสข้อมูล แบบ SHA ที่ถูกพัฒนาโดย (NSA) ,National Security Agency of USA and published as their government standard.
     
       SHA-1 produce the 160-bit hash value. Original SHA (or SHA-0) also produce 160-bit hash value, but SHA-0 has been withdrawn by the NSA shortly after publication and was superseded by the revised version commonly referred to as SHA-1. The other functions of SHA series produce 224-, 256-, 384- and 512-bit hash values.

2. MD5 ( Message digest algorithm 5)
     เป็นรูปแบบการเข้ารหัส ข้อมูล ที่ข้อมูลหลังจากการเข้ารหัส จะออกมาเป็นขนาด 128 bit เป็นรูปแบบที่ใช้งานกันอย่างแพร่หลาย ในส่วนของ เว็บแอป
     หรือไว้ใช้ในการเชคว่าข้อมูล ที่ได้มีการเปลี่ยนแปลง ข้อมูลภายในหรือไม่ (integrity)

     The set of MD5 checksums for critical system, application, and data files provides a compact way to store information for use during periodic integrity checks of those files.

      Details for the MD5 cryptographic hash algorithm and C source code are provided in RFC 1321. The MD5 algorithm has been implemented in numerous computer languages including C, Perl, and Java.

3. HMAC ( Keyed-Hashing for Message Authentication )
« Last Edit: มกราคม 21, 2014, 02:08:36 PM by golfreeze »

golfreeze

  • Administrator
  • Hero Member
  • *****
  • Posts: 2140
    • View Profile
    • นั่งสมาธิ สติปัฏฐานสี่ พาเที่ยววัด แนะนำวัด แจกcd ธรรมะฟรี
    • Email
Re: cryptography + message digest แบบต่างๆ
« Reply #3 on: มีนาคม 21, 2017, 10:00:01 PM »
ทางบริษัทแพ็คเกตเลิฟ ไอทีเซอร์วิส แอนด์ คอนซัลติ้ง จำกัด ให้บริการจัดคอร์ดเทรนนิ่ง
1.เรื่อง การจัดการใบรับรองบนเว็บเซิฟเวอร์ ตลอดจนวิธีการวิเคราะห์ระบบเว็บกับการทำงานบน SSL และ TLS
2. แนะนำการเลือก CA และเลือกรูปแบบใบรับรองให้เหมาะกับความต้องการของงาน
3. วิธีการแก้ไขในกรณีใบรับรองมีปัญหา หรือต้องการ Re-issue Certificate ใหม่
4. การปรับแก้ข้อมูลในเว็บไซต์เมื่อใช้งานร่วมกับ SSL หรือ TLS over HTTP (HTTPS)

สนใจสามารถติดต่อเข้ามาที่อีเมล : support[at]packetlove.com
หรือโทรศัพท์ติดต่อ 086-415-0926
 ;)