go.crypto/{curve25519,poly1305,salsa20/salsa}: add //go:noescape annotation

R=golang-dev, rsc, agl
CC=golang-dev
https://golang.org/cl/7319045
This commit is contained in:
Shenghou Ma
2013-02-19 19:15:01 +08:00
parent db732cbcc6
commit bf5456312c
3 changed files with 21 additions and 0 deletions
+15
View File
@@ -9,10 +9,25 @@ package curve25519
// These functions are implemented in the .s files. The names of the functions
// in the rest of the file are also taken from the SUPERCOP sources to help
// people following along.
//go:noescape
func cswap(inout *[5]uint64, v uint64)
//go:noescape
func ladderstep(inout *[5][5]uint64)
//go:noescape
func freeze(inout *[5]uint64)
//go:noescape
func mul(dest, a, b *[5]uint64)
//go:noescape
func square(out, in *[5]uint64)
// mladder uses a Montgomery ladder to calculate (xr/zr) *= s.
+3
View File
@@ -7,6 +7,9 @@
package poly1305
// This function is implemented in poly1305_amd64.s
//go:noescape
func poly1305(out *[16]byte, m *byte, mlen uint64, key *[32]byte)
// Sum generates an authenticator for m using a one-time key and puts the
+3
View File
@@ -7,6 +7,9 @@
package salsa
// This function is implemented in salsa2020_amd64.s.
//go:noescape
func salsa2020XORKeyStream(out, in *byte, n uint64, nonce, key *byte)
// XORKeyStream crypts bytes from in to out using the given key and counters.