test_vectors

package
v0.0.0-...-8d1e695 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Preloaded test vector structs.
	JacobiAdditionVectors       []*JacobiAdditionVector
	JacobiDoublingVectors       []*JacobiDoublingVector
	JacobiPointVectors          []*JacobiPointVector
	AffineMultiplicationVectors []*AffineMultiplicationVector
	NegatedPointVectors         []*NegatedPointVector
	ECDSAVectors                []*ECDSAVector
)

Functions

This section is empty.

Types

type AffineMultiplicationVector

type AffineMultiplicationVector struct {
	X1, Y1 *big.Int
	K      *big.Int
	X2, Y2 *big.Int
}

AffineMultiplicationVector represents the result of multiplying an affine point by some scalar value k.

type ECDSAVector

type ECDSAVector struct {
	Hash       *big.Int
	PrivateKey *big.Int
	Nonce      *big.Int
	R, S       *big.Int
}

ECDSAVector represents a test vector for the elliptic curve digital signature algorithm on a given message hash with a private key and nonce.

type JacobiAdditionVector

type JacobiAdditionVector struct {
	X1, Y1, Z1 *big.Int
	X2, Y2, Z2 *big.Int
	X3, Y3, Z3 *big.Int
}

JacobiAdditionVector represents the result of a addition operation using Jacobian coordinates, where P1 + P2 = P3.

type JacobiDoublingVector

type JacobiDoublingVector struct {
	X1, Y1, Z1 *big.Int
	X3, Y3, Z3 *big.Int
}

JacobiDoublingVector represents the result of doubling a Jacobian point, where P1 * 2 = P3

type JacobiPointVector

type JacobiPointVector struct {
	JacobiX, JacobiY, JacobiZ *big.Int
	X, Y                      *big.Int
}

JacobiPointVector represents a Jacobian point and the affine coordinates it equates to. One affine point can be expressed in many different Jacobian points.

type NegatedPointVector

type NegatedPointVector struct {
	X, EvenY, OddY *big.Int
}

NegatedPointVector represents an affine X-coordinate and the two possible Y-coordinates on the curve at that X-coordinate: one even and one odd.

Jump to

Keyboard shortcuts

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