# Hash Function ที่เป็นที่รู้จัก

**URL:** <https://discuss.hashpire.io/t/hash-function/376>\
**Category:** Content Board\
**Tags:** beginner, article\
**Created:** [August 25, 2022, 6:40am UTC](https://discuss.hashpire.io/t/hash-function/376 "2022-08-25T06:40:28Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Namtan](https://discuss.hashpire.io/user_avatar/discuss.hashpire.io/namtan/32/23_2.png) [@Namtan](https://discuss.hashpire.io/u/Namtan)\
**Post date:** [August 25, 2022, 6:40am UTC](https://discuss.hashpire.io/t/hash-function/376/1 "2022-08-25T06:40:28Z")

</div>

# Planning

## Text

### ชื่อหัวข้อที่จะนำเสนอ

- ตัวอย่าง Hash Function ที่เป็นที่รู้จัก

### โครงสร้างของเนื้อหา

1. จำนวนหัวข้อทั้งหมดที่จะนำเสนอ
  - 5 หัวข้อ

2. แต่ละหัวข้อจะนำเสนออะไร
  - หัวข้อที่ 1 : เกริ่นนำว่า Hash Function มีหลายตัว เช่น … แต่ในบทความนี้จะนำเสนอตัวที่เป็นที่นิยม คือ..
  - หัวข้อที่ 2 : ตัวอย่าง ที่ 1 MD5 ผู้ออกแบบ, สามารถสร้าง Hash Value ได้กี่บิต และจุดเด่นอื่น ๆ เล็กน้อย
  - หัวข้อที่ 3 : ตัวอย่าง ที่ 2 SHA ผู้ออกแบบ, สามารถสร้าง Hash Value ได้กี่บิต และจุดเด่นอื่น ๆ เล็กน้อย
  - หัวข้อที่ 4 : ตัวอย่าง ที่ 3 SHA -2 ผู้ออกแบบ, สามารถสร้าง Hash Value ได้กี่บิต และจุดเด่นอื่น ๆเล็กน้อย
  - หัวข้อที่ 5 : สรุปว่ามาตราฐาน แต่ละตัวแตกต่างกันไปขึ้นอยู่กับอะไร
  - Reference : ข้อมูลจากสไลด์ที่พี่ต้าสอน [https://youtu.be/DmUE-pRyt6s](https://youtu.be/DmUE-pRyt6s) ส่วนที่เอา 3 ตัวที่เป็นที่นิยม ดูมาจากหลาย ๆ เว็บ ว่าเค้าพูดถึงตัวไหนบ้าง

## Graphic

### เสนอไอเดียสำหรับออกแบบกราฟฟิค

### รูปแบบของกราฟฟิคที่จะนำเสนอ

### โครงสร้างของกราฟฟิค

1. จำนวน Page ที่จะนำเสนอ
  - 5 รูป

2. แต่ละ Page เป็นรูปแบบอย่างไร
  - รูปที่ 1 : Cover – “ตัวอย่าง Hash Function ที่เป็นที่รู้จัก”
  - รูปที่ 2 : Overview – “Hash Function คืออะไร ตัวอย่างการใช้งาน เช่น ใช้ใน Bitcoin”
  - รูปที่ 3 : ตัวอย่างที่เป็นที่รู้จัก - MD5
  - รูปที่ 4 : ตัวอย่างที่เป็นที่รู้จัก - SHA
  - รูปที่ 5 : Ending

คำถามที่รบกวนให้ Reviewer ช่วยตอบค่ะ

#### 1. ต้องการรู้ประเด็นไหนเพิ่มเติมไหม เพราะอะไร

#### 2. คิดว่าเรียงลำดับการนำเสนอได้ดีรึยัง ถ้าไม่ดี มีไอเดียอย่างไร

#### 3. มีประเด็นไหนควรตัดทิ้งไหม เพราะอะไร

 ![Hash-Funciton-ที่เป็นที่รู้จัก](https://discuss.hashpire.io/uploads/default/original/1X/25371b007de828df721d330a00440f3e13d55f17.png)

# Content

ตัวอย่าง Hash Function ที่เป็นที่รู้จัก

ถ้าหากมีการติดตามข้อมูลในหลาย ๆ ตอนที่ผ่านจะเห็นว่าเรามีการพูดถึง Hash Function ทั้งในด้านความหมายและคุณสมบัติกันไป หลาย ๆ คนอาจจะเข้าใจว่า Hash Function มีแค่ฟังก์ชันเดียวหรือเปล่า หรือหลาย ๆ คนอาจจะเคยได้ยินชื่อ Hash Function ที่ Bitcoin ใช้มาบ้าง ซึ่งจริง ๆ แล้ว Hash Function ที่มีการใช้งานกันอยู่ในปัจจุบันนั้น มีอยู่หลายชนิด เช่น RIPEMD160 (RIPE Message Digest), SM3 (Shang Mi) 256-bit output, Whirlpool 512-bit output, SHA-3 เป็นต้น แต่ในวันนี้เราจะยกตัวอย่าง Hash Function ที่เป็นที่รู้จักและมีการใช้อย่างแพร่หลาย 2 แบบ ได้แก่

- MD5 (Message-Digest Algorithm 5) ได้รับการออกแบบโดย Ron Rivest สามารถสร้างค่าแฮช (Hash Value) ได้ 128 bit เป็น Hash Algorithm ที่ถูกใช้ในการจัดเก็บรหัสผ่าน ตัวอย่างเช่น ระบบ Linux บางระบบที่ใช้ MD5 เพื่อบันทึกรหัสผ่าน ภายหลัง MD5 มีการใช้งานน้อยลง เนื่องจากปัญหาด้านความปลอดภัย

- SHA (Secure Hash Algorithms) คือ กลุ่มฟังก์ชันแฮชที่เผยแพร่โดย National Institute of Standards and Technology (NIST) เป็น U.S. Federal Information Processing Standard (FIPS) ประกอบด้วย

Hash Function อย่าง Message Digest Algorithm (MD5) หรือ Secure Hash Algorithm เช่น SHA-1, SHA-2, SHA-3 หรือฟังก์ชันแฮชแบบอื่น ๆ จะมีความแตกต่างกันไป ขึ้นอยู่กับวิธีการแฮชและขนาดความยาวของ Output (Fixed Length Output) ที่ได้จากกระบวนการแฮช

# Reference

[![](https://discuss.hashpire.io/uploads/default/original/1X/437d077c438a1c40597952f99dfb9e7d7cfcc1b0.jpeg "Thursday Community Calls : ทำความเข้าใจ Hash Function และการใช้งาน") ](https://www.youtube.com/watch?v=DmUE-pRyt6s)

---

<div class="post-metadata">

**Author:** ![Namtan](https://discuss.hashpire.io/user_avatar/discuss.hashpire.io/namtan/32/23_2.png) [@Namtan](https://discuss.hashpire.io/u/Namtan)\
**Post date:** [August 25, 2022, 8:26am UTC](https://discuss.hashpire.io/t/hash-function/376/2 "2022-08-25T08:26:23Z")

</div>



---

<div class="post-metadata">

**Author:** ![Namtan](https://discuss.hashpire.io/user_avatar/discuss.hashpire.io/namtan/32/23_2.png) [@Namtan](https://discuss.hashpire.io/u/Namtan)\
**Post date:** [August 25, 2022, 8:26am UTC](https://discuss.hashpire.io/t/hash-function/376/3 "2022-08-25T08:26:27Z")

</div>



---

<div class="post-metadata">

**Author:** ![Namtan](https://discuss.hashpire.io/user_avatar/discuss.hashpire.io/namtan/32/23_2.png) [@Namtan](https://discuss.hashpire.io/u/Namtan)\
**Post date:** [August 25, 2022, 8:26am UTC](https://discuss.hashpire.io/t/hash-function/376/4 "2022-08-25T08:26:34Z")

</div>



---

<div class="post-metadata">

**Author:** ![supanut](https://discuss.hashpire.io/user_avatar/discuss.hashpire.io/supanut/32/22_2.png) [@supanut](https://discuss.hashpire.io/u/supanut)\
**Post date:** [August 26, 2022, 9:01am UTC](https://discuss.hashpire.io/t/hash-function/376/5 "2022-08-26T09:01:30Z")

</div>

คำถามที่รบกวนให้ Reviewer ช่วยตอบค่ะ  
1.1 อยากให้หัวข้อแรกเกริ่นหน่อยว่าจริงๆ แล้วมันมี hash function หลายตัวเลย เช่น… แต่ในบทความนี้จะนำเสนอ 3 ตัวที่เป็นยอดฮิต อะไรก็ว่าไป …  
1.2 อยากให้มี ref เพิ่มด้วย  
2. ควรขึ้นตามข้อ 1 ที่พี่แจ้ง  
3. ไม่มี

---

<div class="post-metadata">

**Author:** ![supanut](https://discuss.hashpire.io/user_avatar/discuss.hashpire.io/supanut/32/22_2.png) [@supanut](https://discuss.hashpire.io/u/supanut)\
**Post date:** [August 26, 2022, 9:01am UTC](https://discuss.hashpire.io/t/hash-function/376/6 "2022-08-26T09:01:36Z")

</div>



---

<div class="post-metadata">

**Author:** ![supanut](https://discuss.hashpire.io/user_avatar/discuss.hashpire.io/supanut/32/22_2.png) [@supanut](https://discuss.hashpire.io/u/supanut)\
**Post date:** [August 31, 2022, 7:50am UTC](https://discuss.hashpire.io/t/hash-function/376/7 "2022-08-31T07:50:11Z")

</div>

1. วิธีการอะไรครับ …วิธีการเข้ารหัส ?

> [@Namtan](#):
>
> วิธีการที่ใช้

1. ref เหมือนที่เคยแจ้งไปก่อนหน้าครับ อยากให้ระบุนาทีที่เล่นวีดีโอเลยเมื่อคลิกเข้าไปจะได้ดูได้เลย + เกริ่นนำเชิญชวนมาดู community talk กันหน่อยครับ

---

<div class="post-metadata">

**Author:** ![supanut](https://discuss.hashpire.io/user_avatar/discuss.hashpire.io/supanut/32/22_2.png) [@supanut](https://discuss.hashpire.io/u/supanut)\
**Post date:** [August 31, 2022, 7:50am UTC](https://discuss.hashpire.io/t/hash-function/376/8 "2022-08-31T07:50:19Z")

</div>



---

<div class="post-metadata">

**Author:** ![anakornk](https://discuss.hashpire.io/user_avatar/discuss.hashpire.io/anakornk/32/3_2.png) [@anakornk](https://discuss.hashpire.io/u/anakornk)\
**Post date:** [September 20, 2022, 8:27am UTC](https://discuss.hashpire.io/t/hash-function/376/10 "2022-09-20T08:27:40Z")

</div>

> [@Namtan](#):
>
> มาตรฐาน

@supanut แปลว่ามาตฐานโอเคปะ ? รู้สึคแปลกๆอยู่  
มันคือฟังชั่นแฮชประเภทนึง ?

topic นี้ต้องการจะสื่อสารอะไร ? ความแตกต่างระว่าง Hash Function รึเปล่า ?  
เราต้องการที่จะให้ตัวอย่างเพืออะไร ใช่เป็นให้เห็นความแตกต่าง?

---

<div class="post-metadata">

**Author:** ![anakornk](https://discuss.hashpire.io/user_avatar/discuss.hashpire.io/anakornk/32/3_2.png) [@anakornk](https://discuss.hashpire.io/u/anakornk)\
**Post date:** [September 20, 2022, 8:27am UTC](https://discuss.hashpire.io/t/hash-function/376/11 "2022-09-20T08:27:52Z")

</div>



---

<div class="post-metadata">

**Author:** ![anakornk](https://discuss.hashpire.io/user_avatar/discuss.hashpire.io/anakornk/32/3_2.png) [@anakornk](https://discuss.hashpire.io/u/anakornk)\
**Post date:** [September 20, 2022, 8:28am UTC](https://discuss.hashpire.io/t/hash-function/376/12 "2022-09-20T08:28:17Z")

</div>



---

<div class="post-metadata">

**Author:** ![Namtan](https://discuss.hashpire.io/user_avatar/discuss.hashpire.io/namtan/32/23_2.png) [@Namtan](https://discuss.hashpire.io/u/Namtan)\
**Post date:** [October 4, 2022, 9:00am UTC](https://discuss.hashpire.io/t/hash-function/376/13 "2022-10-04T09:00:43Z")

</div>



---

<div class="post-metadata">

**Author:** ![Namtan](https://discuss.hashpire.io/user_avatar/discuss.hashpire.io/namtan/32/23_2.png) [@Namtan](https://discuss.hashpire.io/u/Namtan)\
**Post date:** [October 4, 2022, 9:00am UTC](https://discuss.hashpire.io/t/hash-function/376/14 "2022-10-04T09:00:47Z")

</div>



---

<div class="post-metadata">

**Author:** ![Namtan](https://discuss.hashpire.io/user_avatar/discuss.hashpire.io/namtan/32/23_2.png) [@Namtan](https://discuss.hashpire.io/u/Namtan)\
**Post date:** [October 4, 2022, 9:00am UTC](https://discuss.hashpire.io/t/hash-function/376/15 "2022-10-04T09:00:55Z")

</div>



---

<div class="post-metadata">

**Author:** ![supanut](https://discuss.hashpire.io/user_avatar/discuss.hashpire.io/supanut/32/22_2.png) [@supanut](https://discuss.hashpire.io/u/supanut)\
**Post date:** [October 5, 2022, 5:24am UTC](https://discuss.hashpire.io/t/hash-function/376/16 "2022-10-05T05:24:09Z")

</div>

@anakornk@Namtan

1. ประเดนเรื่องคำว่า “มาตรฐาน”

> [@Namtan](#):
>
> Hash Function ที่เป็นที่นิยมและมีการใช้อย่างแพร่หลาย 3 มาตรฐาน

- พี่ว่าคำว่ามาตรฐานก็ไม่ผิดนะครับ มันมีความหมายว่า “สิ่งที่ถือเป็นหลักสำหรับเทียบกำหนดในด้านปริมาณ และคุณภาพ” เช่น SHA-1 เป็นมาตรฐานในสหรัฐอเมริกาสำหรับใช้กับ DSA Signature Scheme
- เราเลยสามารถใช้หน่วยมันเป็นมาตรฐานได้รึเปล่า
- ซึ่งถ้ามองว่ามันกำกวม อาจจะเปลี่ยนจากคำว่า “มาตรฐาน” เป็นคำว่า “แบบ” แทนดีไหมครับ ?

1. ประเดนเรื่อง topic นี้ต้องการสื่ออะไร

- พี่เข้าใจว่าบทความนี้มันเป็นการ edit เนื้อหาเก่า ให้อยุ่ในรูปแบบ Planing ใหม่รึเปล่า เลยยังไม่ได้ CF content layout ให้ชัดเจนว่าจะสื่อสารแบบนี้ดีไหม บทความควรออกมารูปแบบไหน
- เหมือนเป็นการเขียน layout ย้อนกลับมาจาก content อีกทีเลยทำให้เกิดประเดนนี้
- เคสนี้เห็นได้ชัดเลยมันจะไม่เกิดคำถามของต้าถ้า CF layout กันแล้ว @anakornk
- แต่ไหนๆ ทำกันมาแล้วพี่คิดว่าบทความนี้เป็นเหมือนบทความที่แตกย่อยออกมาจาก Hash Function เพื่อเป็น ref ว่า Hash Function นั้นมีตัวอย่างอะไรหลักๆ บ้างที่เป็นที่นิยมใช้ในปัจจุบัน และเทียบให้ดูหน่อยๆ ว่าแต่ละตัวมันต่างกันยังไง

---

<div class="post-metadata">

**Author:** ![Namtan](https://discuss.hashpire.io/user_avatar/discuss.hashpire.io/namtan/32/23_2.png) [@Namtan](https://discuss.hashpire.io/u/Namtan)\
**Post date:** [October 12, 2022, 7:00am UTC](https://discuss.hashpire.io/t/hash-function/376/17 "2022-10-12T07:00:08Z")

</div>



---

<div class="post-metadata">

**Author:** ![anakornk](https://discuss.hashpire.io/user_avatar/discuss.hashpire.io/anakornk/32/3_2.png) [@anakornk](https://discuss.hashpire.io/u/anakornk)\
**Post date:** [October 12, 2022, 7:26am UTC](https://discuss.hashpire.io/t/hash-function/376/18 "2022-10-12T07:26:53Z")

</div>

> [@Namtan](#):
>
> - SHA (Secure Hash Algorithm) ได้รับการออกแบบโดย NIST & NSA ในปี 1993 ก่อนจะพบจุดอ่อนหลายประการและได้แก้ไขในปี 1995 เป็น SHA-1 เป็นมาตรฐานในสหรัฐอเมริกาสำหรับใช้กับ DSA Signature Scheme สามารถสร้างค่าแฮช (Hash Value) ได้ 160 bit
> - SHA-2 สร้างขึ้นเพื่ออุดช่องโหว่ของ SHA-1 ดังนั้นจึงมีโครงสร้างและรายละเอียดที่คล้ายกับ SHA-1 นอกจากนั้นยังมีการเพิ่ม วิธีการแฮชขึ้นมาอีก 3 แบบ คือ SHA-256, SHA-384, SHA-512 เป็นมาตรฐานที่ใช้กันอย่างแพร่หลายในปัจจุบัน อย่างเช่น Bitcoin ที่ใช้ SHA-256 (เราสามารถรู้ขนาด Output ของ SHA ได้จากการดูตัวเลขที่ต่อหลัง เช่น SHA-256 คือ สามารถสร้างค่าแฮชได้ 256 bit)
> 
> Hash Function อย่าง Message Digest Algorithm (MD5) หรือ Secure Hash Algorithm เช่น SHA-1, SHA-2

งงกับ SHA, SHA-2, Secure Hash Algorithm

---

<div class="post-metadata">

**Author:** ![anakornk](https://discuss.hashpire.io/user_avatar/discuss.hashpire.io/anakornk/32/3_2.png) [@anakornk](https://discuss.hashpire.io/u/anakornk)\
**Post date:** [October 12, 2022, 7:27am UTC](https://discuss.hashpire.io/t/hash-function/376/19 "2022-10-12T07:27:16Z")

</div>



---

<div class="post-metadata">

**Author:** ![Namtan](https://discuss.hashpire.io/user_avatar/discuss.hashpire.io/namtan/32/23_2.png) [@Namtan](https://discuss.hashpire.io/u/Namtan)\
**Post date:** [October 13, 2022, 8:52am UTC](https://discuss.hashpire.io/t/hash-function/376/20 "2022-10-13T08:52:00Z")

</div>



---

<div class="post-metadata">

**Author:** ![supanut](https://discuss.hashpire.io/user_avatar/discuss.hashpire.io/supanut/32/22_2.png) [@supanut](https://discuss.hashpire.io/u/supanut)\
**Post date:** [October 17, 2022, 10:27am UTC](https://discuss.hashpire.io/t/hash-function/376/21 "2022-10-17T10:27:39Z")

</div>

> [@Namtan](#):
>
> แต่ในวันนี้เราจะยกตัวอย่าง Hash Function ที่เป็นที่รู้จักและมีการใช้อย่างแพร่หลาย 3 มาตรฐาน ได้แก่

@Namtan อันนี้ยังไม่ได้แก้ปะครับ ถ้าปรับตรงนี้ใหม่ให้สอดคล้องกับเนื้อหาด้านล่าง ที่มีแค่ MD5 กับ SHA น่าจะโอเคแล้วครับ ถือว่าพี่ CF ล่วงหน้าไปเลยสามารถแจ้งปันทำกราฟฟิกต่อได้เลยครับ

@anakornk มีไรเพิ่มเติมไหมครับพี่ว่าโอเคแล้วนะครับเรื่อง SHA ที่แบ่งเป็นกลุ่ม แล้วมี SHA-0 ถึง 3 เป็นตัวอย่างในกลุ่ม SHA

[Next page](https://discuss.hashpire.io/t/hash-function/376.md?page=2)
