25 Temmuz 2018 Çarşamba

Password Based Key Derivation Functions - PBKDF

Giriş
Açıklaması şöyle. Verilen şifreyi hash haline getirmek veya simetrik algoritmalardan birisine (örneğin AES) girdi olarak sağlamak için kullanılır
Password hash algorithms have been invented for safe password hashing, also known as password based key derivation functions (PBKDF). The difference between a password hash and a PBKDF is mainly how the result is used: directly as a password hash to compare with a stored password hash or as symmetric key for input in a symmetric cipher or MAC algorithm.

Well known password hash algorithms are PBKDF2, bcrypt, scrypt and of course the already mentioned Argon2. The latter two also contain options for configuring memory hardness, to overcome hardware based attacks.
Şifreyi Hash'lemek
Şifreyi hash haline getirmek için kullanıldığına dair bir açıklama şöyle.
You should use a password hash (or PBKDF) such as one of the secure variants of Argon2 to store passwords, not a generic secure hash function.
Bir başka açıklama şöyle
In general cryptographic hashes such as MD5, SHA-1 or SHA-512 should not be used to directly hash a password. A password hash or PBKDF should be used. Examples are PBKDF2, bcrypt, scrypt and Argon2. These functions also take a salt and work factor to provide additional protection.
Şifreyi PBKDF veya türevi bir algoritmaya sokmadan direkt simetrik algoritmaya girdi olarak kullanmanın zararını açıklayan açıklama ise şöyle
The length of the password is limited by the length of the cypher() encryption algorithm. For instance, AES128 takes a 16-byte key. That means that your scheme couldn't accept passwords longer than 16 bytes, if we used AES128 encryption as cypher(). That's generally a bad idea -- artificial restrictions on the length of the password can only harm security.

PBKDF2 
Bu sınıf altta SHA-1 kullanıyor. Açıklaması şöyle.
The functions can often be configured using a hash function. For instance PBKDF2 requires a secure hash as configuration parameter, and it (kinda) defaults to SHA-1.
Java'da bu algoritmayı PBEKeySpec sınıfı gerçekleştiriyor.

PBKDF2 Client Independent Update Özelliği
Orijinal şifreyi bilmeden sadece iteration count'u artırarak daha güvenli bir hash üretmek mümkün değil. Bu özelliğe sahip algoritmalara Client Independent Update deniliyor. Açıklaması şöyle.
It is desirable to be able to compute a new password hash (with some higher security parameter) from the old one (with the old and weaker security parameter), without having to involve user interaction, i.e., without having to know the password. We call this feature a client-independent update of the password hash.

Hiç yorum yok:

Yorum Gönder