AugPake implementation Doubt K computation try to implement the AugPake protocol in java using BigInteger.

I am having some difficulty computing $K=Y^z \mod p$ because $z$ is always $0$, for $z={1\over x+(w*r)} \mod q$. Being a ratio between $1$ and a very large number $z$ will be always zero using the BigInteger.

Can help me to understand how to compute $z$? Maybe I misunderstood some of the document.



Thanks for your reponse.

To compute Z i use the extended Euclidean algorithm:
ax + qy = gdc(a,b)

Thanks a lot
This is not ordinary real-valued division.

The computation you are looking at is done in the field $\mathbb F_q$ instead of $\mathbb R$, that is $1/x$ actually is the modular multiplicative inverse of $x\bmod q$.