complexdh

package module
v0.0.0-...-843e0f0 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2017 License: MIT Imports: 2 Imported by: 1

README

complexdh

Complex number Modulo P diffie hellman functions

Documentation

Overview

This Package implements operations for large complex numbers modulo P. The functions can be used for a Diffie-Hellman key exchange, where P is usually a prime number.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ModulusGroup

type ModulusGroup struct {
	Modulus *big.Int
	Gr, Gi  *big.Int
}

func (*ModulusGroup) AsCurve

func (m *ModulusGroup) AsCurve() elliptic.Curve

Returns an elliptic.Curve-Wrapper around this group. The *elliptic.CurveParams returned by the .Params() method the Curve should not be used for doing ScalarMult, etc.!

func (*ModulusGroup) BaseExp

func (m *ModulusGroup) BaseExp(dr, di *big.Int, scalar []byte)

func (*ModulusGroup) Exponent

func (m *ModulusGroup) Exponent(dr, di, sr, si *big.Int, scalar []byte)

func (*ModulusGroup) Multiply

func (m *ModulusGroup) Multiply(dr, di, ar, ai, br, bi *big.Int)

Jump to

Keyboard shortcuts

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