Documentation ¶
Index ¶
- type Engine
- func (e *Engine) CheckAttestation(ctx context.Context, d *iapi.Attestation) (*Validity, error)
- func (e *Engine) CheckEntity(ctx context.Context, ent *iapi.Entity) (*Validity, error)
- func (e *Engine) CheckNameDeclaration(ctx context.Context, nd *iapi.NameDeclaration) (*Validity, error)
- func (e *Engine) InsertAttestation(ctx context.Context, att *iapi.Attestation) error
- func (e *Engine) InsertReverseName(ctx context.Context, name string, hi iapi.HashSchemeInstance) wve.WVE
- func (e *Engine) IsAttestationRevoked(att *iapi.Attestation) (bool, error)
- func (e *Engine) IsEntityRevoked(ent *iapi.Entity) (bool, error)
- func (e *Engine) IsNameDeclarationRevoked(nd *iapi.NameDeclaration) (bool, error)
- func (e *Engine) LookupAttestationInPerspective(ctx context.Context, hash iapi.HashSchemeInstance, ...) (*iapi.Attestation, *Validity, error)
- func (e *Engine) LookupAttestationNoPerspective(ctx context.Context, hash iapi.HashSchemeInstance, verifierKey []byte, ...) (*iapi.Attestation, *Validity, error)
- func (e *Engine) LookupAttestationsFrom(ctx context.Context, entityHash iapi.HashSchemeInstance, ...) (chan *LookupResult, chan error)
- func (e *Engine) LookupAttestationsTo(ctx context.Context, entityHash iapi.HashSchemeInstance, ...) (chan *LookupResult, chan error)
- func (e *Engine) LookupEntity(ctx context.Context, hash iapi.HashSchemeInstance, ...) (*iapi.Entity, *Validity, error)
- func (e *Engine) LookupFullName(ctx context.Context, attester iapi.HashSchemeInstance, name string) ([]*iapi.NameDeclaration, wve.WVE)
- func (e *Engine) LookupName(ctx context.Context, attester iapi.HashSchemeInstance, name string) (*iapi.NameDeclaration, wve.WVE)
- func (e *Engine) LookupNameDeclaration(ctx context.Context, hi iapi.HashSchemeInstance, ...) (*iapi.NameDeclaration, *Validity, error)
- func (e *Engine) LookupReverseName(ctx context.Context, hi iapi.HashSchemeInstance) (string, wve.WVE)
- func (e *Engine) MarkEntityInterestingAndQueueForSync(dest *iapi.Entity, loc iapi.LocationSchemeInstance) error
- func (e *Engine) Perspective() *iapi.EntitySecrets
- func (e *Engine) PerspectiveLocation() iapi.LocationSchemeInstance
- func (e *Engine) ResetRevocationCache(ctx context.Context)
- func (e *Engine) ResyncEntireGraph(ctx context.Context) error
- func (e *Engine) SyncStatus(ctx context.Context) (*SyncStatus, error)
- func (e *Engine) WaitForEmptySyncQueue() chan struct{}
- type EngineDecryptionContext
- func (dctx *EngineDecryptionContext) AttestationByHashLoc(ctx context.Context, hash iapi.HashSchemeInstance, ...) (*iapi.Attestation, wve.WVE)
- func (dctx *EngineDecryptionContext) AutoLoadPartitionSecrets(v bool)
- func (dctx *EngineDecryptionContext) EntityByHashLoc(ctx context.Context, hash iapi.HashSchemeInstance, ...) (*iapi.Entity, wve.WVE)
- func (dctx *EngineDecryptionContext) LoadAllPartitionSecrets(issuer iapi.HashSchemeInstance) wve.WVE
- func (dctx *EngineDecryptionContext) SetPartitionSecrets(m map[int]iapi.EntitySecretKeySchemeInstance)
- func (dctx *EngineDecryptionContext) SetProverKey(k []byte)
- func (dctx *EngineDecryptionContext) SetVerifierKey(k []byte)
- func (dctx *EngineDecryptionContext) WR1AttesterDirectDecryptionKey(ctx context.Context, onResult func(k iapi.EntitySecretKeySchemeInstance) bool) error
- func (dctx *EngineDecryptionContext) WR1DirectDecryptionKey(ctx context.Context, dst iapi.HashSchemeInstance, ...) error
- func (dctx *EngineDecryptionContext) WR1EntityFromHash(ctx context.Context, hi iapi.HashSchemeInstance, ...) (*iapi.Entity, error)
- func (dctx *EngineDecryptionContext) WR1IBEKeysForPartitionLabel(ctx context.Context, dst iapi.HashSchemeInstance, ...) error
- func (dctx *EngineDecryptionContext) WR1OAQUEKeysForContent(ctx context.Context, dst iapi.HashSchemeInstance, slots [][]byte, ...) error
- func (dctx *EngineDecryptionContext) WR1ProverBodyKey(ctx context.Context) []byte
- func (dctx *EngineDecryptionContext) WR1VerifierBodyKey(ctx context.Context) []byte
- type Filter
- type LookupResult
- type SyncStatus
- type Validity
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
There is one engine per perspective (a perspective is a controlling entity)
func NewEngine ¶
func NewEngine(ctx context.Context, state iapi.WaveState, st iapi.StorageInterface, perspective *iapi.EntitySecrets, perspectiveLoc iapi.LocationSchemeInstance) (*Engine, error)
func (*Engine) CheckAttestation ¶
Unlike checkDot, this should not touch the DB, it is a read-only operation
func (*Engine) CheckEntity ¶
func (*Engine) CheckNameDeclaration ¶ added in v0.2.0
func (*Engine) InsertAttestation ¶
External function: insert a DOT learned out of band
func (*Engine) InsertReverseName ¶ added in v0.2.0
func (*Engine) IsAttestationRevoked ¶ added in v0.2.1
func (e *Engine) IsAttestationRevoked(att *iapi.Attestation) (bool, error)
func (*Engine) IsEntityRevoked ¶ added in v0.2.1
func (*Engine) IsNameDeclarationRevoked ¶ added in v0.2.1
func (e *Engine) IsNameDeclarationRevoked(nd *iapi.NameDeclaration) (bool, error)
func (*Engine) LookupAttestationInPerspective ¶
func (e *Engine) LookupAttestationInPerspective(ctx context.Context, hash iapi.HashSchemeInstance, location iapi.LocationSchemeInstance) (*iapi.Attestation, *Validity, error)
func (*Engine) LookupAttestationNoPerspective ¶
func (e *Engine) LookupAttestationNoPerspective(ctx context.Context, hash iapi.HashSchemeInstance, verifierKey []byte, location iapi.LocationSchemeInstance) (*iapi.Attestation, *Validity, error)
This should try find and decrypt a dot given the hash and aesk. No information from our perspective (active entity) is used
func (*Engine) LookupAttestationsFrom ¶
func (e *Engine) LookupAttestationsFrom(ctx context.Context, entityHash iapi.HashSchemeInstance, filter *iapi.LookupFromFilter) (chan *LookupResult, chan error)
External function: get dots granted from an entity on a namespace. global grants will also be returned. The returned channel must be consumed completely, or the context must be cancelled
func (*Engine) LookupAttestationsTo ¶
func (e *Engine) LookupAttestationsTo(ctx context.Context, entityHash iapi.HashSchemeInstance, filter *iapi.LookupFromFilter) (chan *LookupResult, chan error)
func (*Engine) LookupEntity ¶
func (*Engine) LookupFullName ¶ added in v0.2.0
func (e *Engine) LookupFullName(ctx context.Context, attester iapi.HashSchemeInstance, name string) ([]*iapi.NameDeclaration, wve.WVE)
func (*Engine) LookupName ¶ added in v0.2.0
func (e *Engine) LookupName(ctx context.Context, attester iapi.HashSchemeInstance, name string) (*iapi.NameDeclaration, wve.WVE)
func (*Engine) LookupNameDeclaration ¶ added in v0.2.1
func (e *Engine) LookupNameDeclaration(ctx context.Context, hi iapi.HashSchemeInstance, loc iapi.LocationSchemeInstance) (*iapi.NameDeclaration, *Validity, error)
func (*Engine) LookupReverseName ¶ added in v0.2.0
func (*Engine) MarkEntityInterestingAndQueueForSync ¶
func (e *Engine) MarkEntityInterestingAndQueueForSync(dest *iapi.Entity, loc iapi.LocationSchemeInstance) error
This function should be quick. Processing should happen elsewhere
func (*Engine) Perspective ¶ added in v0.2.0
func (e *Engine) Perspective() *iapi.EntitySecrets
func (*Engine) PerspectiveLocation ¶ added in v0.2.0
func (e *Engine) PerspectiveLocation() iapi.LocationSchemeInstance
func (*Engine) ResetRevocationCache ¶ added in v0.2.1
func (*Engine) SyncStatus ¶
func (e *Engine) SyncStatus(ctx context.Context) (*SyncStatus, error)
func (*Engine) WaitForEmptySyncQueue ¶
func (e *Engine) WaitForEmptySyncQueue() chan struct{}
The returned channel will be closed the next time the sync queue is empty
type EngineDecryptionContext ¶
type EngineDecryptionContext struct {
// contains filtered or unexported fields
}
func NewEngineDecryptionContext ¶
func NewEngineDecryptionContext(e *Engine) *EngineDecryptionContext
The map is just for IBE keys decrypting the partition. The OAQUE keys must come from E
func (*EngineDecryptionContext) AttestationByHashLoc ¶ added in v0.2.1
func (dctx *EngineDecryptionContext) AttestationByHashLoc(ctx context.Context, hash iapi.HashSchemeInstance, loc iapi.LocationSchemeInstance) (*iapi.Attestation, wve.WVE)
func (*EngineDecryptionContext) AutoLoadPartitionSecrets ¶ added in v0.2.0
func (dctx *EngineDecryptionContext) AutoLoadPartitionSecrets(v bool)
func (*EngineDecryptionContext) EntityByHashLoc ¶
func (dctx *EngineDecryptionContext) EntityByHashLoc(ctx context.Context, hash iapi.HashSchemeInstance, loc iapi.LocationSchemeInstance) (*iapi.Entity, wve.WVE)
func (*EngineDecryptionContext) LoadAllPartitionSecrets ¶ added in v0.2.0
func (dctx *EngineDecryptionContext) LoadAllPartitionSecrets(issuer iapi.HashSchemeInstance) wve.WVE
func (*EngineDecryptionContext) SetPartitionSecrets ¶
func (dctx *EngineDecryptionContext) SetPartitionSecrets(m map[int]iapi.EntitySecretKeySchemeInstance)
func (*EngineDecryptionContext) SetProverKey ¶
func (dctx *EngineDecryptionContext) SetProverKey(k []byte)
func (*EngineDecryptionContext) SetVerifierKey ¶
func (dctx *EngineDecryptionContext) SetVerifierKey(k []byte)
func (*EngineDecryptionContext) WR1AttesterDirectDecryptionKey ¶ added in v0.2.1
func (dctx *EngineDecryptionContext) WR1AttesterDirectDecryptionKey(ctx context.Context, onResult func(k iapi.EntitySecretKeySchemeInstance) bool) error
func (*EngineDecryptionContext) WR1DirectDecryptionKey ¶
func (dctx *EngineDecryptionContext) WR1DirectDecryptionKey(ctx context.Context, dst iapi.HashSchemeInstance, onResult func(k iapi.EntitySecretKeySchemeInstance) bool) error
func (*EngineDecryptionContext) WR1EntityFromHash ¶ added in v0.2.1
func (dctx *EngineDecryptionContext) WR1EntityFromHash(ctx context.Context, hi iapi.HashSchemeInstance, loc iapi.LocationSchemeInstance) (*iapi.Entity, error)
func (*EngineDecryptionContext) WR1IBEKeysForPartitionLabel ¶
func (dctx *EngineDecryptionContext) WR1IBEKeysForPartitionLabel(ctx context.Context, dst iapi.HashSchemeInstance, onResult func(k iapi.EntitySecretKeySchemeInstance) bool) error
func (*EngineDecryptionContext) WR1OAQUEKeysForContent ¶
func (dctx *EngineDecryptionContext) WR1OAQUEKeysForContent(ctx context.Context, dst iapi.HashSchemeInstance, slots [][]byte, onResult func(k iapi.SlottedSecretKey) bool) error
func (*EngineDecryptionContext) WR1ProverBodyKey ¶
func (dctx *EngineDecryptionContext) WR1ProverBodyKey(ctx context.Context) []byte
func (*EngineDecryptionContext) WR1VerifierBodyKey ¶
func (dctx *EngineDecryptionContext) WR1VerifierBodyKey(ctx context.Context) []byte
type Filter ¶
type Filter struct { //Like namespace and permissions and stuff //backend might be able to index some of it //also validity Valid *bool }
type LookupResult ¶
type LookupResult struct { //The dot but also its validity Attestation *iapi.Attestation KnownLocations []iapi.LocationSchemeInstance Validity *Validity }
type SyncStatus ¶
type SyncStatus struct { WaitSyncEmpty chan struct{} StorageStatus map[string]iapi.StorageDriverStatus TotalSyncRequests int64 TotalCompletedSyncs int64 }