p384

package module
v0.0.0-...-30d7a7b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 21, 2018 License: BSD-3-Clause Imports: 4 Imported by: 0

README

Package p384 is an AMD64-optimized P-384 implementation.

The majority of elliptic curve operations done during certificate chain validation are on P-384, but P-384 implementations are unoptimized (unlike P-256). I observed code that does a lot of chain validations easily spending more than two-thirds of its time in P-384 ScalarMult, so I wrote this.

// Standard library implementation.
BenchmarkP384-4             	     300	   4444328 ns/op

// Our implementation.
BenchmarkScalarMult-4       	    3000	    410029 ns/op
BenchmarkScalarBaseMult-4   	   10000	    179281 ns/op
BenchmarkCombinedMult-4     	    3000	    513776 ns/op

Documentation

Overview

Package p384 is an AMD64-optimized P-384 implementation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Curve

type Curve struct{}

func (*Curve) Add

func (c *Curve) Add(x1, y1, x2, y2 *big.Int) (x, y *big.Int)

func (*Curve) CombinedMult

func (c *Curve) CombinedMult(bigX, bigY *big.Int, baseScalar, scalar []byte) (x, y *big.Int)

func (*Curve) Double

func (c *Curve) Double(x1, y1 *big.Int) (x, y *big.Int)

func (*Curve) IsOnCurve

func (c *Curve) IsOnCurve(X, Y *big.Int) bool

func (*Curve) Params

func (c *Curve) Params() *elliptic.CurveParams

func (*Curve) ScalarBaseMult

func (c *Curve) ScalarBaseMult(k []byte) (x, y *big.Int)

func (*Curve) ScalarMult

func (c *Curve) ScalarMult(x1, y1 *big.Int, k []byte) (x, y *big.Int)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL