Documentation
¶
Overview ¶
Package session implements helium sessions.
Index ¶
- func GenTestSecretKeys(sessParams Parameters) (secs map[helium.NodeID]*Secrets, err error)
- type Parameters
- type Secrets
- type Session
- func (sess *Session) Contains(nodeID helium.NodeID) bool
- func (sess *Session) GetRLKEphemeralSecretKey() (*rlwe.SecretKey, error)
- func (sess *Session) GetSecretKey() (*rlwe.SecretKey, error)
- func (sess *Session) GetSecretKeyForGroup(parties []helium.NodeID) (sk *rlwe.SecretKey, err error)
- func (sess *Session) GetSessionFromContext(ctx context.Context) (*Session, bool)
- func (sess *Session) GetSessionFromID(sessionID helium.SessionID) (*Session, bool)
- func (sess *Session) GetShamirPublicPoints() map[helium.NodeID]drlwe.ShamirPublicPoint
- func (sess *Session) GetShamirPublicPointsList() []drlwe.ShamirPublicPoint
- func (sess *Session) GetThresholdSecretKey() (*drlwe.ShamirSecretShare, error)
- func (sess *Session) String() string
- type SessionProvider
- type SessionStore
- type TestSession
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenTestSecretKeys ¶
func GenTestSecretKeys(sessParams Parameters) (secs map[helium.NodeID]*Secrets, err error)
Types ¶
type Parameters ¶
type Parameters struct {
ID helium.SessionID
Nodes []helium.NodeID
RLWEParams bgv.ParametersLiteral
Threshold int
ShamirPks map[helium.NodeID]drlwe.ShamirPublicPoint
PublicSeed []byte
*Secrets
}
Parameters contains data used to initialize a Session.
type Secrets ¶
type Secrets struct {
PrivateSeed []byte
ThresholdSecretKey *drlwe.ShamirSecretShare
}
type Session ¶
type Session struct {
Parameters
NodeID helium.NodeID
Params bgv.Parameters
// contains filtered or unexported fields
}
Session holds the session's critical state.
func NewSession ¶
func NewSession(sessParams Parameters, nodeID helium.NodeID) (sess *Session, err error)
NewSession creates a new session.
func (*Session) GetRLKEphemeralSecretKey ¶
func (*Session) GetSecretKey ¶
GetSecretKey loads the secret key from the ObjectStore.
func (*Session) GetSecretKeyForGroup ¶
func (*Session) GetSessionFromContext ¶
func (*Session) GetSessionFromID ¶
func (*Session) GetShamirPublicPoints ¶
func (sess *Session) GetShamirPublicPoints() map[helium.NodeID]drlwe.ShamirPublicPoint
func (*Session) GetShamirPublicPointsList ¶
func (sess *Session) GetShamirPublicPointsList() []drlwe.ShamirPublicPoint
func (*Session) GetThresholdSecretKey ¶
func (sess *Session) GetThresholdSecretKey() (*drlwe.ShamirSecretShare, error)
GetThresholdSecretKey loads the secret key from the ObjectStore.
type SessionProvider ¶
type SessionStore ¶
type SessionStore struct {
// contains filtered or unexported fields
}
func NewSessionStore ¶
func NewSessionStore() *SessionStore
func (*SessionStore) GetSessionFromID ¶
func (s *SessionStore) GetSessionFromID(id helium.SessionID) (*Session, bool)
func (*SessionStore) NewRLWESession ¶
func (s *SessionStore) NewRLWESession(sessParams Parameters, nodeID helium.NodeID) (sess *Session, err error)
type TestSession ¶
type TestSession struct {
SessParams Parameters
RlweParams bgv.Parameters
SkIdeal *rlwe.SecretKey
NodeSessions map[helium.NodeID]*Session
HelperSession *Session
// key backend
*helium.CachedKeyBackend
// lattigo helpers
Encoder *bgv.Encoder
Encryptor *rlwe.Encryptor
Decrpytor *rlwe.Decryptor
}
func NewTestSession ¶
func NewTestSession(N, T int, rlweparams bgv.ParametersLiteral, helperID helium.NodeID) (*TestSession, error)
func NewTestSessionFromParams ¶
func NewTestSessionFromParams(sp Parameters, helperID helium.NodeID) (*TestSession, error)
Click to show internal directories.
Click to hide internal directories.