Esempio n. 1
0
 public GlvTypeBParameters(BigInteger beta, BigInteger lambda, BigInteger[] v1, BigInteger[] v2,
                           BigInteger g1, BigInteger g2, int bits)
 {
     this.m_beta        = beta;
     this.m_lambda      = lambda;
     this.m_splitParams = new ScalarSplitParameters(v1, v2, g1, g2, bits);
 }
Esempio n. 2
0
        public static BigInteger[] DecomposeScalar(ScalarSplitParameters p, BigInteger k)
        {
            int        bits = p.Bits;
            BigInteger b1   = CalculateB(k, p.G1, bits);
            BigInteger b2   = CalculateB(k, p.G2, bits);

            BigInteger a = k.Subtract((b1.Multiply(p.V1A)).Add(b2.Multiply(p.V2A)));
            BigInteger b = (b1.Multiply(p.V1B)).Add(b2.Multiply(p.V2B)).Negate();

            return(new BigInteger[] { a, b });
        }
Esempio n. 3
0
 public GlvTypeAParameters(BigInteger i, BigInteger lambda, ScalarSplitParameters splitParams)
 {
     this.m_i           = i;
     this.m_lambda      = lambda;
     this.m_splitParams = splitParams;
 }
Esempio n. 4
0
 public GlvTypeBParameters(BigInteger beta, BigInteger lambda, ScalarSplitParameters splitParams)
 {
     this.m_beta        = beta;
     this.m_lambda      = lambda;
     this.m_splitParams = splitParams;
 }