9 = 2^X mod 11
What is X and how do you find X?
Its related to finding the plain text in RSA algorithm and I’m writing a C program for it.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The answer is 6 + 10i for any integer i.
A simple way to get solutions for small moduli is to iterate over all values of x. You only need to check between 0 and 10 (= 11 – 1) to find the first solution, if any solution exists.
Output:
Obviously this will take a long time if the modulus is large.
More information is on the Discrete Logarithm page. Note:
If it were easy to invert modular exponetiation, it wouldn’t be a good cryptographic primitive.