...

Package keys

import "github.com/cloudflare/circl/blindsign/blindrsa/internal/keys"
Overview
Index

Overview ▾

type BigPrivateKey

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

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

func NewBigPrivateKey

func NewBigPrivateKey(sk *rsa.PrivateKey) *BigPrivateKey

NewBigPrivateKey creates a BigPrivateKey from a rsa.PrivateKey.

type BigPublicKey

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.

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

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.