proof

package
v0.7.8 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Success            = 200
	Error              = 201
	ErrorParam         = 202
	ErrorParamNotFound = 203
	ErrorInternal      = 204
)

Variables

This section is empty.

Functions

func SplitByN

func SplitByN(filePath string, N int64) (Data [][]byte, sep int64, err error)

Types

type GenProofResponse

type GenProofResponse struct {
	Sigma     string    `json:"sigma"`
	MU        string    `json:"mu"`
	StatueMsg StatueMsg `json:"statue_msg"`
}

type HashSelf

type HashSelf interface {
	New() *HashSelf
	LoadField(d []byte) error
	CHash() ([]byte, crypto.Hash)
}

type QElement

type QElement struct {
	I int64  `json:"i"`
	V string `json:"v"`
}

type RSAKeyPair

type RSAKeyPair struct {
	Spk *rsa.PublicKey
	Ssk *rsa.PrivateKey
}

func NewKey

func NewKey() *RSAKeyPair

func (RSAKeyPair) AggrAppendProof

func (keyPair RSAKeyPair) AggrAppendProof(AggrSigma string, QSlice []QElement, Phi []string) (string, bool)

func (RSAKeyPair) AggrGenProof

func (keyPair RSAKeyPair) AggrGenProof(QSlice []QElement, Tag []Tag) string

func (RSAKeyPair) GenProof

func (keyPair RSAKeyPair) GenProof(QSlice []QElement, h HashSelf, Phi []string, Matrix [][]byte) <-chan GenProofResponse

func (*RSAKeyPair) VerifyAttest added in v0.7.3

func (r *RSAKeyPair) VerifyAttest(name, u, phiHash, attest, customData string) (bool, error)

type StatueMsg

type StatueMsg struct {
	StatusCode int    `json:"status"`
	Msg        string `json:"msg"`
}

type T

type T struct {
	Name string   `json:"name"`
	U    string   `json:"u"`
	Phi  []string `json:"phi"`
}

type Tag

type Tag struct {
	T       T      `json:"t"`
	PhiHash string `json:"phi_hash"`
	Attest  string `json:"attest"`
}

Jump to

Keyboard shortcuts

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