You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 3b528c4
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: README.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -436,6 +436,7 @@ This category also contains `ascii85`, `adobe`, `[x]btoa`, `zeromq` with the `ba
436
436
-[X]`oracle10`: legacy Oracle 10g password hash (parametrized with the user name) ; `oracle11` for the 11g version
437
437
-[X]`phpass`: portable PHP password hash (parametrized with the iteration count ; used e.g. by WordPress)
438
438
-[X]`ripemd160`: aka RIPEMD-160 (relies on `hashlib` when available, pure Python otherwise)
439
+
-[X]`scrypt`: aka scrypt (RFC 7914), parameterized with its cost ln, block size r and parallelism p (relies on `hashlib`)
439
440
-[X]`sha`: aka Secure Hash Algorithms ; includes SHA0, SHA1, 224, 256, 384, 512 (Python2/3) but also SHA3-224, -256, -384 and -512 (Python 3 only ; relies on `hashlib`)
440
441
-[X]`shake`: aka SHAKE hashing (Python 3 only ; relies on `hashlib`)
441
442
-[X]`snefru`: aka Snefru (Merkle's hash function) in 32 to 480 bits, with 2 to 8 passes
Copy file name to clipboardExpand all lines: docs/pages/enc/hashing.md
+13Lines changed: 13 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -362,6 +362,19 @@ This one-way transformation function, used e.g. in Bitcoin addresses, relies on
362
362
'f0c90bd665512fc158f3c47d6de76b58783c404c'
363
363
```
364
364
365
+
### Scrypt
366
+
367
+
These one-way transformation functions compute the scrypt password hash ([RFC 7914](https://datatracker.ietf.org/doc/html/rfc7914)), a memory-hard key derivation function. The result is written in the modular crypt format `$scrypt$ln=...,r=...,p=...$salt$digest` (as [passlib](https://passlib.readthedocs.io/en/stable/lib/passlib.hash.scrypt.html) does). The cost parameters are given with the codec name, in the order ln (the base-2 logarithm of the CPU/memory cost N), r (the block size) and p (the parallelism) ; they default to ln=16, r=8 and p=1. A random salt is generated each time. It relies on [`hashlib`](https://docs.python.org/3/library/hashlib.html).
0 commit comments