Versions in this module Expand all Collapse all v0 v0.0.1 Feb 7, 2024 Changes in this version + func Decode[T any](target T, buf []byte) error + func EncodeRevocationList(list RevocationList) [][]byte + func Encode[T any](data T) ([]byte, error) + 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 struct + A *FP256BN.ECP + B *FP256BN.ECP + C *FP256BN.ECP + D *FP256BN.ECP + func ActivateCredential(encCred *CredentialCipher, B, D *FP256BN.ECP, ipk *IPK, handle *KeyHandles, ...) (*Credential, error) + func RandomizeCred(cred *Credential, rng *core.RAND) *Credential + func (cred *Credential) Encode() ([]byte, error) + func (decoded *Credential) Decode(encoded []byte) error + type CredentialCipher struct + A []byte + C []byte + EncA []byte + EncC []byte + IV []byte + IdObject []byte + WrappedCredential []byte + func (cipher *CredentialCipher) Encode() ([]byte, error) + func (decoded *CredentialCipher) Decode(buf []byte) error + type IPK struct + C *FP256BN.BIG + SX *FP256BN.BIG + SY *FP256BN.BIG + X *FP256BN.ECP2 + Y *FP256BN.ECP2 + func RandomIPK(isk *ISK, rng *core.RAND) IPK + func (decoded *IPK) Decode(encoded []byte) error + func (ipk *IPK) Encode() ([]byte, error) + type ISK struct + X *FP256BN.BIG + Y *FP256BN.BIG + func RandomISK(rng *core.RAND) ISK + func (isk *ISK) Decode(encoded []byte) error + func (isk *ISK) Encode() ([]byte, error) + type Issuer struct + Ipk IPK + Isk ISK + func NewIssuer(isk ISK, ipk IPK) Issuer + func RandomIssuer(rng *core.RAND) Issuer + func (issuer *Issuer) MakeCred(req *JoinRequest, B *FP256BN.ECP, rng *core.RAND) (*Credential, error) + func (issuer *Issuer) MakeCredEncrypted(req *JoinRequestTPM, B *FP256BN.ECP, rng *core.RAND) (*CredentialCipher, *Credential, error) + type JoinRequest struct + Proof *SchnorrProof + Q *FP256BN.ECP + func GenJoinReq(seed *JoinSeed, rng *core.RAND) (*JoinRequest, *FP256BN.BIG, error) + func (decoded *JoinRequest) Decode(encoded []byte) error + func (request *JoinRequest) Encode() ([]byte, error) + type JoinRequestTPM struct + EKCert *x509.Certificate + JoinReq *JoinRequest + SrkName []byte + func (decoded *JoinRequestTPM) Decode(encoded []byte) error + func (request *JoinRequestTPM) Encode() ([]byte, error) + type JoinSeed struct + Basename []byte + S2 []byte + Y2 *FP256BN.BIG + func GenJoinSeed(rng *core.RAND) (*JoinSeed, *FP256BN.ECP, error) + func (decoded *JoinSeed) Decode(encoded []byte) error + func (seeds *JoinSeed) Encode() ([]byte, error) + type KeyHandles struct + EkHandle *tpm2.AuthHandle + Handle *tpm2.AuthHandle + SrkHandle *tpm2.NamedHandle + type Member struct + KeyHandles *KeyHandles + Tpm *tpm_utils.TPM + func NewMember(tpm *tpm_utils.TPM) Member + type MiddleEncodedCredCipher struct + EncA []byte + EncC []byte + IV []byte + IdObject []byte + WrappedCredential []byte + type MiddleEncodedCredential struct + A []byte + B []byte + C []byte + D []byte + type MiddleEncodedIPK struct + C []byte + SX []byte + SY []byte + X []byte + Y []byte + type MiddleEncodedISK struct + X []byte + Y []byte + type MiddleEncodedJoinRequest struct + Proof []byte + Q []byte + type MiddleEncodedJoinRequestTPM struct + EKCert []byte + JoinReq []byte + SrkName []byte + type MiddleEncodedJoinSeed struct + Basename []byte + S2 []byte + Y2 []byte + type MiddleEncodedProof struct + K []byte + SmallC []byte + SmallN []byte + SmallS []byte + type MiddleEncodedSignature struct + Credential []byte + Proof []byte + type RevocationList = []*FP256BN.BIG + func DecodeRevocationList(list [][]byte) RevocationList + type SWSigner struct + func NewSWSigner(cred *Credential, sk *FP256BN.BIG) SWSigner + func (signer SWSigner) Sign(message, basename []byte, rng *core.RAND) (*Signature, error) + type SchnorrProof struct + K *FP256BN.ECP + SmallC *FP256BN.BIG + SmallN *FP256BN.BIG + SmallS *FP256BN.BIG + func (decoded *SchnorrProof) Decode(encoded []byte) error + func (proof *SchnorrProof) Encode() ([]byte, error) + type SchnorrProver struct + type Signature struct + Proof *SchnorrProof + RandomizedCred *Credential + func (decoded *Signature) Decode(encoded []byte) error + func (signature *Signature) Encode() ([]byte, error) + type Signer interface + Sign func(message, basename []byte, rng *core.RAND) (*Signature, error) + type TPMSigner struct + func NewTPMSigner(cred *Credential, handle *KeyHandles, tpm *tpm_utils.TPM) TPMSigner + func (signer *TPMSigner) Sign(message, basename []byte, rng *core.RAND) (*Signature, error)