~zooko/cryptopp/trunk

« back to all changes in this revision

Viewing changes to gfpcrypt.cpp

  • Committer: weidai
  • Date: 2006-12-09 17:18:13 UTC
  • Revision ID: svn-v4:57ff6487-cd31-0410-9ec3-f628ee90f5f0:trunk/c5:247
add Salsa20 cipher

Show diffs side-by-side

added added

removed removed

Lines of Context:
148
148
                // and at most 1 bit is leaked if it's false
149
149
                bool fullValidate = (GetFieldType() == 2 && level >= 3) || !FastSubgroupCheckAvailable();
150
150
 
151
 
                if (fullValidate && pass)
152
 
                {
153
 
                        Integer gp = gpc ? gpc->Exponentiate(GetGroupPrecomputation(), q) : ExponentiateElement(g, q);
154
 
                        pass = pass && IsIdentity(gp);
155
 
                }
 
151
                if (fullValidate)
 
152
                        pass = pass && IsIdentity(gpc ? gpc->Exponentiate(GetGroupPrecomputation(), q) : ExponentiateElement(g, q));
156
153
                else if (GetFieldType() == 1)
157
154
                        pass = pass && Jacobi(g, p) == 1;
158
155
        }