summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/man/EC_POINT_add.3
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/man/EC_POINT_add.3')
-rw-r--r--src/lib/libcrypto/man/EC_POINT_add.3220
1 files changed, 220 insertions, 0 deletions
diff --git a/src/lib/libcrypto/man/EC_POINT_add.3 b/src/lib/libcrypto/man/EC_POINT_add.3
new file mode 100644
index 0000000000..b8e3290952
--- /dev/null
+++ b/src/lib/libcrypto/man/EC_POINT_add.3
@@ -0,0 +1,220 @@
1.Dd $Mdocdate: November 2 2016 $
2.Dt EC_POINT_ADD 3
3.Os
4.Sh NAME
5.Nm EC_POINT_add ,
6.Nm EC_POINT_dbl ,
7.Nm EC_POINT_invert ,
8.Nm EC_POINT_is_at_infinity ,
9.Nm EC_POINT_is_on_curve ,
10.Nm EC_POINT_cmp ,
11.Nm EC_POINT_make_affine ,
12.Nm EC_POINTs_make_affine ,
13.Nm EC_POINTs_mul ,
14.Nm EC_POINT_mul ,
15.Nm EC_GROUP_precompute_mult ,
16.Nm EC_GROUP_have_precompute_mult
17.Nd perform mathematical operations and tests on EC_POINT objects
18.Sh SYNOPSIS
19.In openssl/ec.h
20.In openssl/bn.h
21.Ft int
22.Fo EC_POINT_add
23.Fa "const EC_GROUP *group"
24.Fa "EC_POINT *r"
25.Fa "const EC_POINT *a"
26.Fa "const EC_POINT *b"
27.Fa "BN_CTX *ctx"
28.Fc
29.Ft int
30.Fo EC_POINT_dbl
31.Fa "const EC_GROUP *group"
32.Fa "EC_POINT *r"
33.Fa "const EC_POINT *a"
34.Fa "BN_CTX *ctx"
35.Fc
36.Ft int
37.Fo EC_POINT_invert
38.Fa "const EC_GROUP *group"
39.Fa "EC_POINT *a"
40.Fa "BN_CTX *ctx"
41.Fc
42.Ft int
43.Fo EC_POINT_is_at_infinity
44.Fa "const EC_GROUP *group"
45.Fa "const EC_POINT *p"
46.Fc
47.Ft int
48.Fo EC_POINT_is_on_curve
49.Fa "const EC_GROUP *group"
50.Fa "const EC_POINT *point"
51.Fa "BN_CTX *ctx"
52.Fc
53.Ft int
54.Fo EC_POINT_cmp
55.Fa "const EC_GROUP *group"
56.Fa "const EC_POINT *a"
57.Fa "const EC_POINT *b"
58.Fa "BN_CTX *ctx"
59.Fc
60.Ft int
61.Fo EC_POINT_make_affine
62.Fa "const EC_GROUP *group"
63.Fa "EC_POINT *point"
64.Fa "BN_CTX *ctx"
65.Fc
66.Ft int
67.Fo EC_POINTs_make_affine
68.Fa "const EC_GROUP *group"
69.Fa "size_t num"
70.Fa "EC_POINT *points[]"
71.Fa "BN_CTX *ctx"
72.Fc
73.Ft int
74.Fo EC_POINTs_mul
75.Fa "const EC_GROUP *group"
76.Fa "EC_POINT *r"
77.Fa "const BIGNUM *n"
78.Fa "size_t num"
79.Fa "const EC_POINT *p[]"
80.Fa "const BIGNUM *m[]"
81.Fa "BN_CTX *ctx"
82.Fc
83.Ft int
84.Fo EC_POINT_mul
85.Fa "const EC_GROUP *group"
86.Fa "EC_POINT *r"
87.Fa "const BIGNUM *n"
88.Fa "const EC_POINT *q"
89.Fa "const BIGNUM *m"
90.Fa "BN_CTX *ctx"
91.Fc
92.Ft int
93.Fo EC_GROUP_precompute_mult
94.Fa "EC_GROUP *group"
95.Fa "BN_CTX *ctx"
96.Fc
97.Ft int
98.Fo EC_GROUP_have_precompute_mult
99.Fa "const EC_GROUP *group"
100.Fc
101.Sh DESCRIPTION
102.Fn EC_POINT_add
103adds the two points
104.Fa a
105and
106.Fa b
107and places the result in
108.Fa r .
109Similarly
110.Fn EC_POINT_dbl
111doubles the point
112.Fa a
113and places the result in
114.Fa r .
115In both cases it is valid for
116.Fa r
117to be one of
118.Fa a
119or
120.Fa b .
121.Pp
122.Fn EC_POINT_invert
123calculates the inverse of the supplied point
124.Fa a .
125The result is placed back in
126.Fa a .
127.Pp
128The function
129.Fn EC_POINT_is_at_infinity
130tests whether the supplied point is at infinity or not.
131.Pp
132.Fn EC_POINT_is_on_curve
133tests whether the supplied point is on the curve or not.
134.Pp
135.Fn EC_POINT_cmp
136compares the two supplied points and tests whether or not they are
137equal.
138.Pp
139The functions
140.Fn EC_POINT_make_affine
141and
142.Fn EC_POINTs_make_affine
143force the internal representation of the
144.Vt EC_POINT Ns (s)
145into the affine coordinate system.
146In the case of
147.Fn EC_POINTs_make_affine ,
148the value
149.Fa num
150provides the number of points in the array
151.Fa points
152to be forced.
153.Pp
154.Fn EC_POINT_mul
155calculates the value
156.Pp
157.D1 generator * n + q * m
158.Pp
159and stores the result in
160.Fa r .
161The value
162.Fa n
163may be
164.Dv NULL ,
165in which case the result is just q * m.
166.Pp
167.Fn EC_POINTs_mul
168calculates the value
169.Pp
170.Dl generator * n + q[0] * m[0] + ... + q[num-1] * m[num-1]
171.Pp
172As for
173.Fn EC_POINT_mul ,
174the value
175.Fa n
176may be
177.Dv NULL .
178.Pp
179The function
180.Fn EC_GROUP_precompute_mult
181stores multiples of the generator for faster point multiplication,
182whilst
183.Fn EC_GROUP_have_precompute_mult
184tests whether precomputation has already been done.
185See
186.Xr EC_GROUP_copy 3
187for information about the generator.
188.Sh RETURN VALUES
189The following functions return 1 on success or 0 on error:
190.Fn EC_POINT_add ,
191.Fn EC_POINT_dbl ,
192.Fn EC_POINT_invert ,
193.Fn EC_POINT_make_affine ,
194.Fn EC_POINTs_make_affine ,
195.Fn EC_POINTs_make_affine ,
196.Fn EC_POINT_mul ,
197.Fn EC_POINTs_mul ,
198and
199.Fn EC_GROUP_precompute_mult .
200.Pp
201.Fn EC_POINT_is_at_infinity
202returns 1 if the point is at infinity or 0 otherwise.
203.Pp
204.Fn EC_POINT_is_on_curve
205returns 1 if the point is on the curve, 0 if not, or -1 on error.
206.Pp
207.Fn EC_POINT_cmp
208returns 1 if the points are not equal, 0 if they are, or -1 on error.
209.Pp
210.Fn EC_GROUP_have_precompute_mult
211returns 1 if a precomputation has been done or 0 if not.
212.Sh SEE ALSO
213.Xr crypto 3 ,
214.Xr d2i_ECPKParameters 3 ,
215.Xr ec 3 ,
216.Xr EC_GFp_simple_method 3 ,
217.Xr EC_GROUP_copy 3 ,
218.Xr EC_GROUP_new 3 ,
219.Xr EC_KEY_new 3 ,
220.Xr EC_POINT_new 3