rsa

package
v0.0.0-...-5bb28f7 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2018 License: Apache-2.0 Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Group

type Group struct {
	zn.Group          // Group group is a special case of Group where n = P * Q)
	N        *big.Int // N = P * Q
	P        *big.Int
	Q        *big.Int
	E        *big.Int
}

Group presents Z_n* - group of all integers smaller than n and coprime with n, where n is a product of two distinct large primes. Note that this group is NOT cyclic (as opposed for example to RSASpecial which is a subgroup of Group group).

func NewGroup

func NewGroup(nBitLength int) (*Group, error)

func (*Group) Homomorphism

func (group *Group) Homomorphism(x *big.Int) *big.Int

Homomorphism returns x^E mod N (it is not called Encrypt, because there is no padding).

Jump to

Keyboard shortcuts

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