serdes

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2019 License: GPL-3.0 Imports: 3 Imported by: 6

Documentation

Index

Constants

View Source
const CapAttestation = 2
View Source
const CapAuthentication = 4
View Source
const CapAuthorization = 5
View Source
const CapCertification = 1
View Source
const CapEncryption = 6
View Source
const CapSigning = 3

Variables

View Source
var (
	WaveOID                         = asn1.ObjectIdentifier{1, 3, 6, 1, 4, 1, 51157}
	WaveObjectOID                   = asn1.ObjectIdentifier{1, 3, 6, 1, 4, 1, 51157, 2}
	AttestationOID                  = asn1.ObjectIdentifier{1, 3, 6, 1, 4, 1, 51157, 2, 1}
	EntityOID                       = asn1.ObjectIdentifier{1, 3, 6, 1, 4, 1, 51157, 2, 2}
	ExplicitProofOID                = asn1.ObjectIdentifier{1, 3, 6, 1, 4, 1, 51157, 2, 3}
	EntitySecretOID                 = asn1.ObjectIdentifier{1, 3, 6, 1, 4, 1, 51157, 2, 4}
	WaveEncryptedMessageOID         = asn1.ObjectIdentifier{1, 3, 6, 1, 4, 1, 51157, 2, 5}
	WaveNameDeclarationOID          = asn1.ObjectIdentifier{1, 3, 6, 1, 4, 1, 51157, 2, 6}
	AttestationBodySchemeOID        = asn1.ObjectIdentifier{1, 3, 6, 1, 4, 1, 51157, 3}
	UnencryptedBodyOID              = asn1.ObjectIdentifier{1, 3, 6, 1, 4, 1, 51157, 3, 1}
	WR1BodyOID                      = asn1.ObjectIdentifier{1, 3, 6, 1, 4, 1, 51157, 3, 2}
	PSKBodySchemeOID                = asn1.ObjectIdentifier{1, 3, 6, 1, 4, 1, 51157, 3, 3}
	AttestationVerifierKeySchemeOID = asn1.ObjectIdentifier{1, 3, 6, 1, 4, 1, 51157, 4}
	VerifierKeyAES128OID            = asn1.ObjectIdentifier{1, 3, 6, 1, 4, 1, 51157, 4, 1}
	OuterSignatureSchemeOID         = asn1.ObjectIdentifier{1, 3, 6, 1, 4, 1, 51157, 5}
	EphemeralEd25519OID             = asn1.ObjectIdentifier{1, 3, 6, 1, 4, 1, 51157, 5, 1}
	OuterSignatureBindingSchemeOID  = asn1.ObjectIdentifier{1, 3, 6, 1, 4, 1, 51157, 6}
	SignedOuterKeyOID               = asn1.ObjectIdentifier{1, 3, 6, 1, 4, 1, 51157, 6, 1}
	LocationSchemeOID               = asn1.ObjectIdentifier{1, 3, 6, 1, 4, 1, 51157, 8}
	LocationURLOID                  = asn1.ObjectIdentifier{1, 3, 6, 1, 4, 1, 51157, 8, 1}
	LocationEthereumOID             = asn1.ObjectIdentifier{1, 3, 6, 1, 4, 1, 51157, 8, 2}
	HashSchemeOID                   = asn1.ObjectIdentifier{1, 3, 6, 1, 4, 1, 51157, 9}
	Sha3_256OID                     = asn1.ObjectIdentifier{1, 3, 6, 1, 4, 1, 51157, 9, 1}
	Keccak_256OID                   = asn1.ObjectIdentifier{1, 3, 6, 1, 4, 1, 51157, 9, 2}
	RevocationSchemeOID             = asn1.ObjectIdentifier{1, 3, 6, 1, 4, 1, 51157, 10}
	CommitmentRevocationOID         = asn1.ObjectIdentifier{1, 3, 6, 1, 4, 1, 51157, 10, 1}
	EntityKeySchemeOID              = asn1.ObjectIdentifier{1, 3, 6, 1, 4, 1, 51157, 11}
	EntityEd25519OID                = asn1.ObjectIdentifier{1, 3, 6, 1, 4, 1, 51157, 11, 1}
	EntityCurve25519OID             = asn1.ObjectIdentifier{1, 3, 6, 1, 4, 1, 51157, 11, 2}

	EntityOAQUE_BLS12381_S20_AttributeSetOID = asn1.ObjectIdentifier{1, 3, 6, 1, 4, 1, 51157, 11, 7}
	EntityOAQUE_BLS12381_S20_ParamsOID       = asn1.ObjectIdentifier{1, 3, 6, 1, 4, 1, 51157, 11, 8}
	EntityIBE_BLS12381_ParamsOID             = asn1.ObjectIdentifier{1, 3, 6, 1, 4, 1, 51157, 11, 9}
	EntityIBE_BLS12381_PublicOID             = asn1.ObjectIdentifier{1, 3, 6, 1, 4, 1, 51157, 11, 10}

	PolicySchemeOID                        = asn1.ObjectIdentifier{1, 3, 6, 1, 4, 1, 51157, 12}
	TrustLevelPolicyOID                    = asn1.ObjectIdentifier{1, 3, 6, 1, 4, 1, 51157, 12, 1}
	ResourceTreePolicyOID                  = asn1.ObjectIdentifier{1, 3, 6, 1, 4, 1, 51157, 12, 2}
	PolicyAddendumOID                      = asn1.ObjectIdentifier{1, 3, 6, 1, 4, 1, 51157, 13}
	WR1DomainVisibilityKey_IBE_BLS12381OID = asn1.ObjectIdentifier{1, 3, 6, 1, 4, 1, 51157, 13, 6}
	WR1PartitionKey_OAQUE_BLS12381_s20OID  = asn1.ObjectIdentifier{1, 3, 6, 1, 4, 1, 51157, 13, 7}
	//WR1EncryptionKey_OAQUE_BN256_s20OID    = asn1.ObjectIdentifier{1, 3, 6, 1, 4, 1, 51157, 13, 3}
	WR1EncryptionBundle_OAQUE_BLS12381_s20OID = asn1.ObjectIdentifier{1, 3, 6, 1, 4, 1, 51157, 13, 5}
	EntitySecretKeySchemeOID                  = asn1.ObjectIdentifier{1, 3, 6, 1, 4, 1, 51157, 14}
	EntitySecretEd25519OID                    = asn1.ObjectIdentifier{1, 3, 6, 1, 4, 1, 51157, 14, 1}
	EntitySecretCurve25519OID                 = asn1.ObjectIdentifier{1, 3, 6, 1, 4, 1, 51157, 14, 2}

	// EntitySecretOAQUE_BN256_S20OID         = asn1.ObjectIdentifier{1, 3, 6, 1, 4, 1, 51157, 14, 3}
	// EntitySecretOAQUE_BN256_S20_MasterOID  = asn1.ObjectIdentifier{1, 3, 6, 1, 4, 1, 51157, 14, 4}
	// EntitySecretIBE_BN256_MasterOID        = asn1.ObjectIdentifier{1, 3, 6, 1, 4, 1, 51157, 14, 5}
	// EntitySecretIBE_BN256OID               = asn1.ObjectIdentifier{1, 3, 6, 1, 4, 1, 51157, 14, 6}
	EntitySecretOAQUE_BLS12381_S20OID        = asn1.ObjectIdentifier{1, 3, 6, 1, 4, 1, 51157, 14, 7}
	EntitySecretOAQUE_BLS12381_S20_MasterOID = asn1.ObjectIdentifier{1, 3, 6, 1, 4, 1, 51157, 14, 8}
	EntitySecretIBE_BLS12381_MasterOID       = asn1.ObjectIdentifier{1, 3, 6, 1, 4, 1, 51157, 14, 9}
	EntitySecretIBE_BLS12381OID              = asn1.ObjectIdentifier{1, 3, 6, 1, 4, 1, 51157, 14, 10}

	EntityKeyringSchemeOID       = asn1.ObjectIdentifier{1, 3, 6, 1, 4, 1, 51157, 15}
	PlaintextKeyringOID          = asn1.ObjectIdentifier{1, 3, 6, 1, 4, 1, 51157, 15, 1}
	KeyringAES128_GCM_PBKDF2OID  = asn1.ObjectIdentifier{1, 3, 6, 1, 4, 1, 51157, 15, 2}
	E2EEMessageKeySchemesOID     = asn1.ObjectIdentifier{1, 3, 6, 1, 4, 1, 51157, 16}
	MessageKeyCurve25519ECDHOID  = asn1.ObjectIdentifier{1, 3, 6, 1, 4, 1, 51157, 16, 1}
	MessageKeyWR1OID             = asn1.ObjectIdentifier{1, 3, 6, 1, 4, 1, 51157, 16, 2}
	NameDeclarationKeySchemesOID = asn1.ObjectIdentifier{1, 3, 6, 1, 4, 1, 51157, 17}
	NameDeclarationKeyWR1OID     = asn1.ObjectIdentifier{1, 3, 6, 1, 4, 1, 51157, 17, 1}
	NameDeclarationKeyNoneOID    = asn1.ObjectIdentifier{1, 3, 6, 1, 4, 1, 51157, 17, 2}
)

