Documentation ¶
Index ¶
- func Decode[T any](target T, buf []byte) error
- func Encode[T any](data T) ([]byte, error)
- func EncodeRevocationList(list RevocationList) [][]byte
- func ExampleInitialize(rng *core.RAND) (*Issuer, *SWSigner, error)
- func ExampleTPMInitialize(tpm *tpm_utils.TPM, rng *core.RAND) (*Issuer, *TPMSigner, error)
- func GenJoinReqWithTPM(seed *JoinSeed, tpm *tpm_utils.TPM, rng *core.RAND) (*JoinRequestTPM, *KeyHandles, error)
- func Verify(message, basename []byte, signature *Signature, ipk *IPK, rl RevocationList) error
- func VerifyCred(cred *Credential, ipk *IPK) error
- func VerifyIPK(ipk *IPK) error
- func VerifyJoinReq(req *JoinRequest, seed *JoinSeed, B *FP256BN.ECP) error
- type Credential
- type CredentialCipher
- type IPK
- type ISK
- type Issuer
- type JoinRequest
- type JoinRequestTPM
- type JoinSeed
- type KeyHandles
- type Member
- type MiddleEncodedCredCipher
- type MiddleEncodedCredential
- type MiddleEncodedIPK
- type MiddleEncodedISK
- type MiddleEncodedJoinRequest
- type MiddleEncodedJoinRequestTPM
- type MiddleEncodedJoinSeed
- type MiddleEncodedProof
- type MiddleEncodedSignature
- type RevocationList
- type SWSigner
- type SchnorrProof
- type SchnorrProver
- type Signature
- type Signer
- type TPMSigner
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EncodeRevocationList ¶
func EncodeRevocationList(list RevocationList) [][]byte
func ExampleTPMInitialize ¶
func GenJoinReqWithTPM ¶
func GenJoinReqWithTPM(seed *JoinSeed, tpm *tpm_utils.TPM, rng *core.RAND) (*JoinRequestTPM, *KeyHandles, error)
func Verify ¶
func Verify(message, basename []byte, signature *Signature, ipk *IPK, rl RevocationList) error
func VerifyCred ¶
func VerifyCred(cred *Credential, ipk *IPK) error
func VerifyJoinReq ¶
func VerifyJoinReq(req *JoinRequest, seed *JoinSeed, B *FP256BN.ECP) error
Types ¶
type Credential ¶
func ActivateCredential ¶
func ActivateCredential( encCred *CredentialCipher, B, D *FP256BN.ECP, ipk *IPK, handle *KeyHandles, tpm *tpm_utils.TPM) (*Credential, error)
*
- Step4. activate credential for join with TPM2_activate_credential (by Member)
func RandomizeCred ¶
func RandomizeCred(cred *Credential, rng *core.RAND) *Credential
func (*Credential) Decode ¶
func (decoded *Credential) Decode(encoded []byte) error
func (*Credential) Encode ¶
func (cred *Credential) Encode() ([]byte, error)
type CredentialCipher ¶
type CredentialCipher struct {
A, C []byte
WrappedCredential []byte
IdObject []byte
EncA []byte
EncC []byte
IV []byte
}
func (*CredentialCipher) Decode ¶
func (decoded *CredentialCipher) Decode(buf []byte) error
func (*CredentialCipher) Encode ¶
func (cipher *CredentialCipher) Encode() ([]byte, error)
type Issuer ¶
func RandomIssuer ¶
func (*Issuer) MakeCred ¶
func (issuer *Issuer) MakeCred(req *JoinRequest, B *FP256BN.ECP, rng *core.RAND) (*Credential, error)
*
- Step3. make credential for join (by Issuer)
func (*Issuer) MakeCredEncrypted ¶
func (issuer *Issuer) MakeCredEncrypted(req *JoinRequestTPM, B *FP256BN.ECP, rng *core.RAND) (*CredentialCipher, *Credential, error)
type JoinRequest ¶
type JoinRequest struct { Proof *SchnorrProof Q *FP256BN.ECP }
func (*JoinRequest) Decode ¶
func (decoded *JoinRequest) Decode(encoded []byte) error
func (*JoinRequest) Encode ¶
func (request *JoinRequest) Encode() ([]byte, error)
type JoinRequestTPM ¶
type JoinRequestTPM struct { JoinReq *JoinRequest EKCert *x509.Certificate SrkName []byte }
func (*JoinRequestTPM) Decode ¶
func (decoded *JoinRequestTPM) Decode(encoded []byte) error
func (*JoinRequestTPM) Encode ¶
func (request *JoinRequestTPM) Encode() ([]byte, error)
type KeyHandles ¶
type KeyHandles struct { EkHandle *tpm2.AuthHandle SrkHandle *tpm2.NamedHandle Handle *tpm2.AuthHandle }
type Member ¶
type Member struct { Tpm *tpm_utils.TPM KeyHandles *KeyHandles }
type MiddleEncodedCredCipher ¶
type MiddleEncodedCredential ¶
type MiddleEncodedIPK ¶
type MiddleEncodedISK ¶
type MiddleEncodedJoinSeed ¶
type MiddleEncodedProof ¶
type MiddleEncodedSignature ¶
type RevocationList ¶
func DecodeRevocationList ¶
func DecodeRevocationList(list [][]byte) RevocationList
type SWSigner ¶
type SWSigner struct {
// contains filtered or unexported fields
}
func NewSWSigner ¶
func NewSWSigner(cred *Credential, sk *FP256BN.BIG) SWSigner
type SchnorrProof ¶
type SchnorrProof struct { SmallC *FP256BN.BIG SmallS *FP256BN.BIG SmallN *FP256BN.BIG K *FP256BN.ECP }
func (*SchnorrProof) Decode ¶
func (decoded *SchnorrProof) Decode(encoded []byte) error
func (*SchnorrProof) Encode ¶
func (proof *SchnorrProof) Encode() ([]byte, error)
type SchnorrProver ¶
type SchnorrProver struct{}
type Signature ¶
type Signature struct { Proof *SchnorrProof RandomizedCred *Credential }
type TPMSigner ¶
type TPMSigner struct {
// contains filtered or unexported fields
}
func NewTPMSigner ¶
func NewTPMSigner(cred *Credential, handle *KeyHandles, tpm *tpm_utils.TPM) TPMSigner
Source Files ¶
Click to show internal directories.
Click to hide internal directories.