Based on the SIMD algorithm described in: ChaCha, a variant of Salsa20 by Daniel J. Bernstein https://cr.yp.to/chacha/chacha-20080128.pdf Requires the vector facility (vx). name old speed new speed delta ChaCha20/32 178MB/s ± 0% 174MB/s ± 0% -2.10% (p=0.000 n=9+10) ChaCha20/63 341MB/s ± 0% 337MB/s ± 0% -1.16% (p=0.000 n=10+10) ChaCha20/64 367MB/s ± 0% 335MB/s ± 0% -8.73% (p=0.000 n=10+10) ChaCha20/256 404MB/s ± 0% 1448MB/s ± 0% +258.61% (p=0.000 n=9+10) ChaCha20/1024 410MB/s ± 0% 1568MB/s ± 0% +282.73% (p=0.000 n=9+10) ChaCha20/1350 393MB/s ± 0% 1389MB/s ± 0% +253.58% (p=0.000 n=10+10) ChaCha20/65536 414MB/s ± 0% 1634MB/s ± 0% +294.79% (p=0.000 n=10+10) Change-Id: I9a600fb5ae8ee3f3b81ae6b01cff139c1272d684 Reviewed-on: https://go-review.googlesource.com/35842 Run-TryBot: Michael Munday <mike.munday@ibm.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
17 lines
332 B
Go
17 lines
332 B
Go
// Copyright 2018 The Go Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
// +build !s390x gccgo appengine
|
|
|
|
package chacha20
|
|
|
|
const (
|
|
bufSize = 64
|
|
haveAsm = false
|
|
)
|
|
|
|
func (*Cipher) xorKeyStreamAsm(dst, src []byte) {
|
|
panic("not implemented")
|
|
}
|