]> git.saurik.com Git - apple/security.git/blob - OSX/libsecurity_cryptkit/lib/CurveParamDocs/ellproj.h
Security-59754.80.3.tar.gz
[apple/security.git] / OSX / libsecurity_cryptkit / lib / CurveParamDocs / ellproj.h
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
18 typedef struct /* This is how to define a projective point. */
19 {
20 giant x;
21 giant y;
22 giant z;
23 } point_struct_proj;
24
25 typedef point_struct_proj *point_proj;
26
27 point_proj /* Allocates a new projective point. */
28 new_point_proj(int shorts);
29
30 void /* Frees point. */
31 free_point_proj(point_proj pt);
32
33 void /* Copies point to point. */
34 ptop_proj(point_proj pt1, point_proj pt2);
35
36 void /* Initialization. */
37 init_ell_proj(int shorts);
38
39 void /* Point doubling. */
40 ell_double_proj(point_proj pt, giant a, giant p);
41
42 void /* Point addition. */
43 ell_add_proj(point_proj pt0, point_proj pt1, giant a, giant p);
44
45 void /* Point negation. */
46 ell_neg_proj(point_proj pt, giant p);
47
48 void /* Point subtraction. */
49 ell_sub_proj(point_proj pt0, point_proj pt1, giant a, giant p);
50
51 void /* General elliptic mul. */
52 ell_mul_proj(point_proj pt0, point_proj pt1, giant k, giant a, giant p);
53
54 void /* Generate normalized point (X, Y, 1) from given (x,y,z). */
55 normalize_proj(point_proj pt, giant p);
56
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);
59