Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 225
  • Last Modified:

Euclid Algorithm

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?
0
edi02
Asked:
edi02
  • 2
1 Solution
 
luv2smileCommented:
You may want to post your question in the programming section so the appropriate experts will see it. This is the Windows 2000 operating system section.
0
 
Danny ChildIT ManagerCommented:
... and experts can't do assignments for users...
http://www.experts-exchange.com/Operating_Systems/Win2000/help.jsp#hi105

you'll have to figure the solution yourself, but feel free to ask for "pointers"
0
 
oBdACommented:
Here's an explanation of the Euclid algorithm: http://www.maths.lse.ac.uk/Courses/MA314/euclid.pdf. Based on this, you should be able to understand the principle, and to create your program. The former is more important: if someone gives you a piece of code, and you present it, you'll probably be asked why it produces the correct output; if you start stuttering away, chances are this will not be recognized as a valid solution ...
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now