# std.crypto: handle the top bit in 25519.field.fromBytes64\(\) \(\#9435\) · gitcafe/zig

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

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

Visibility: public

Requested revision: b8a77f3d5931e0bf4f3c5544957dd36380367a43

Requested commit: b8a77f3d5931e0bf4f3c5544957dd36380367a43

Commit: b8a77f3d5931e0bf4f3c5544957dd36380367a43

Tree: 0983b03954e8020379656b8d3201173b8d9f35f3

Author: Frank Denis

Committer: Andrew Kelley

## Message

```
std.crypto: handle the top bit in 25519.field.fromBytes64() (#9435)

The only known use case for this is the hash-to-curve operation where the top bit is always cleared.

But the function is public, so let's make it work as one would expect in the general case.

Also fix the comment by the way.
```

## Parents

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

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