libtom / libtomcrypt

LibTomCrypt is a fairly comprehensive, modular and portable cryptographic toolkit that provides developers with a vast array of well known published block ciphers, one-way hash functions, chaining modes, pseudo-random number generators, public key cryptography and a plethora of other routines.
https://www.libtom.net
Other
1.57k stars 458 forks source link

Wrong sign in documentation of 12.3.2 Extended Key Generation #628

Closed ulikos closed 1 year ago

ulikos commented 1 year ago

Prerequisites

Description

There seems to by a wrong sign in the elliptic curve formula in chapter 12.3.2 in the documentation, there is - a instead of + a. (Probably a reminder of the old form - 3.)

Steps to Reproduce

Version

v1.18.2-717-g1e629e6f

Additional Information

Suggested patch:

diff --git a/doc/crypt.tex b/doc/crypt.tex
index 9a383346..eedf054a 100644
--- a/doc/crypt.tex
+++ b/doc/crypt.tex
@@ -5185,7 +5185,7 @@ typedef struct {
 } ltc_ecc_curve;
 \end{verbatim}

-The curve must be of the form $y^2 = x^3 - a \cdot x + b$, and all of the \textit{const char*} parameters have to be encoded in hexadecimal format.
+The curve must be of the form $y^2 = x^3 + a \cdot x + b$, and all of the \textit{const char*} parameters have to be encoded in hexadecimal format.

 Advanced example of creating an ECC key:
 \begin{small}
sjaeckel commented 1 year ago

Thanks for reporting the issue and providing a fix!