Documentation ¶
Index ¶
- Constants
- func Bytes2Sha256Bytes(message []byte) []byte
- func BytesChamHashFromBytes(longbytes []byte) []byte
- func BytesChamHashFromSHA256(sha256Hash []byte) []byte
- func ChamHashAdapt(m1 []byte, m2 []byte, hash []byte) []byte
- func ChamHashCheck(message []byte, hash []byte) bool
- func ChamHashHash(message []byte) []byte
- func CheckChamHashOfPrpStructure(prpbytes []byte) bool
- func CheckFilledPayload(filledPayloadBytes []byte) bool
- func EqualProposalResponsePayload(p1 []byte, p2 []byte) (bool, error)
- func FillPayload(PayloadBytes []byte) ([]byte, []byte)
- func FillPrpStructureWithChamHash(prpbytes []byte) ([]byte, []byte)
- func GetHashOfPayloadStructure(filledPaylaodBytes []byte) []byte
- func GetHashOfPrpStructure(prpbytes []byte) []byte
- func HashValueFromChamHashBytes(chamHashBytes []byte) []byte
- func MockChamHashHash(message []byte) []byte
- func UpdatePaylaod(charmHashBytes []byte, payloadBytes []byte, newpayloadBytes []byte) ([]byte, error)
- func UpdateProposalResponsePayload(prpbytes []byte, newprpbytes []byte, chamhashBytes []byte) ([]byte, error)
Constants ¶
View Source
const CipherHost = "auth.example.com:1234"
View Source
const SecurityParameter int = 1024
Variables ¶
This section is empty.
Functions ¶
func Bytes2Sha256Bytes ¶
func BytesChamHashFromBytes ¶
func BytesChamHashFromSHA256 ¶
func ChamHashAdapt ¶
collision : H(m1).hash = H(m2).hash check : check(m1, hash1) -> true; check(m2, hash2) -> true input: m1,m2,h1 return: h2 need : m1, m2 should be sha256 bytes
func ChamHashCheck ¶
message should be sha256 bytes
func ChamHashHash ¶
return ((hashValue,randomValue,Etdcipher))
func CheckFilledPayload ¶
verify filledPayload With correct form and verify the signature
func EqualProposalResponsePayload ¶
equalPayload is to judge p1 and p2 with chamHashStruct in
func FillPayload ¶
fill payload with chamhash. return (filledPayloadBytes, hashValueOfPayload)
func GetHashOfPrpStructure ¶
this function get Hash from PrpStructure
func MockChamHashHash ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.