qicheng

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: May 9, 2024 License: Apache-2.0 Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Attack

func Attack(ks []*keys.RSA, ch chan error)

Attack implements the Qi Cheng attack.

Types

type Curve

type Curve struct {
	// contains filtered or unexported fields
}

Curve represents the curve y^2 = x^3 + a.

func NewCurve

func NewCurve(x, y *fmp.Fmpz, r *Integers) *Curve

NewCurve creates a curve.

func (*Curve) BInvariants

func (e *Curve) BInvariants(r *Integers)

BInvariants sets the B invariants (b2,4,6 and 8) on curve e in the ring r.

func (*Curve) Poly

func (e *Curve) Poly(n, x *fmp.Fmpz, r *Integers) *fmp.Fmpz

Poly calculates a set of polynomials in the univariate polynomial ring in x over the ring of integers r. Ported from sagemath source.

type Integers

type Integers struct {
	// contains filtered or unexported fields
}

Integers is a Ring of integers modulo n.

func NewIntegers

func NewIntegers(n *fmp.Fmpz) *Integers

NewIntegers constructs a new Ring of Integers with modulo n and returns it.

func (*Integers) RandomElement

func (i *Integers) RandomElement() *fmp.Fmpz

RandomElement chooses a random element in the Ring i.

Jump to

Keyboard shortcuts

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