Bcrypt: Perbedaan antara revisi
Impor teks terkontrol dari Wikipedia bahasa Indonesia; revisi 28365321; atribusi sumber disertakan. |
Presentation V4: sitasi, referensi, Math, Wikimedia Commons, dan atribusi |
||
| Baris 1: | Baris 1: | ||
'''bcrypt''' merupakan fungsi hashing kata sandi yang dirancang oleh dua orang peneliti keamanan komputer [https://www.provos.org/ Niels Provos] dan David Mazières, cipher [[Blowfish (penyandian)|Blowfish]] adalah dasar pembuatan bcrypt, dan disajikan di USENIX pada tahun 1999. bcrypt dapat melindungi dari serangan [[Tabel pelangi|rainbow table]] dengan mengunakan [[Salt (kriptografi)|salt]], selain itu, bcrypt adalah fungsi adaptif: seiring waktu, jumlah iterasi dapat ditingkatkan untuk membuatnya lebih lambat, sehingga tetap aman terhadap serangan pencarian brute-force bahkan dengan meningkatnya daya komputasi. | '''bcrypt''' merupakan fungsi hashing kata sandi yang dirancang oleh dua orang peneliti keamanan komputer [https://www.provos.org/ Niels Provos] dan David Mazières, cipher [[Blowfish (penyandian)|Blowfish]] adalah dasar pembuatan bcrypt, dan disajikan di USENIX pada tahun 1999.<ref>Niels Provos. [http://www.usenix.org/events/usenix99/provos/provos_html/node1.html A Future-Adaptable Password Scheme]. ''Proceedings of 1999 USENIX Annual Technical Conference''. 1999. hlm. 81–92.</ref> bcrypt dapat melindungi dari serangan [[Tabel pelangi|rainbow table]] dengan mengunakan [[Salt (kriptografi)|salt]], selain itu, bcrypt adalah fungsi adaptif: seiring waktu, jumlah iterasi dapat ditingkatkan untuk membuatnya lebih lambat, sehingga tetap aman terhadap serangan pencarian brute-force bahkan dengan meningkatnya daya komputasi. | ||
Fungsi bcrypt merupakan algoritma hash password dasar untuk [[OpenBSD]] | Fungsi bcrypt merupakan algoritma hash password dasar untuk [[OpenBSD]] <ref>[//cvsweb.openbsd.org/cgi-bin/cvsweb/src/lib/libc/crypt/bcrypt.c Commit of first work to repo]. 13 Feb 1997.</ref> dan sistem lain termasuk beberapa [[distribusi Linux]] seperti SUSE Linux .<ref>[https://www.suse.com/support/security/advisories/2011_35_blowfish.html SUSE Security Announcement: (SUSE-SA:2011:035)]. 23 August 2011.</ref> | ||
bcrypt dapat diimplementasikan pada bahasa pemrograman PHP, Python, JavaScript, C, C ++, C #, Go, Java, Elixir, Perl, Ruby dan bahasa lain | bcrypt dapat diimplementasikan pada bahasa pemrograman PHP, Python, JavaScript, C, C ++, C #, Go,<ref>[https://godoc.org/golang.org/x/crypto/bcrypt Package bcrypt]. ''godoc.org''.</ref> Java,<ref>[http://www.mindrot.org/projects/jBCrypt/ jBCrypt - strong password hashing for Java]. ''www.mindrot.org''.</ref><ref>[https://github.com/patrickfav/bcrypt bcrypt - A Java standalone implementation of the bcrypt password hash function]. ''github.com''.</ref> Elixir,<ref>David Whitlock. [https://github.com/riverrun/bcrypt_elixir Bcrypt Elixir: Bcrypt password hashing algorithm for Elixir]. ''GitHub''. riverrun.</ref> Perl,<ref>Donald Stufft. [https://github.com/pyca/bcrypt/ bcrypt: Modern password hashing for your software and your servers].</ref> Ruby dan bahasa lain | ||
== Algortima == | == Algortima == | ||
Algoritma bcrypt adalah hasil dari enkripsi teks ''"OrpheanBeholderScryDoubt"'' 64 kali menggunakan [[Blowfish (penyandian)|Blowfish]] . Dalam bcrypt fungsi biasa key setup pada Blowfish digantikan dengan fungsi expensive key setup (EksBlowfishSetup) | Algoritma bcrypt adalah hasil dari enkripsi teks ''"OrpheanBeholderScryDoubt"'' 64 kali menggunakan [[Blowfish (penyandian)|Blowfish]] . Dalam bcrypt fungsi biasa key setup pada Blowfish digantikan dengan fungsi expensive key setup (EksBlowfishSetup) | ||
'''Function''' bcrypt | '''Function''' bcrypt | ||
'''Input:''' | '''Input:''' | ||
| Baris 12: | Baris 12: | ||
salt: array of Bytes (16 bytes) random salt | salt: array of Bytes (16 bytes) random salt | ||
password: array of Bytes (1..72 bytes) UTF-8 encoded password | password: array of Bytes (1..72 bytes) UTF-8 encoded password | ||
'''Output:''' | '''Output:''' | ||
hash: array of Bytes (24 bytes) | hash: array of Bytes (24 bytes) | ||
//Initialize Blowfish state with expensive key setup algorithm | //Initialize Blowfish state with expensive key setup algorithm | ||
''state'' <- EksBlowfishSetup(''cost'', ''salt'', ''password'') | ''state'' <- EksBlowfishSetup(''cost'', ''salt'', ''password'') | ||
//Repeatedly encrypt the text "OrpheanBeholderScryDoubt" 64 times | //Repeatedly encrypt the text "OrpheanBeholderScryDoubt" 64 times | ||
| Baris 33: | Baris 33: | ||
salt: array of Bytes (16 bytes) random salt | salt: array of Bytes (16 bytes) random salt | ||
password: array of Bytes (1..72 bytes) UTF-8 encoded password | password: array of Bytes (1..72 bytes) UTF-8 encoded password | ||
'''Output:''' | '''Output:''' | ||
state: opaque BlowFish state structure | state: opaque BlowFish state structure | ||
| Baris 51: | Baris 51: | ||
salt: array of Bytes (16 bytes) random salt | salt: array of Bytes (16 bytes) random salt | ||
password: array of Bytes (1..72 bytes) UTF-8 encoded password | password: array of Bytes (1..72 bytes) UTF-8 encoded password | ||
'''Output:''' | '''Output:''' | ||
state: opaque BlowFish state structure | state: opaque BlowFish state structure | ||
| Baris 78: | Baris 78: | ||
== Referensi == | == Referensi == | ||
<references /> | |||
== Sumber dan atribusi == | == Sumber dan atribusi == | ||
Konten artikel ini diadaptasi dari [https://id.wikipedia.org/w/index.php?title=Bcrypt&oldid=28365321 Wikipedia bahasa Indonesia], revisi 28365321 (2025-11-07T03:45:38Z), yang tersedia berdasarkan lisensi Creative Commons Atribusi-BerbagiSerupa (CC BY-SA). Mohon gunakan konten ini secara bijak serta sesuai dengan ketentuan lisensi yang berlaku. | Konten artikel ini diadaptasi dari [https://id.wikipedia.org/w/index.php?title=Bcrypt&oldid=28365321 Wikipedia bahasa Indonesia], revisi 28365321 (2025-11-07T03:45:38Z), yang tersedia berdasarkan lisensi Creative Commons Atribusi-BerbagiSerupa (CC BY-SA). Mohon gunakan konten ini secara bijak serta sesuai dengan ketentuan lisensi yang berlaku. | ||
<!-- WIKI_UNISSULA_PRESENTATION_V4 --> | |||
Revisi terkini sejak 24 Agustus 2026 14.07
bcrypt merupakan fungsi hashing kata sandi yang dirancang oleh dua orang peneliti keamanan komputer Niels Provos dan David Mazières, cipher Blowfish adalah dasar pembuatan bcrypt, dan disajikan di USENIX pada tahun 1999.[1] bcrypt dapat melindungi dari serangan rainbow table dengan mengunakan salt, selain itu, bcrypt adalah fungsi adaptif: seiring waktu, jumlah iterasi dapat ditingkatkan untuk membuatnya lebih lambat, sehingga tetap aman terhadap serangan pencarian brute-force bahkan dengan meningkatnya daya komputasi.
Fungsi bcrypt merupakan algoritma hash password dasar untuk OpenBSD [2] dan sistem lain termasuk beberapa distribusi Linux seperti SUSE Linux .[3]
bcrypt dapat diimplementasikan pada bahasa pemrograman PHP, Python, JavaScript, C, C ++, C #, Go,[4] Java,[5][6] Elixir,[7] Perl,[8] Ruby dan bahasa lain
Algortima
Algoritma bcrypt adalah hasil dari enkripsi teks "OrpheanBeholderScryDoubt" 64 kali menggunakan Blowfish . Dalam bcrypt fungsi biasa key setup pada Blowfish digantikan dengan fungsi expensive key setup (EksBlowfishSetup)
Function bcrypt
Input:
cost: Number (4..31) log2(Iterations). e.g. 12 ==> 212 = 4,096 iterations
salt: array of Bytes (16 bytes) random salt
password: array of Bytes (1..72 bytes) UTF-8 encoded password
Output:
hash: array of Bytes (24 bytes)
//Initialize Blowfish state with expensive key setup algorithm state <- EksBlowfishSetup(cost, salt, password)
//Repeatedly encrypt the text "OrpheanBeholderScryDoubt" 64 times
ctext <- "OrpheanBeholderScryDoubt" //24 bytes ==> three 64-bit blocks
repeat (64)
ctext EncryptECB(state, ctext) //encrypt using standard Blowfish in ECB mode
//24-byte <- ctext is resulting password hash return Concatenate(cost, salt, ctext)
Expensive key setup
Algoritma bcrypt sangat bergantung pada algoritma key setup "Eksblowfish", berikut algoritmanya:
Function EksBlowfishSetup
Input:
cost: Number (4..31) log2(Iterations). e.g. 12 ==> 212 = 4,096 iterations
salt: array of Bytes (16 bytes) random salt
password: array of Bytes (1..72 bytes) UTF-8 encoded password
Output:
state: opaque BlowFish state structure
state <- InitialState()
state <- ExpandKey(state, salt, password)
repeat (2cost)
state <- ExpandKey(state, 0, password)
state <- ExpandKey(state, 0, salt)
return state
Expand key
Berikut algoritma fungsi ExpandKey
Function ExpandKey(state, salt, password)
Input:
state: Opaque BlowFish state structure Internally contains P-array and S-box entries
salt: array of Bytes (16 bytes) random salt
password: array of Bytes (1..72 bytes) UTF-8 encoded password
Output:
state: opaque BlowFish state structure
//Mix password into the internal P-array of state
for n <- 1 to 18 do
Pn <- Pn xor password[32(n-1)..32n-1] //treat the password as cyclic
//Encrypt state using the lower 8 bytes of salt, and store the 8 byte result in P1|P2 block <- Encrypt(state, salt[0..63]) P1 <- block[0..31] //lower 32-bits P2 <- block[32..63] //upper 32-bits
//Continue encrypting state with salt, and storing results in remaining P-array
for n <- 2 to 9 do
block <- Encrypt(state, block xor salt[64(n-1)..64n-1]) //encrypt using the current key schedule and treat the salt as cyclic
P2n-1 <- block[0..31] //lower 32-bits
P2n <- block[32..63] //upper 32-bits
//Mix encrypted state into the internal S-boxes of state
for i <- 1 to 4 do
for n <- 0 to 127 do
block <- Encrypt(state, block xor salt[64(n-1)..64n-1]) //as above
Si[2n] <- block[0..31] //lower 32-bits
Si[2n+1] <- block[32..63] //upper 32-bits
return state
Referensi
- ↑ Niels Provos. A Future-Adaptable Password Scheme. Proceedings of 1999 USENIX Annual Technical Conference. 1999. hlm. 81–92.
- ↑ Commit of first work to repo. 13 Feb 1997.
- ↑ SUSE Security Announcement: (SUSE-SA:2011:035). 23 August 2011.
- ↑ Package bcrypt. godoc.org.
- ↑ jBCrypt - strong password hashing for Java. www.mindrot.org.
- ↑ bcrypt - A Java standalone implementation of the bcrypt password hash function. github.com.
- ↑ David Whitlock. Bcrypt Elixir: Bcrypt password hashing algorithm for Elixir. GitHub. riverrun.
- ↑ Donald Stufft. bcrypt: Modern password hashing for your software and your servers.
Sumber dan atribusi
Konten artikel ini diadaptasi dari Wikipedia bahasa Indonesia, revisi 28365321 (2025-11-07T03:45:38Z), yang tersedia berdasarkan lisensi Creative Commons Atribusi-BerbagiSerupa (CC BY-SA). Mohon gunakan konten ini secara bijak serta sesuai dengan ketentuan lisensi yang berlaku.