ret = i*m + j;
solFound = true;
}
+ assert(solFound ⇒ ∃i:nat with i < m. ∃j:nat with j < m. ret = i*m +j);
}
b[i+1] = b[i]*gim % p; // Giant-Step
+ assert( (¬solFound) ⇒ (∀i2:nat with i2 < i. ∀j:nat with j < m. A[i2] ≠ b[j]));
}
- assert(solFound = true â\88§ ∃r:nat with r < m. ∃s:nat with s < m. A[r] = b[s]);
-//// overflow in result... assert(∃r:nat with r < m. ∃s:nat with s < m. A[r] = b[s] ∧ (g^(s*m)%p * (g^r%p) = a));
+ assert(solFound = true â\87\92 ∃r:nat with r < m. ∃s:nat with s < m. A[r] = b[s]);
+ assert(∃r:nat with r < m. ∃s:nat with s < m. A[r] = b[s] ∧ PowerMod(g,s*m+r,p)=a);
// solFound = false should never be the case (see theorem DiscreteLogExists)
return ret;