Documentation ¶
Index ¶
- Constants
- func GenerateAuthenticator(i int64, s int64, T0 T0, piece []byte, Alpha *pbc.Element, ...) []byte
- type FileTagT
- type HashNameAndI
- type PBCKeyPair
- type PoDR2Commit
- type PoDR2CommitResponse
- type PoDR2Prove
- type PoDR2ProveResponse
- type PoDR2StatueMsg
- type PoDR2Verify
- type QElement
- type T0
- type TagInfo
Constants ¶
View Source
const ( Success = 200 Error = 201 ErrorParam = 202 ErrorParamNotFound = 203 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type HashNameAndI ¶
type PBCKeyPair ¶
func Keygen ¶
func Keygen() PBCKeyPair
type PoDR2Commit ¶
type PoDR2CommitResponse ¶
type PoDR2CommitResponse struct { T FileTagT `json:"file_tag_t"` Sigmas [][]byte `json:"sigmas"` StatueMsg PoDR2StatueMsg `json:"statue_msg"` }
type PoDR2Prove ¶
type PoDR2Prove struct { QSlice []QElement `json:"q_slice"` T FileTagT `json:"file_tag_t"` Sigmas [][]byte `json:"sigmas"` Matrix [][]byte `json:"matrix"` S int64 `json:"s"` }
func (PoDR2Prove) PoDR2ProofProve ¶
func (prove PoDR2Prove) PoDR2ProofProve(spk []byte, sharedParams string, sharedG []byte, segmentSize int64) <-chan PoDR2ProveResponse
type PoDR2ProveResponse ¶
type PoDR2ProveResponse struct { Sigma []byte `json:"sigma"` MU [][]byte `json:"mu"` StatueMsg PoDR2StatueMsg `json:"statue_msg"` }
type PoDR2StatueMsg ¶
type PoDR2Verify ¶
type PoDR2Verify struct { T FileTagT `json:"file_tag_t"` QSlice []QElement `json:"q_slice"` MU [][]byte `json:"mu"` Sigma []byte `json:"sigma"` }
func (PoDR2Verify) PoDR2ProofVerify ¶
func (verify PoDR2Verify) PoDR2ProofVerify(SharedG, spk []byte, sharedParams string) bool
type QElement ¶
func PoDR2ChallengeGenerate ¶
func PoDR2ChallengeGenerateFromChain ¶
func PoDR2ChallengeGenerateFromChain(blockindex types.Bytes, blockrandom []types.Bytes) ([]QElement, error)
The key of ChallengeMap represents the serial number of the block to be challenged. Please start from 1 to represent the serial number of the block. For example, there are 40 files in total, and the serial number is [1,40]
Click to show internal directories.
Click to hide internal directories.