rsa_blind

package
v0.0.0-...-0dcf97e Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BigIntsToBytesSlice

func BigIntsToBytesSlice(dataList []*big.Int) [][]byte

func BytesSliceToBigInts

func BytesSliceToBigInts(bytesSlice [][]byte) []*big.Int

func BytesToInt

func BytesToInt(bys []byte) int

func IntToBytes

func IntToBytes(n int) []byte

Types

type Hasher

type Hasher interface {
	Sum([]byte) []byte
}

type MD5Hash

type MD5Hash struct{}

func (*MD5Hash) Sum

func (s *MD5Hash) Sum(msg []byte) []byte

type RSABlindIntersect

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

func NewRSABlindIntersect

func NewRSABlindIntersect(bits int, firstHash, secondHash, role string) (*RSABlindIntersect, error)

func (*RSABlindIntersect) ClientBlinding

func (s *RSABlindIntersect) ClientBlinding(msgs []string) ([]*big.Int, []*big.Int, error)

func (*RSABlindIntersect) ClientUnblinding

func (s *RSABlindIntersect) ClientUnblinding(zb []*big.Int, rands []*big.Int) [][]byte

func (*RSABlindIntersect) CompareIds

func (s *RSABlindIntersect) CompareIds(ta, tb [][]byte) [][2]int

func (RSABlindIntersect) GetPubKey

func (s RSABlindIntersect) GetPubKey() ([]byte, int)

func (RSABlindIntersect) HasPubKey

func (s RSABlindIntersect) HasPubKey() bool

func (*RSABlindIntersect) HostBlindSigning

func (s *RSABlindIntersect) HostBlindSigning(yb []*big.Int) []*big.Int

func (*RSABlindIntersect) HostOfflineHash

func (s *RSABlindIntersect) HostOfflineHash(msgs []string) [][]byte

func (*RSABlindIntersect) SetPubKey

func (s *RSABlindIntersect) SetPubKey(n []byte, e int)

type RSAStep

type RSAStep string
const (
	StepHostSendPubKey  RSAStep = "HostSendPubkey"
	StepHostHash        RSAStep = "HostHash"
	StepHostBlindSign   RSAStep = "HostBlindSign"
	StepClientRcvPubKey RSAStep = "ClientReceivedPubkey"
	StepClientBlind     RSAStep = "ClientBlind"
	StepClientUnblind   RSAStep = "ClientUnblind"
	StepExchangeData    RSAStep = "ExchangeData"
	StepShutdown        RSAStep = "Shutdown"
)

type SHA224Hash

type SHA224Hash struct{}

func (*SHA224Hash) Sum

func (s *SHA224Hash) Sum(msg []byte) []byte

type SHA256Hash

type SHA256Hash struct{}

func (*SHA256Hash) Sum

func (s *SHA256Hash) Sum(msg []byte) []byte

type SHA512Hash

type SHA512Hash struct{}

func (*SHA512Hash) Sum

func (s *SHA512Hash) Sum(msg []byte) []byte

Jump to

Keyboard shortcuts

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