# std/crypto: use NAF for multi-scalar edwards25519 multiplication · gitcafe/zig

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

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

Visibility: public

Requested revision: 9c2b014ea82fdfbb4b46ce789898623be450cca5

Requested commit: 9c2b014ea82fdfbb4b46ce789898623be450cca5

Commit: 9c2b014ea82fdfbb4b46ce789898623be450cca5

Tree: ff302856c34987cb8833d6324b76bbe5e1e039dd

Author: Frank Denis

Committer: Andrew Kelley

## Message

```
std/crypto: use NAF for multi-scalar edwards25519 multiplication

Transforming scalars to non-adjacent form shrinks the number of
precomputations down to 8, while still processing 4 bits at a time.

However, real-world benchmarks show that the transform is only
really useful with large precomputation tables and for batch
signature verification. So, do it for batch verification only.

```

## Parents

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

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