]> git.saurik.com Git - apple/security.git/blame - OSX/include/security_cryptkit/CurveParamDocs/ellproj.h
Security-57336.1.9.tar.gz
[apple/security.git] / OSX / include / security_cryptkit / CurveParamDocs / ellproj.h
CommitLineData
b1ab9ed8
A
1/**************************************************************
2 *
3 * ellproj.h
4 *
5 * Header file for ellproj.c
6 *
7 * Updates:
8 * 3 Apr 98 REC - Creation
9 *
10 * c. 1998 Perfectly Scientific, Inc.
11 * All Rights Reserved.
12 *
13 *
14 *************************************************************/
15
16/* definitions */
17
18typedef struct /* This is how to define a projective point. */
19{
20 giant x;
21 giant y;
22 giant z;
23} point_struct_proj;
24
25typedef point_struct_proj *point_proj;
26
27point_proj /* Allocates a new projective point. */
28new_point_proj(int shorts);
29
30void /* Frees point. */
31free_point_proj(point_proj pt);
32
33void /* Copies point to point. */
34ptop_proj(point_proj pt1, point_proj pt2);
35
36void /* Initialization. */
37init_ell_proj(int shorts);
38
39void /* Point doubling. */
40ell_double_proj(point_proj pt, giant a, giant p);
41
42void /* Point addition. */
43ell_add_proj(point_proj pt0, point_proj pt1, giant a, giant p);
44
45void /* Point negation. */
46ell_neg_proj(point_proj pt, giant p);
47
48void /* Point subtraction. */
49ell_sub_proj(point_proj pt0, point_proj pt1, giant a, giant p);
50
51void /* General elliptic mul. */
52ell_mul_proj(point_proj pt0, point_proj pt1, giant k, giant a, giant p);
53
54void /* Generate normalized point (X, Y, 1) from given (x,y,z). */
55normalize_proj(point_proj pt, giant p);
56
57void /* Find a point (x, y, 1) on the curve. */
58find_point_proj(point_proj pt, giant seed, giant a, giant b, giant p);
59