helib::SKHandle Class Reference
A handle, describing the secret-key element that "matches" a part, of the form s^r(X^t). More...
#include <Ctxt.h>
Public Member Functions | |
| SKHandle (long newPowerOfS=0, long newPowerOfX=1, long newSecretKeyID=0) | |
| void | setBase (long newSecretKeyID=-1) |
| Set powerOfS=powerOfX=1. More... | |
| bool | isBase (long ofKeyID=0) const |
| Is powerOfS==powerOfX==1? More... | |
| void | setOne (long newSecretKeyID=-1) |
| Set powerOfS=0, powerOfX=1. More... | |
| bool | isOne () const |
| Is powerOfS==0? More... | |
| bool | operator== (const SKHandle &other) const |
| bool | operator!= (const SKHandle &other) const |
| long | getPowerOfS () const |
| long | getPowerOfX () const |
| long | getSecretKeyID () const |
| bool | mul (const SKHandle &a, const SKHandle &b) |
| Computes the "product" of two handles. More... | |
| void | read (std::istream &str) |
| void | write (std::ostream &str) const |
Friends | |
| class | Ctxt |
| std::istream & | operator>> (std::istream &s, SKHandle &handle) |
Detailed Description
A handle, describing the secret-key element that "matches" a part, of the form s^r(X^t).
Constructor & Destructor Documentation
◆ SKHandle()
|
inline |
Member Function Documentation
◆ getPowerOfS()
|
inline |
◆ getPowerOfX()
|
inline |
◆ getSecretKeyID()
|
inline |
◆ isBase()
|
inline |
Is powerOfS==powerOfX==1?
◆ isOne()
|
inline |
Is powerOfS==0?
◆ mul()
Computes the "product" of two handles.
The key-ID's and powers of X must match, else an error state arises, which is represented using a key-ID of -1 and returning false. Also, note that inputs may alias outputs.
To determine if the resulting handle can be re-linearized using some key-switching matrices from the public key, use the method pubKey.haveKeySWmatrix(handle,handle.secretKeyID), from the class PubKey in keys.h
◆ operator!=()
|
inline |
◆ operator==()
|
inline |
◆ read()
| void helib::SKHandle::read | ( | std::istream & | str | ) |
◆ setBase()
|
inline |
Set powerOfS=powerOfX=1.
◆ setOne()
|
inline |
Set powerOfS=0, powerOfX=1.
◆ write()
| void helib::SKHandle::write | ( | std::ostream & | str | ) | const |
Friends And Related Function Documentation
◆ Ctxt
|
friend |
◆ operator>>
|
friend |
1.8.19