Functions

This section is empty.

Types

type AVKeyAES128GCM

type AVKeyAES128GCM []byte

type AttestationBody

type AttestationBody struct {
	VerifierBody          AttestationVerifierBody
	ProverPolicyAddendums []asn1.External
	ProverExtensions      []Extension
}

type AttestationReference

type AttestationReference struct {
	Hash             asn1.External
	Content          []byte          `asn1:"tag:0,optional,explicit"`
	Locations        []asn1.External `asn1:"tag:1,explicit"`
	Keys             []asn1.External `asn1:"tag:2,explicit"`
	RevocationChecks []asn1.External `asn1:"tag:3,explicit"`
	Extensions       []Extension     `asn1:"tag:4,explicit"`
}

type AttestationVerifierBody

type AttestationVerifierBody struct {
	Attester         asn1.External //EntityHash
	AttesterLocation asn1.External //Location
	//Subject  asn1.External //EntityHash
	Validity struct {
		NotBefore time.Time `asn1:"utc"`
		NotAfter  time.Time `asn1:"utc"`
	}
	Policy                asn1.External
	Extensions            []Extension
	OuterSignatureBinding asn1.External
}

type BLS12381OAQUEKeyringBundle added in v0.4.0

type BLS12381OAQUEKeyringBundle struct {
	Params  EntityParamsOQAUE_BLS12381_s20
	Entries []BLS12381OAQUEKeyringBundleEntry
}

