RFC Errata
RFC 6090, "Fundamental Elliptic Curve Cryptography Algorithms", February 2011
Source of RFC: IETF - NON WORKING GROUPArea Assignment: sec
Errata ID: 6329
Status: Reported
Type: Editorial
Publication Format(s) : TEXT
Reported By: Yannik Klubertanz
Date Reported: 2020-11-06
Section F.1. says:
if P is (@,@), R = Q else if Q is (@,@), R = P else if P is not equal to Q and x1 is equal to x2, R = (@,@) else if P is not equal to Q and x1 is not equal to x2, x3 = ((y2-y1)/(x2-x1))^2 - x1 - x2 mod p and y3 = (x1-x3)*(y2-y1)/(x2-x1) - y1 mod p else if P is equal to Q and y1 is equal to 0, R = (@,@) else // P is equal to Q and y1 is not equal to 0 x3 = ((3*x1^2 + a)/(2*y1))^2 - 2*x1 mod p and y3 = (x1-x3)*(3*x1^2 + a)/(2*y1) - y mod p.
It should say:
if P is (@,@), R = Q else if Q is (@,@), R = P else if P is not equal to Q and x1 is equal to x2, R = (@,@) else if P is not equal to Q and x1 is not equal to x2, x3 = ((y2-y1)/(x2-x1))^2 - x1 - x2 mod p and y3 = (x1-x3)*(y2-y1)/(x2-x1) - y1 mod p else if P is equal to Q and y1 is equal to 0, R = (@,@) else // P is equal to Q and y1 is not equal to 0 x3 = ((3*x1^2 + a)/(2*y1))^2 - 2*x1 mod p and y3 = (x1-x3)*(3*x1^2 + a)/(2*y1) - y1 mod p.
Notes:
In the last case in the pseudocode, there's a typo. It should be "y1" mod p instead of "y mod p".