File: curve_amd64.go

package info (click to toggle)
golang-github-cloudflare-circl 1.0.0%2B20200724-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 5,788 kB
  • sloc: asm: 19,418; ansic: 1,289; makefile: 54
file content (30 lines) | stat: -rw-r--r-- 647 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// +build amd64,!purego

package x25519

import (
	"golang.org/x/sys/cpu"

	fp "github.com/cloudflare/circl/math/fp25519"
)

var hasBmi2Adx = cpu.X86.HasBMI2 && cpu.X86.HasADX

var _ = hasBmi2Adx

func double(x, z *fp.Elt)             { doubleAmd64(x, z) }
func diffAdd(w *[5]fp.Elt, b uint)    { diffAddAmd64(w, b) }
func ladderStep(w *[5]fp.Elt, b uint) { ladderStepAmd64(w, b) }
func mulA24(z, x *fp.Elt)             { mulA24Amd64(z, x) }

//go:noescape
func ladderStepAmd64(w *[5]fp.Elt, b uint)

//go:noescape
func diffAddAmd64(w *[5]fp.Elt, b uint)

//go:noescape
func doubleAmd64(x, z *fp.Elt)

//go:noescape
func mulA24Amd64(z, x *fp.Elt)