]>
git.saurik.com Git - apple/security.git/blob - OSX/libsecurity_cryptkit/lib/CurveParamDocs/ellproj.h
1 /**************************************************************
5 * Header file for ellproj.c
8 * 3 Apr 98 REC - Creation
10 * c. 1998 Perfectly Scientific, Inc.
11 * All Rights Reserved.
14 *************************************************************/
18 typedef struct /* This is how to define a projective point. */
25 typedef point_struct_proj
*point_proj
;
27 point_proj
/* Allocates a new projective point. */
28 new_point_proj(int shorts
);
30 void /* Frees point. */
31 free_point_proj(point_proj pt
);
33 void /* Copies point to point. */
34 ptop_proj(point_proj pt1
, point_proj pt2
);
36 void /* Initialization. */
37 init_ell_proj(int shorts
);
39 void /* Point doubling. */
40 ell_double_proj(point_proj pt
, giant a
, giant p
);
42 void /* Point addition. */
43 ell_add_proj(point_proj pt0
, point_proj pt1
, giant a
, giant p
);
45 void /* Point negation. */
46 ell_neg_proj(point_proj pt
, giant p
);
48 void /* Point subtraction. */
49 ell_sub_proj(point_proj pt0
, point_proj pt1
, giant a
, giant p
);
51 void /* General elliptic mul. */
52 ell_mul_proj(point_proj pt0
, point_proj pt1
, giant k
, giant a
, giant p
);
54 void /* Generate normalized point (X, Y, 1) from given (x,y,z). */
55 normalize_proj(point_proj pt
, giant p
);
57 void /* Find a point (x, y, 1) on the curve. */
58 find_point_proj(point_proj pt
, giant seed
, giant a
, giant b
, giant p
);