Versions in this module Expand all Collapse all v1 v1.1.3 Jan 28, 2022 Changes in this version + type AesRandReader struct + func NewAesRandReader() (*AesRandReader, error) + func (r *AesRandReader) Read(p []byte) (_ int, err error) v1.1.2 Jan 27, 2022 v1.1.1 Jan 12, 2021 v1.1.0 Jan 19, 2022 v1.0.0 Mar 7, 2021 Changes in this version + const BOX_KEY_SIZE + const NONCE_SIZE + const Overhead + const POINT_SIZE + const SHARED_KEY_SIZE + const SymmetricKeySize + func Encrypt(msg []byte, aux []byte, nonce *[NONCE_SIZE]byte, key *[BOX_KEY_SIZE]byte) []byte + func GenerateP256Key() (*big.Int, *big.Int, *big.Int) + func GenerateP256KeyWithBase(basex, basey *big.Int) (*big.Int, *big.Int, *big.Int) + func LogEquivalence(exp, basex1, basey1, x1, y1, basex2, basey2, x2, y2 *big.Int) []byte + func Nonce(round, row, index int) [NONCE_SIZE]byte + func OnionEncrypt(msg []byte, auxs [][]byte, nonces [][]byte, keys [][]byte) []byte + func Open(out, abox []byte, nonce *[24]byte, peersPublicKey, privateKey *[32]byte) ([]byte, bool) + func P256DecryptionWorker(nonce *[NONCE_SIZE]byte, auxSize int, wg *sync.WaitGroup, ...) + func P256KeyToBytes(x, y, priv *big.Int) ([]byte, []byte) + func P256OnionEncrypt(msg []byte, auxs [][]byte, nonces [][]byte, keys [][]byte, nizk bool) ([]byte, []byte) + func PoKLog(exp, x, y *big.Int) []byte + func Seal(out, message []byte, nonce *[24]byte, peersPublicKey, privateKey *[32]byte) []byte + func SecretOpen(out, box []byte, nonce *[24]byte, key *[32]byte) ([]byte, bool) + func SecretSeal(out, message []byte, nonce *[24]byte, key *[32]byte) []byte + func VerifyLogEquivalence(basex1, basey1, x1, y1, basex2, basey2, x2, y2 *big.Int, prf []byte) bool + func VerifyPoKLog(x, y *big.Int, prf []byte) bool + type AuxProcessor = func([]byte, []byte, int) (bool, []byte) + type DecryptionJob struct + AuxProcessor AuxProcessor + Ciphertext []byte + Idx int + Keypairs []KeyPair + Keystore Keystore + KyberPrivateKey kyber.Scalar + PrivateBlindKey []byte + PrivateKey *[BOX_KEY_SIZE]byte + ProdJob chan []byte + ProdWg *sync.WaitGroup + Result [][]byte + type DecryptionWorker = func(nonce *[NONCE_SIZE]byte, auxSize int, wg *sync.WaitGroup, ...) + type KeyPair struct + Public []byte + Shared [32]byte + type Keystore struct + Memory map[string][32]byte + Mu *sync.RWMutex + type Mix interface + AddCiphertexts func(round int, ciphertexts [][]byte, prfs [][]byte) error + AddMessages func(round int, msgs [][]byte) error + BlindKey func(round int) ([]byte, error) + ConfirmVerification func(round int, success bool) error + EndRound func(round int) error + Mix func(round int) ([][]byte, error) + NewRound func(round int, config RoundConfiguration) error + ProveMix func(round int) ([][]byte, []byte, error) + RoundConfiguration func(round int) (RoundConfiguration, error) + RoundKey func(round int) ([]byte, error) + SetAuxProcessor func(round int, auxProcessor AuxProcessor) error + SetBlindKey func(round int, publicKeys [][]byte, privateKey []byte) error + SetRoundKey func(round int, publicKey, privateKey []byte) error + SetRoundSuite func(round int, suite suites.Suite) error + Shuffler func(round int) (*Shuffler, error) + StartRound func(round int) error + Terminate func(round int) error + VerifyProof func(round, index int, in [][]byte, proof []byte) error + func NewMix(dw DecryptionWorker) Mix + type RoundConfiguration struct + AuxSize int + ClientVerifiable bool + First bool + GroupSize int + Index int + Last bool + Layer int + Row int + Verifiable bool + type Shuffler struct + func NewShuffler(rand io.Reader) *Shuffler + func (sr *Shuffler) Shuffle(in [][]byte)