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
I'm basing my calculation of the fact that
can be computed by
as per this Wikipedia article on Digital Signature Algorithm