[mirror] Go supplementary cryptography libraries
Branch: master
Clone or download
mengzhuo and FiloSottile internal/chacha20: add SIMD implementation on arm64
Inspired by Vectorization of ChaCha Stream Cipher
https://eprint.iacr.org/2013/759.pdf

name            old time/op    new time/op    delta
ChaCha20/32        690ns ± 0%     872ns ± 0%   +26.38%  (p=0.000 n=10+10)
ChaCha20/63        750ns ± 0%     987ns ± 0%   +31.53%  (p=0.000 n=10+10)
ChaCha20/64        674ns ± 0%     879ns ± 0%   +30.42%  (p=0.000 n=8+10)
ChaCha20/256      2.28µs ± 0%    0.82µs ± 0%   -64.13%  (p=0.000 n=10+10)
ChaCha20/1024     8.64µs ± 0%    2.92µs ± 0%   -66.15%  (p=0.000 n=9+9)
ChaCha20/1350     11.9µs ± 0%     4.5µs ± 0%   -62.51%  (p=0.000 n=10+8)
ChaCha20/65536     554µs ± 0%     181µs ± 0%   -67.33%  (p=0.000 n=10+10)

name            old speed      new speed      delta
ChaCha20/32     46.3MB/s ± 0%  36.7MB/s ± 0%   -20.87%  (p=0.000 n=10+9)
ChaCha20/63     83.9MB/s ± 0%  63.8MB/s ± 0%   -23.97%  (p=0.000 n=10+10)
ChaCha20/64     94.9MB/s ± 0%  72.8MB/s ± 0%   -23.31%  (p=0.000 n=10+10)
ChaCha20/256     112MB/s ± 0%   312MB/s ± 0%  +178.74%  (p=0.000 n=10+10)
ChaCha20/1024    119MB/s ± 0%   350MB/s ± 0%  +195.31%  (p=0.000 n=10+9)
ChaCha20/1350    114MB/s ± 0%   303MB/s ± 0%  +166.73%  (p=0.000 n=8+8)
ChaCha20/65536   118MB/s ± 0%   362MB/s ± 0%  +206.12%  (p=0.000 n=10+10)

Updates golang/go#22809
Change-Id: I487487faa2ae4ff29de6fd8eb1317740c2939c10
Reviewed-on: https://go-review.googlesource.com/c/107628
Reviewed-by: Filippo Valsorda <filippo@golang.org>
Latest commit 74369b4 Feb 10, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
acme acme: support IP address authorization type Jan 30, 2019
argon2 crypto/{blake2b,blake2s,argon2,chacha20poly1305}: replace CPU feature… Apr 30, 2018
bcrypt bcrypt: benchmark defaults Oct 30, 2018
blake2b blake2b: fix comments in grammar Jan 22, 2019
blake2s all: fix typos Oct 29, 2018
blowfish all: use HTTPS for links that support it Jun 29, 2017
bn256 bn256: fix gfp12 MulScalar Jan 2, 2019
cast5 crypto: add import comments. Dec 9, 2014
chacha20poly1305 chacha20poly1305: use x/sys/cpu feature variables directly Aug 20, 2018
cryptobyte cryptobyte: fix typo in test Nov 26, 2018
curve25519 curve25519: mask high bit when loading group point Feb 8, 2019
ed25519 ed25519: actually be compatible with RFC 8032 May 31, 2018
hkdf hkdf: add Extract and Expand Oct 25, 2018
internal internal/chacha20: add SIMD implementation on arm64 Feb 11, 2019
md4 md4: move the example to the right directory Jul 20, 2017
nacl all: fix ineffectual assignments Jan 31, 2019
ocsp all: fix ineffectual assignments Jan 31, 2019
openpgp all: fix ineffectual assignments Jan 31, 2019
otr all: fix ineffectual assignments Jan 31, 2019
pbkdf2 pbkdf2: add benchmarks Dec 19, 2017
pkcs12 pkcs12: add a note suggesting ToPEM for multiple certificates/keys Jan 31, 2019
poly1305 poly1305: add additional test cases May 14, 2018
ripemd160 all: fix typos Oct 29, 2018
salsa20 internal/subtle: add Any/InexactOverlap (new package) and apply them … Jun 13, 2018
scrypt all: fix typos Oct 29, 2018
sha3 sha3: add support for Keccak-512 Jan 3, 2019
ssh all: fix ineffectual assignments Jan 31, 2019
tea all: fix errors reported by vet, golint Nov 28, 2017
twofish all: use HTTPS for links that support it Jun 29, 2017
xtea xtea: comment cleanup Mar 22, 2018
xts internal/subtle: add Any/InexactOverlap (new package) and apply them … Jun 13, 2018
.gitattributes crypto: copying .gitattributes to all subrepositories Dec 23, 2014
.gitignore convert .hgignore to .gitignore. Dec 7, 2014
AUTHORS all: use HTTPS for links that support it Jun 29, 2017
CONTRIBUTING.md CONTRIBUTING.md: remove note about not accepting Pull Requests Mar 14, 2018
CONTRIBUTORS all: use HTTPS for links that support it Jun 29, 2017
LICENSE LICENSE: add Mar 17, 2012
PATENTS go.crypto: add PATENTS file to the subrepo. Apr 16, 2012
README.md README: add improvements Jul 19, 2017
codereview.cfg crypto: add codereview.cfg Mar 18, 2015

README.md

Go Cryptography

This repository holds supplementary Go cryptography libraries.

Download/Install

The easiest way to install is to run go get -u golang.org/x/crypto/.... You can also manually git clone the repository to $GOPATH/src/golang.org/x/crypto.

Report Issues / Send Patches

This repository uses Gerrit for code changes. To learn how to submit changes to this repository, see https://golang.org/doc/contribute.html.

The main issue tracker for the crypto repository is located at https://github.com/golang/go/issues. Prefix your issue with "x/crypto:" in the subject line, so it is easy to find.

Note that contributions to the cryptography package receive additional scrutiny due to their sensitive nature. Patches may take longer than normal to receive feedback.