type BLS12381OAQUEKeyringBundleEntry added in v0.4.0

type BLS12381OAQUEKeyringBundleEntry struct {
	PartitionChange []PartitionChange
	Key             EntitySecretOQAUE_BLS12381_s20
}

type CommitmentRevocation

type CommitmentRevocation struct {
	Hash     asn1.External
	Location asn1.External
}

type Ed25519OuterSignature

type Ed25519OuterSignature struct {
	VerifyingKey []byte
	Signature    []byte
}

type EntityKeyring

type EntityKeyring struct {
	Keys []EntityKeyringEntry
}

type EntityKeyringEntry

type EntityKeyringEntry struct {
	Public  EntityPublicKey
	Private asn1.External
}

type EntityParamsIBE_BLS12381 added in v0.4.0

type EntityParamsIBE_BLS12381 []byte

type EntityParamsOQAUE_BLS12381_s20 added in v0.4.0

type EntityParamsOQAUE_BLS12381_s20 []byte

type EntityPublicCurve25519

type EntityPublicCurve25519 []byte

type EntityPublicEd25519

type EntityPublicEd25519 []byte

type EntityPublicIBE_BLS12381 added in v0.4.0

type EntityPublicIBE_BLS12381 struct {
	Params EntityParamsIBE_BLS12381
	ID     []byte
}

type EntityPublicKey

type EntityPublicKey struct {
	Capabilities []int `asn1:"set"`
	Key          asn1.External
}

type EntityPublicOAQUE_BLS12381_s20 added in v0.4.0

type EntityPublicOAQUE_BLS12381_s20 struct {
	Params       EntityParamsOQAUE_BLS12381_s20
	AttributeSet [][]byte
}

type EntitySecretCurve25519

type EntitySecretCurve25519 []byte

type EntitySecretEd25519

type EntitySecretEd25519 []byte

type EntitySecretIBE_BLS12381 added in v0.4.0

type EntitySecretIBE_BLS12381 []byte

type EntitySecretMasterIBE_BLS12381 added in v0.4.0

type EntitySecretMasterIBE_BLS12381 []byte

type EntitySecretMasterOQAUE_BLS12381_s20 added in v0.4.0

type EntitySecretMasterOQAUE_BLS12381_s20 []byte

type EntitySecretOQAUE_BLS12381_s20 added in v0.4.0

type EntitySecretOQAUE_BLS12381_s20 []byte

type Extension

type Extension struct {
	ExtensionID asn1.ObjectIdentifier
	Critical    bool
	Value       []byte
}

type Keccak_256

type Keccak_256 []byte

type KeyringAESCiphertext

type KeyringAESCiphertext struct {
	Ciphertext []byte
	Salt       []byte
	Iterations int
}

type LocationEthereum

type LocationEthereum struct {
	ChainID         int
	ContractAddress []byte
}

type LocationURL

type LocationURL struct {
	Value   string `asn1:"utf8"`
	Version int
}

type MessageKeyCurve25519ECDH added in v0.2.0

type MessageKeyCurve25519ECDH struct {
	Ciphertext []byte
}

type MessageKeyWR1 added in v0.2.0

type MessageKeyWR1 struct {
	Envelope            []byte
	EnvelopeKeyIBEBN256 []byte
	Namespace           asn1.External
	NamespaceLocation   asn1.External
}

type MessageKeyWR1Envelope added in v0.2.0

type MessageKeyWR1Envelope struct {
	Partition   [][]byte
	ContentsKey []byte
}

type NameDeclarationBody added in v0.2.0

