go.crypto/curve25519: add package.

This consists of ~2000 lines of amd64 assembly and a, much slower,
generic Go version in curve25519.go. The assembly has been ported from
djb's public domain sources and the only semantic alterations are to
deal with Go's split stacks.

R=rsc
CC=golang-dev
https://golang.org/cl/5786045
This commit is contained in:
Adam Langley
2012-03-12 10:59:04 -04:00
parent 36a967d321
commit 124e52db8d
10 changed files with 2343 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
// Copyright 2012 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.
// This code was translated into a form compatible with 6a from the public
// domain sources in SUPERCOP: http://bench.cr.yp.to/supercop.html
DATA ·REDMASK51(SB)/8, $0x0007FFFFFFFFFFFF
GLOBL ·REDMASK51(SB), $8
DATA ·_121666_213(SB)/8, $996687872
GLOBL ·_121666_213(SB), $8
DATA ·_2P0(SB)/8, $0xFFFFFFFFFFFDA
GLOBL ·_2P0(SB), $8
DATA ·_2P1234(SB)/8, $0xFFFFFFFFFFFFE
GLOBL ·_2P1234(SB), $8