Search code examples
.netvb.netbigintegerdsa

BigInteger ModInverse


Is this VB calculation

Dim s As BigInteger = (BigInteger.ModPow(k,q - 2,q) * (m + x * r)) Mod q

a proper implementation of this written calculation

enter image description here

I'm basing my calculation of the fact that

enter image description here

can be computed by

enter image description here

as per this Wikipedia article on Digital Signature Algorithm


Solution

  • I can confirm that this equation is correct.