SIMD implementation based the on the algorithm outlined in: NEON crypto, Daniel J. Bernstein and Peter Schwabe https://cryptojedi.org/papers/neoncrypto-20120320.pdf and as modified for VMSL as described in Accelerating Poly1305 Cryptographic Message Authentication on the z14 O'Farrell, Gadriwala, et al, CASCON 2017, p48-55 https://ibm.ent.box.com/s/jf9gedj0e9d2vjctfyh186shaztavnht name old new delta 64 485MB/s 1315 MB/s +171.58% 1K 607MB/s 4352 MB/s +616.97% 64Unaligned 485MB/s 1373 MB/s +183.09% 1KUnaligned 606MB/s 4286 MB/s +607.26% 2M 607MB/s 5529 MB/s +810.87% Change-Id: I31ccc25ced09180d99ea5c9233f0dcdc8666fc98 Reviewed-on: https://go-review.googlesource.com/110297 Run-TryBot: Michael Munday <mike.munday@ibm.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Michael Munday <mike.munday@ibm.com>
15 lines
539 B
Go
15 lines
539 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,!go1.11 !arm,!amd64,!s390x gccgo appengine nacl
|
|
|
|
package poly1305
|
|
|
|
// Sum generates an authenticator for msg using a one-time key and puts the
|
|
// 16-byte result into out. Authenticating two different messages with the same
|
|
// key allows an attacker to forge messages at will.
|
|
func Sum(out *[TagSize]byte, msg []byte, key *[32]byte) {
|
|
sumGeneric(out, msg, key)
|
|
}
|