Exemplo n.º 1
0
        public BigInt GetNextSeed(int i = 0)
        {
            BigInt B2 = new BigInt(this.S.Size, 2);

            if (i <= 0)
            {
                BigInt Seed = this.S.PowModPrim(B2, this.N);
                return(Seed);
            }
            else
            {
                BigInt Index = new BigInt(this.S.Size, i);
                BigInt ScmPQ = BigInt.Scm(P - 1, Q - 1);
                BigInt Exp   = B2.PowModPrim(Index, ScmPQ);
                BigInt Seed  = this.S.PowModPrim(Exp, this.N);

                return(Seed);
            }
        }