type NameDeclarationBody struct {
	Name            string `asn1:"utf8"`
	Subject         asn1.External
	SubjectLocation asn1.External
	Validity        struct {
		NotBefore time.Time `asn1:"utc"`
		NotAfter  time.Time `asn1:"utc"`
	}
	PrivateExtensions []Extension
}

type NameDeclarationKeyNone added in v0.2.0

type NameDeclarationKeyNone struct {
}

type NameDeclarationKeyWR1 added in v0.2.0

type NameDeclarationKeyWR1 struct {
	Envelope          []byte
	EnvelopeKey       []byte
	Namespace         asn1.External
	NamespaceLocation asn1.External
}

type NameDeclarationWR1Envelope added in v0.2.0

type NameDeclarationWR1Envelope struct {
	Partition [][]byte
	BodyKey   []byte
}

type PSKBodyCiphertext

type PSKBodyCiphertext struct {
	AttestationBodyCiphetext []byte
	EncryptedUnder           EntityPublicKey
}

type PartitionChange added in v0.2.0

type PartitionChange struct {
	Index   int
	Content []byte
}

type RTreePolicy

type RTreePolicy struct {
	Namespace         asn1.External //EntityHash
	NamespaceLocation asn1.External
	Indirections      int
	Statements        []RTreeStatement
}

type RTreeStatement

type RTreeStatement struct {
	PermissionSet asn1.External
	Permissions   []string
	Resource      string `asn1:"utf8"`
}

type RevocationOption

type RevocationOption struct {
	Critical bool
	Scheme   asn1.External
}

type Sha3_256

type Sha3_256 []byte

type Signature added in v0.2.1

type Signature struct {
	Scheme    asn1.ObjectIdentifier
	Signature []byte
}

type SignedOuterKey

type SignedOuterKey struct {
	TBS struct {
		OuterSignatureScheme asn1.ObjectIdentifier
		VerifyingKey         []byte
	}
	Signature []byte
}

type TrustLevel

type TrustLevel struct {
	Trust int
}

type WR1BodyCiphertext

type WR1BodyCiphertext struct {
	VerifierBodyCiphertext         []byte
	ProverBodyCiphertext           []byte
	EnvelopeCiphertext             []byte
	EnvelopeKey_IBE_BLS12381       []byte
	EnvelopeKey_Curve25519         []byte
	EnvelopeKey_Curve25519Attester []byte
}

type WR1DomainVisibilityKey_IBE_BLS12381 added in v0.4.0

type WR1DomainVisibilityKey_IBE_BLS12381 EntityKeyringEntry

type WR1Envelope

type WR1Envelope struct {
	BodyKeys_OAQUE []byte
	Partition      [][]byte
}

type WR1PartitionKey_OAQUE_BLS12381_s20 added in v0.4.0

type WR1PartitionKey_OAQUE_BLS12381_s20 EntityKeyringEntry

type WR1ProverBody

type WR1ProverBody struct {
	Addendums  []asn1.External
	Extensions []Extension
}

type WR1VerifierBody

type WR1VerifierBody struct {
	AttestationVerifierBody AttestationVerifierBody
}

type WaveAttestation

type WaveAttestation struct {
	TBS struct {
		Subject          asn1.External //EntityHash
		SubjectLocation  asn1.External //Location
		Revocations      []RevocationOption
		PublicExtensions []Extension
		Body             asn1.External
	}
	OuterSignature asn1.External
}

type WaveEncryptedMessage added in v0.2.0

type WaveEncryptedMessage struct {
	Contents   []byte
	Keys       []asn1.External
	Extensions []Extension
}

type WaveEntity

type WaveEntity struct {
	TBS struct {
		Raw          asn1.RawContent
		VerifyingKey EntityPublicKey
		Keys         []EntityPublicKey
		Validity     struct {
			NotBefore time.Time `asn1:"utc"`
			NotAfter  time.Time `asn1:"utc"`
		}
		Revocations []RevocationOption
		Extensions  []Extension
	}
	Signature []byte
}

type WaveEntitySecret

type WaveEntitySecret struct {
	Entity  WaveEntity
	Keyring asn1.External
}

type WaveExplicitProof

type WaveExplicitProof struct {
	Attestations []AttestationReference
	Paths        [][]int
	Entities     [][]byte
	Extensions   []Extension
}

type WaveNameDeclaration added in v0.2.0

type WaveNameDeclaration struct {
	TBS struct {
		Attester         asn1.External
		AttesterLocation asn1.External
		Revocations      []RevocationOption
		PublicExtensions []Extension
		Body             []byte
		Keys             []asn1.External
	}
	Signature []byte
}

type WaveWireObject

type WaveWireObject struct {
	Content asn1.External
}

WaveWireObject is used whenever an object is stored externally or transmitted. it wraps the object with the necessary type information to permit decoding without knowing what the object will be

Jump to

Keyboard shortcuts

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