]> Cypherpunks repositories - gostls13.git/commit
crypto/ed25519: outline NewKeyFromSeed and Sign
authorlukechampine <luke.champine@gmail.com>
Fri, 20 Sep 2019 17:25:07 +0000 (17:25 +0000)
committerDaniel Martí <mvdan@mvdan.cc>
Tue, 24 Sep 2019 10:23:40 +0000 (10:23 +0000)
commit2dfff3633b839a913bd2f427cd362ab07194b052
treebcae00f745f1ca45facecd16fd468fa77b8290d5
parent39ab8db914712dfc4898290f40b41dc8ea2c55a9
crypto/ed25519: outline NewKeyFromSeed and Sign

This allows the returned key/signature to be stack-allocated where possible.

name              old time/op    new time/op    delta
NewKeyFromSeed-4    61.8µs ± 8%    57.2µs ±11%      ~     (p=0.056 n=5+5)
Signing-4           56.6µs ± 3%    67.8µs ±38%      ~     (p=1.000 n=5+5)

name              old alloc/op   new alloc/op   delta
NewKeyFromSeed-4     64.0B ± 0%      0.0B       -100.00%  (p=0.008 n=5+5)
Signing-4             512B ± 0%      448B ± 0%   -12.50%  (p=0.008 n=5+5)

name              old allocs/op  new allocs/op  delta
NewKeyFromSeed-4      1.00 ± 0%      0.00       -100.00%  (p=0.008 n=5+5)
Signing-4             6.00 ± 0%      5.00 ± 0%   -16.67%  (p=0.008 n=5+5)

Change-Id: I7dc6a1b8a483c4b213f380ac7c30cefc5caca0f9
GitHub-Last-Rev: 0dd2e0f93e9cd1410760544be638238f18fa5cd4
GitHub-Pull-Request: golang/go#34357
Reviewed-on: https://go-review.googlesource.com/c/go/+/195980
Reviewed-by: Filippo Valsorda <filippo@golang.org>
Run-TryBot: Filippo Valsorda <filippo@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/crypto/ed25519/ed25519.go
src/crypto/ed25519/ed25519_test.go