-/* $OpenBSD: ec2_smpl.c,v 1.28 2022/11/26 16:08:52 tb Exp $ */
+/* $OpenBSD: ec2_smpl.c,v 1.29 2023/03/07 05:35:13 jsing Exp $ */
/* ====================================================================
* Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
*
}
-/* Initialize a GF(2^m)-based EC_GROUP structure.
+/*
+ * Initialize a GF(2^m)-based EC_GROUP structure.
* Note that all other members are handled by EC_GROUP_new.
*/
int
}
-/* Free a GF(2^m)-based EC_GROUP structure.
+/*
+ * Free a GF(2^m)-based EC_GROUP structure.
* Note that all other members are handled by EC_GROUP_free.
*/
void
}
-/* Clear and free a GF(2^m)-based EC_GROUP structure.
+/*
+ * Clear and free a GF(2^m)-based EC_GROUP structure.
* Note that all other members are handled by EC_GROUP_clear_free.
*/
void
}
-/* Copy a GF(2^m)-based EC_GROUP structure.
+/*
+ * Copy a GF(2^m)-based EC_GROUP structure.
* Note that all other members are handled by EC_GROUP_copy.
*/
int
}
-/* Get the curve parameters of an EC_GROUP structure.
+/*
+ * Get the curve parameters of an EC_GROUP structure.
* If p, a, or b are NULL then there values will not be set but the method will return with success.
*/
int
}
-/* Checks the discriminant of the curve.
+/*
+ * Checks the discriminant of the curve.
* y^2 + x*y = x^3 + a*x^2 + b is an elliptic curve <=> b != 0 (mod p)
*/
int
}
-/* Set an EC_POINT to the point at infinity.
+/*
+ * Set an EC_POINT to the point at infinity.
* A point at infinity is represented by having Z=0.
*/
int
}
-/* Set the coordinates of an EC_POINT using affine coordinates.
+/*
+ * Set the coordinates of an EC_POINT using affine coordinates.
* Note that the simple implementation only uses affine coordinates.
*/
int
}
-/* Gets the affine coordinates of an EC_POINT.
+/*
+ * Gets the affine coordinates of an EC_POINT.
* Note that the simple implementation only uses affine coordinates.
*/
int
return ret;
}
-/* Computes a + b and stores the result in r. r could be a or b, a could be b.
+/*
+ * Computes a + b and stores the result in r. r could be a or b, a could be b.
* Uses algorithm A.10.2 of IEEE P1363.
*/
int
}
-/* Computes 2 * a and stores the result in r. r could be a.
+/*
+ * Computes 2 * a and stores the result in r. r could be a.
* Uses algorithm A.10.2 of IEEE P1363.
*/
int
}
-/* Determines whether the given EC_POINT is an actual point on the curve defined
+/*
+ * Determines whether the given EC_POINT is an actual point on the curve defined
* in the EC_GROUP. A point is valid if it satisfies the Weierstrass equation:
* y^2 + x*y = x^3 + a*x^2 + b.
*/
}
-/* Indicates whether two points are equal.
+/*
+ * Indicates whether two points are equal.
* Return values:
* -1 error
* 0 equal (in affine coordinates)