I have a cryptography assignement and I have to find Bob's secret key based on Euclid algorithm. In my Lecture Notes is written:
Given two numbers (r,s), the algorithm outputs a number x such that r*x=1(mod s)
I'm using Java to write the app to solve this. I have r and s and I have to find x.
There is a method in Java to do this, or can anyoane to give any ideas?