# std/crypto: add the bcrypt password hashing function · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/1b4ab749cffeff146b21fb0f6d30a5b8d2186765)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: 1b4ab749cffeff146b21fb0f6d30a5b8d2186765

Requested commit: 1b4ab749cffeff146b21fb0f6d30a5b8d2186765

Commit: 1b4ab749cffeff146b21fb0f6d30a5b8d2186765

Tree: bc37f18bfe60551721551a66905bf36ce130b7cd

Author: Frank Denis

Committer: Andrew Kelley

## Message

```
std/crypto: add the bcrypt password hashing function

The bcrypt function intentionally requires quite a lot of CPU cycles
to complete.

In addition to that, not having its full state constantly in the
CPU L1 cache causes a massive performance drop.

These properties slow down brute-force attacks against low-entropy
inputs (typically passwords), and GPU-based attacks get little
to no advantages over CPUs.

```

## Parents

- [2a0a11aa6632aa3180ebb1c528b0d1fcb970d5ff](https://git.cafe/gitcafe/zig/commit/2a0a11aa6632aa3180ebb1c528b0d1fcb970d5ff?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/1b4ab749cffeff146b21fb0f6d30a5b8d2186765?format=markdown)
