I wish to implement the clifford cocks algorithm using GMP. In the encryption part: $c_1=t_1+at_1^{-1}\bmod n$. Following $( a b \bmod n ) = ((a \bmod n) \cdot (b \bmod n ))\bmod n$, I took the modular multiplicative inverse of $t_1$, multiplied by $(a \bmod n)$ added it to $(t_1 \bmod n)$ and again took the mod. Please someone suggest where am I going wrong. And is there any alternative approach to it?

  • $\begingroup$ @Jonathan Mckibbin : Please look at my edits including the use of \bmod. And it is uncouth to use an asterisk for ordinary multiplication in MathJax, LaTeX, or the like. $\endgroup$ – Michael Hardy Mar 3 '15 at 15:41

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.