Submitted:
12 September 2024
Posted:
16 September 2024
You are already at the latest version
Abstract
Keywords:
MSC: Primary 11T71; Secondary 11A07
1. Introduction
2. Discrete Logarithm Calculation Algorithms
- (1)
- We compute the congruence and find .
- (2)
- If for some , then is a particular solution and we go to point (6). If , then we go to the next step.
- (3)
- Substituting into the initial congruence and after appropriate reduction, we obtain .
- (4)
- We calculate the congruence and find .
- (5)
- If for some , then is a particular solution and we go to step (6). If , we return to step (1).
- (6)
- If x is a particular solution, then the general solution is , where is an Euler function and the number satisfies .
- (1)
- We factor n: .
- (2)
- For each such that , we proceed to calculate .
- (3)
- Since a and are coprime, we use the previous algorithm to compute x.
- (4)
- If we compute different x for different i, we use the Chinese Remainder Theorem to obtain the unique result x.
- (5)
- If x is a particular solution, then the general solution is , where is an Euler function and the number satisfies .
- (1)
- If , then
- (2)
- has a solution where .
- (1)
- or ,
- (2)
- , where , has no solution.
3. Some Examples
- (1)
- We calculate from the congruence . It is easy to calculate that .
- (2)
- Since , we substitute into . After reduction we get .
- (3)
- We calculate from the congruence . It is easy to calculate that .
- (4)
- Since , we substitute into . After reduction we get .
- (5)
- We calculate from the congruence . It is easy to calculate that .
- (6)
- Since , we substitute into . We get .
- (7)
- From the congruence property we get , so , which is our particular solution.
- (8)
- Since , the general solution is for all .
- (1)
- We calculate from the congruence . It is easy to calculate that .
- (2)
- Since , we substitute into . After reduction we obtain .
- (3)
- We calculate from the congruence . It is easy to calculate that .
- (4)
- Since , we substitute into . After reduction we get .
- (5)
- We calculate from the congruence . It is easy to calculate that .
- (6)
- Since , we substitute into . After reduction we get .
- (7)
- We calculate from the congruence . It is easy to calculate that .
- (8)
- Since , we substitute into . After reduction we get .
- (9)
- We calculate from the congruence . It is easy to calculate that .
- (10)
- Since , we substitute into . After reduction we get .
- (11)
- We calculate from the congruence . It is easy to calculate that .
- (12)
- Since , we substitute into . After reduction we get .
- (13)
- Notice that we repeat the value . Counting further we see that , , …. Therefore has no solution.
- (1)
- We have . So we can consider the system of congruences:
- (2)
- The first two congruences in the system are identical. So let’s calculate only the last one, which is . After reduction we have .
- (3)
- We calculate from the congruence . It is easy to calculate that .
- (4)
- Since , then substituting into we have .
- (5)
- The particular solution is . The general solution is , .
4. Breaking the Diffie-Hellman Protocol
- (1)
- We want to calculate Alice’s key a from the congruence , which is .
- (2)
- According to the algorithm, we calculate the congruence and get , which is not a power of 5.
- (3)
- We replace the number 4 with and insert it into . After reduction, we get .
- (4)
- We calculate the congruence of and get , which is not a power of 5.
- (5)
- We replace the number 10 with and insert it into . After reduction we get .
- (6)
- We calculate the congruence of and get , which is a power of 5.
- (7)
- We replace the number 2 with the number and insert it into . We get .
- (8)
- So , so is the number we are looking for.
- (1)
- We want to calculate Bob’s key b from the congruence , which is .
- (2)
- According to the algorithm, we calculate the congruence and get , which is not a power of 5.
- (3)
- We replace the number 10 with and insert it into . After reduction, we get .
- (4)
- We calculate the congruence and get which is a power of 5.
- (5)
- We replace the number 2 with the number and insert it into . We get .
- (6)
- So , so is the number we are looking for.
References
- Adrian, David; Imperfect Forward Secrecy: How Diffie–Hellman Fails in Practice, Archived (PDF) from the original on 2015-09-06, (October 2015). [CrossRef]
- Diffie, Whitfield; Hellman, Martin E., New Directions in Cryptography, IEEE Transactions on Information Theory. 22 (6): 644–654, (November 1976).
- Ellis, J. H., The possibility of Non-Secret digital encryption, CESG Research Report. Retrieved 2015-08-28. (January 1970).
- Menezes, A. J.; van Oorschot, P. C.; Vanstone, S. A., Chapter 8.4 ElGamal public-key encryption, Handbook of Applied Cryptography. CRC Press. [CrossRef]
- Merkle, Ralph C., Secure Communications Over Insecure Channels. Communications of the ACM. 21 (4): 294–299, (April 1978), CiteSeerX 10.1.1.364.5157. [CrossRef]
- Wong, David, Key exchange standards, Real World Cryptography. Manning. ISBN 9781617296710 – via Google Books, 2021.
- GCHQ trio recognised for key to secure shopping online, BBC News. 5 October 2010. Retrieved 5 August 2014.
- The Possibility of Secure Secret Digital Encryption, Retrieved 2017-07-08.
- US patent 4200770.
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2024 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).