[mirror] Go supplementary cryptography libraries
Перейти к файлу
Garrett Bodley 38ed1bc0ec blake2s: port blake2s_amd64.s to Avo
This implementation utilizes the same registers found in the reference
implementation, aiming to produce a minimal semantic diff between the
Avo-generated output and the original hand-written assembly.

To verify the Avo implementation, the reference and Avo-generated
assembly files are fed to `go tool asm`, capturing the debug output into
corresponding temp files. The debug output contains supplementary
metadata (line numbers, instruction offsets, and source file references)
that must be removed in order to obtain a semantic diff of the two
files. This is accomplished via a small utility script written in awk.

Commands used to verify Avo output:

GOROOT=$(go env GOROOT)
ASM_PATH="blake2s/blake2s_amd64.s"
REFERENCE="b2d3a6a4b4d36521cd7f653879cf6981e7c5c340"

go tool asm -o /dev/null -I "$GOROOT"/src/runtime -debug \
  <(git cat-file -p "$REFERENCE:$ASM_PATH") \
  > /tmp/reference.s

go tool asm -o /dev/null -I "$GOROOT"/src/runtime -debug \
  "$ASM_PATH" \
  > /tmp/avo.s

normalize(){
  awk '{
    $1=$2=$3="";
    print substr($0,4)
  }'
}

diff <(normalize < /tmp/reference.s) <(normalize < /tmp/avo.s)

Change-Id: Ica8bf9f0b42dc93714aa54e783fa74ed19e6b9f4
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/601216
Reviewed-by: Roland Shoemaker <roland@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Filippo Valsorda <filippo@golang.org>
2024-09-04 20:34:20 +00:00
acme all: bump go.mod version and drop compatibility shims 2024-06-26 15:12:35 +00:00
argon2 argon2: Avo port of blamka_amd64.s 2024-09-04 20:33:49 +00:00
bcrypt all: bump go.mod version and drop compatibility shims 2024-06-26 15:12:35 +00:00
blake2b blake2b: drop Go 1.6, Go 1.8 compatibility 2023-11-27 17:26:05 +00:00
blake2s blake2s: port blake2s_amd64.s to Avo 2024-09-04 20:34:20 +00:00
blowfish all: bump go.mod version and drop compatibility shims 2024-06-26 15:12:35 +00:00
bn256 all: bump go.mod version and drop compatibility shims 2024-06-26 15:12:35 +00:00
cast5 all: bump go.mod version and drop compatibility shims 2024-06-26 15:12:35 +00:00
chacha20 x/crypto/chacha20: cleanup chacha_ppc64le.s 2024-03-26 21:57:38 +00:00
chacha20poly1305 all: bump go.mod version and drop compatibility shims 2024-06-26 15:12:35 +00:00
cryptobyte all: bump go.mod version and drop compatibility shims 2024-06-26 15:12:35 +00:00
curve25519 all: bump go.mod version and drop compatibility shims 2024-06-26 15:12:35 +00:00
ed25519 all: bump go.mod version and drop compatibility shims 2024-06-26 15:12:35 +00:00
hkdf all: bump go.mod version and drop compatibility shims 2024-06-26 15:12:35 +00:00
internal all: bump go.mod version and drop compatibility shims 2024-06-26 15:12:35 +00:00
md4 all: bump go.mod version and drop compatibility shims 2024-06-26 15:12:35 +00:00
nacl all: bump go.mod version and drop compatibility shims 2024-06-26 15:12:35 +00:00
ocsp all: bump go.mod version and drop compatibility shims 2024-06-26 15:12:35 +00:00
openpgp all: bump go.mod version and drop compatibility shims 2024-06-26 15:12:35 +00:00
otr all: bump go.mod version and drop compatibility shims 2024-06-26 15:12:35 +00:00
pbkdf2 all: bump go.mod version and drop compatibility shims 2024-06-26 15:12:35 +00:00
pkcs12 all: use math/bits.RotateLeft 2022-10-24 17:35:37 +00:00
poly1305 all: bump go.mod version and drop compatibility shims 2024-06-26 15:12:35 +00:00
ripemd160 all: bump go.mod version and drop compatibility shims 2024-06-26 15:12:35 +00:00
salsa20 all: bump go.mod version and drop compatibility shims 2024-06-26 15:12:35 +00:00
scrypt all: bump go.mod version and drop compatibility shims 2024-06-26 15:12:35 +00:00
sha3 sha3: Avo port of keccakf_amd64.s 2024-07-16 18:24:57 +00:00
ssh ssh/agent: ensure to not add duplicated keys 2024-08-06 16:07:48 +00:00
tea all: deprecate broken and legacy packages 2019-02-22 23:25:34 +00:00
twofish all: bump go.mod version and drop compatibility shims 2024-06-26 15:12:35 +00:00
x509roots x509roots/fallback: update bundle 2024-09-03 18:00:24 +00:00
xtea all: bump go.mod version and drop compatibility shims 2024-06-26 15:12:35 +00:00
xts all: bump go.mod version and drop compatibility shims 2024-06-26 15:12:35 +00:00
.gitattributes crypto: copying .gitattributes to all subrepositories 2014-12-23 06:54:52 +00:00
.gitignore gitignore: remove obsolete reference to .hgignore in comment 2020-03-20 18:11:02 +00:00
CONTRIBUTING.md CONTRIBUTING.md: remove note about not accepting Pull Requests 2018-03-14 18:02:59 +00:00
LICENSE LICENSE: update per Google Legal 2024-07-16 16:09:32 +00:00
PATENTS go.crypto: add PATENTS file to the subrepo. 2012-04-16 11:25:08 +10:00
README.md README.md: add badge to pkg.go.dev 2020-12-08 17:14:46 +00:00
codereview.cfg crypto: add codereview.cfg 2015-03-18 17:04:25 +00:00
go.mod go.mod: update golang.org/x dependencies 2024-08-06 15:38:17 +00:00
go.sum go.mod: update golang.org/x dependencies 2024-08-06 15:38:17 +00:00

README.md

Go Cryptography

Go Reference

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.