keys

package
v0.0.0-...-dfc0bd1 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2024 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BigPrivateKey

type BigPrivateKey struct {
	Pk *BigPublicKey
	D  *big.Int
	P  *big.Int
	Q  *big.Int
}

CustomPublicKey is similar to rsa.PrivateKey, containing information needed for a private key used in the partially blind signature protocol.

func NewBigPrivateKey

func NewBigPrivateKey(sk *rsa.PrivateKey) *BigPrivateKey

NewBigPrivateKey creates a BigPrivateKey from a rsa.PrivateKey.

type BigPublicKey

type BigPublicKey struct {
	N *big.Int
	E *big.Int
}

BigPublicKey is the same as an rsa.PublicKey struct, except the public key is represented as a big integer as opposed to an int. For the partially blind scheme, this is required since the public key will typically be any value in the RSA group.

func NewBigPublicKey

func NewBigPublicKey(pk *rsa.PublicKey) *BigPublicKey

NewBigPublicKey creates a BigPublicKey from a rsa.PublicKey.

func (*BigPublicKey) Marshal

func (pub *BigPublicKey) Marshal() []byte

Marshal encodes the public key exponent (e).

func (*BigPublicKey) Size

func (pub *BigPublicKey) Size() int

Size returns the size of the public key.

Jump to

Keyboard shortcuts

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