lol-0.3.0.0: A library for lattice cryptography.

Safe HaskellNone
LanguageHaskell2010

Crypto.Lol.RLWE.RLWR

Description

Functions and types for working with ring-LWR samples.

Synopsis

Documentation

type Sample t m zq zp = (Cyc t m zq, Cyc t m zp) Source

An RLWR sample (a,b) in R_q times R_p.

type RLWRCtx t m zq zp = (Fact m, Ring zq, RescaleCyc (Cyc t) zq zp, CElt t zq, CElt t zp) Source

Common constraints for working with RLWR.

sample :: (RLWRCtx t m zq zp, Random zq, MonadRandom rnd) => Cyc t m zq -> rnd (Sample t m zq zp) Source

An RLWR sample with the given secret.

roundedProd :: RLWRCtx t m zq zp => Cyc t m zq -> Cyc t m zq -> Cyc t m zp Source

The b component of an RLWR sample for secret s and given a, produced by rounding a*s in the decoding basis.