This repository has been archived by the owner on Apr 18, 2024. It is now read-only.
forked from tendermint/tendermint
-
Notifications
You must be signed in to change notification settings - Fork 3
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 tasks
Yawning
force-pushed
the
yawning/wip/curve25519-voi
branch
from
May 11, 2021 14:16
53b761d
to
2838c38
Compare
Yawning
force-pushed
the
yawning/wip/curve25519-voi
branch
3 times, most recently
from
May 11, 2021 14:23
611b14c
to
699d768
Compare
Yawning
force-pushed
the
yawning/wip/curve25519-voi
branch
from
May 20, 2021 15:52
699d768
to
fde9315
Compare
Yawning
force-pushed
the
yawning/wip/curve25519-voi
branch
5 times, most recently
from
June 2, 2021 11:25
cf56be3
to
aaa66e0
Compare
Yawning
force-pushed
the
yawning/wip/curve25519-voi
branch
3 times, most recently
from
June 9, 2021 09:13
8710280
to
f415212
Compare
Yawning
force-pushed
the
yawning/wip/curve25519-voi
branch
4 times, most recently
from
June 25, 2021 09:34
7a6e3a0
to
1b5655f
Compare
The old benchmark measured: * `sigsCount` GenPrivKey + Sign * `sigsCount` BatchVerifier.Add * `b.N/sigsCount` BatchVerifier.Verify (majority of the runtime). This is all sorts of nonsensical, especially give that there can be a non-trivial amount of overhead in `BatchVerifier.Add`. The rewritten benchmark measures: * `b.N/sigsCount` NewBatchVerifier * `b.N/sigsCount * sigsCount` BatchVerifier.Add * `b.N/sigsCount` BatchVerifier.Verify This is far more sensible as it better reflects the per-signature combined cost of instantiating the batch verifier, adding a signature to the batch, and the verify.
Having to redo quite a bit of computation in the event of a batch failure if the caller is actually interested in which signature failed, is rather sub-optimal. Change the batch verification interface to expose a one-shot batch verify + fallback call, so that sensible libraries can handle this case faster. This commit also leverages the failure information so that validation will only ever call one of `verifyCommitBatch` or `verifyCommitSingle`.
Switch the sr25519 implementation to curve25519-voi for better performance, and code quality. Performance comparisions should still be taken with a grain of salt for the following reasons: * curve25519-voi's sr25519 support can use more optimization. * go-schnorrkel cuts corners in places by: * Not doing delinearization at all when verifying batches * Not using the secret key nonce at all when signing. * Not sampling random scalars at all when verifying batches, unless the import is bumped. WARNING: This is a breaking change as the original tendermint sr25519 support expands the MiniSecretKey twice, while this implementation only does it once.
Yawning
force-pushed
the
yawning/wip/curve25519-voi
branch
from
June 26, 2021 03:54
1b5655f
to
c5e0263
Compare
Since I had to fork gtank's to add a transcript RNG, and ended up rewriting the STROBE implementation for my fork, the code might as well use it for every use of merlin as there are a number of improvements, the most notable being a dramatic reduction in the number of allocations done for the various STROBE calls.
Yawning
force-pushed
the
yawning/wip/curve25519-voi
branch
from
June 26, 2021 16:44
c5e0263
to
744d486
Compare
This has been merged into upstream as tendermint@c5cc3c8 so we will get this for free. I'll deal adding our specific domain separation flavor when we rebase the rest of our patches. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Can't be bothered disabling turboboost, or running multiple iterations.
TODO:
Re-integrate all the oasis specific bits on top of this branch.