summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortb <>2022-11-18 07:27:31 +0000
committertb <>2022-11-18 07:27:31 +0000
commit9750e2a87132894524966e967d44d545d9bec7ae (patch)
tree8a3414a54154469ea89f30fdfd1cbf47bd1741a2 /src
parent3244e3d0912b7dadf1bf04a3f571bd072f22ac5e (diff)
downloadopenbsd-9750e2a87132894524966e967d44d545d9bec7ae.tar.gz
openbsd-9750e2a87132894524966e967d44d545d9bec7ae.tar.bz2
openbsd-9750e2a87132894524966e967d44d545d9bec7ae.zip
polynominal -> polynomial
ok schwarze
Diffstat (limited to 'src')
-rw-r--r--src/lib/libcrypto/man/BN_GF2m_add.336
1 files changed, 18 insertions, 18 deletions
diff --git a/src/lib/libcrypto/man/BN_GF2m_add.3 b/src/lib/libcrypto/man/BN_GF2m_add.3
index 0442f7b6f4..693d737282 100644
--- a/src/lib/libcrypto/man/BN_GF2m_add.3
+++ b/src/lib/libcrypto/man/BN_GF2m_add.3
@@ -1,4 +1,4 @@
1.\" $OpenBSD: BN_GF2m_add.3,v 1.1 2022/11/18 01:21:40 schwarze Exp $ 1.\" $OpenBSD: BN_GF2m_add.3,v 1.2 2022/11/18 07:27:31 tb Exp $
2.\" 2.\"
3.\" Copyright (c) 2022 Ingo Schwarze <schwarze@openbsd.org> 3.\" Copyright (c) 2022 Ingo Schwarze <schwarze@openbsd.org>
4.\" 4.\"
@@ -199,9 +199,9 @@ on $roman GF left ( 2 sup m right )$, the Galois fields of order $2 sup m$,
199where $m$ is a natural number. 199where $m$ is a natural number.
200.Pp 200.Pp
201The $2 sup m$ elements of $roman GF left ( 2 sup m right )$ 201The $2 sup m$ elements of $roman GF left ( 2 sup m right )$
202are usually represented by the $2 sup m$ polynominals 202are usually represented by the $2 sup m$ polynomials
203of a degrees less than $m$ with binary coefficients. 203of a degrees less than $m$ with binary coefficients.
204Such a polynominal can either be specified by storing the coefficients 204Such a polynomial can either be specified by storing the coefficients
205in a 205in a
206.Vt BIGNUM 206.Vt BIGNUM
207object, using the $m$ lowest bits with bit numbers corresponding to degrees, 207object, using the $m$ lowest bits with bit numbers corresponding to degrees,
@@ -211,15 +211,15 @@ For the functions below, the array needs to be sorted in decreasing
211order and terminated by the delimiter element \-1. 211order and terminated by the delimiter element \-1.
212.Pp 212.Pp
213A specific representation of $roman GF left ( 2 sup m right )$ 213A specific representation of $roman GF left ( 2 sup m right )$
214is selected by choosing a polynominal of degree $m$ that is irreducible 214is selected by choosing a polynomial of degree $m$ that is irreducible
215with binary coefficients, called the reducing polynominal. 215with binary coefficients, called the reducing polynomial.
216Making sure that $p$ is of the correct degree and indeed irreducible 216Making sure that $p$ is of the correct degree and indeed irreducible
217is the responsibility of the user. 217is the responsibility of the user.
218Typically, the following functions silently produce nonsensical results 218Typically, the following functions silently produce nonsensical results
219when given a 219when given a
220.Fa p 220.Fa p
221argument that is of the wrong degree or that is reducible. 221argument that is of the wrong degree or that is reducible.
222Storing the reducing polynominal requires $m + 1$ bits in a 222Storing the reducing polynomial requires $m + 1$ bits in a
223.Vt BIGNUM 223.Vt BIGNUM
224object or an 224object or an
225.Vt int 225.Vt int
@@ -233,7 +233,7 @@ and
233point to the same object. 233point to the same object.
234.Pp 234.Pp
235.Fn BN_GF2m_add 235.Fn BN_GF2m_add
236adds the two polynominals 236adds the two polynomials
237.Fa a 237.Fa a
238and 238and
239.Fa b 239.Fa b
@@ -277,15 +277,15 @@ It is implemented as a macro.
277is an alias for 277is an alias for
278.Xr BN_ucmp 3 . 278.Xr BN_ucmp 3 .
279Despite its name, it does not attempt to find out whether the two 279Despite its name, it does not attempt to find out whether the two
280polynominals belong to the same congruence class with respect to some 280polynomials belong to the same congruence class with respect to some
281Galois group. 281Galois group.
282.Pp 282.Pp
283.Fn BN_GF2m_mod_arr 283.Fn BN_GF2m_mod_arr
284and its wrapper 284and its wrapper
285.Fn BN_GF2m_mod 285.Fn BN_GF2m_mod
286divide the polynominal with binary coefficients 286divide the polynomial with binary coefficients
287.Fa a 287.Fa a
288by the polynominal with binary coefficients 288by the polynomial with binary coefficients
289.Fa p 289.Fa p
290and place the remainder into 290and place the remainder into
291.Fa r 291.Fa r
@@ -334,7 +334,7 @@ reduce
334modulo 334modulo
335.Fa p , 335.Fa p ,
336find the multiplicative inverse element 336find the multiplicative inverse element
337in $roman GF left ( 2 sup m right )$ using the reducing polynominal $p$, 337in $roman GF left ( 2 sup m right )$ using the reducing polynomial $p$,
338and place the result into 338and place the result into
339.Fa r 339.Fa r
340.Po 340.Po
@@ -351,7 +351,7 @@ and
351modulo 351modulo
352.Fa p , 352.Fa p ,
353compute their quotient 353compute their quotient
354in $roman GF left ( 2 sup m right )$ using the reducing polynominal $p$, 354in $roman GF left ( 2 sup m right )$ using the reducing polynomial $p$,
355and place the result into 355and place the result into
356.Fa r 356.Fa r
357.Po 357.Po
@@ -367,7 +367,7 @@ modulo
367.Fa p , 367.Fa p ,
368raise it to the power of 368raise it to the power of
369.Fa exponent 369.Fa exponent
370in $roman GF left ( 2 sup m right )$ using the reducing polynominal $p$, 370in $roman GF left ( 2 sup m right )$ using the reducing polynomial $p$,
371and place the result into 371and place the result into
372.Fa r 372.Fa r
373.Po 373.Po
@@ -382,7 +382,7 @@ reduce
382modulo 382modulo
383.Fa p , 383.Fa p ,
384calculate the square root 384calculate the square root
385in $roman GF left ( 2 sup m right )$ using the reducing polynominal $p$ 385in $roman GF left ( 2 sup m right )$ using the reducing polynomial $p$
386by raising it to the power of $2 sup { m - 1 }$, 386by raising it to the power of $2 sup { m - 1 }$,
387and place the result into 387and place the result into
388.Fa r 388.Fa r
@@ -400,12 +400,12 @@ reduce
400modulo 400modulo
401.Fa p , 401.Fa p ,
402solve the quadratic equation $r sup 2 + r = a ( roman mod p )$ 402solve the quadratic equation $r sup 2 + r = a ( roman mod p )$
403in $roman GF left ( 2 sup m right )$ using the reducing polynominal $p$, 403in $roman GF left ( 2 sup m right )$ using the reducing polynomial $p$,
404and place the solution into 404and place the solution into
405.Fa r . 405.Fa r .
406.Pp 406.Pp
407.Fn BN_GF2m_poly2arr 407.Fn BN_GF2m_poly2arr
408converts a polynominal from a bit string stored in the 408converts a polynomial from a bit string stored in the
409.Vt BIGNUM 409.Vt BIGNUM
410object 410object
411.Fa poly_in 411.Fa poly_in
@@ -420,7 +420,7 @@ The array is filled with the degrees in decreasing order,
420followed by an element with the value \-1. 420followed by an element with the value \-1.
421.Pp 421.Pp
422.Fn BN_GF2m_arr2poly 422.Fn BN_GF2m_arr2poly
423converts a polynominal from the array 423converts a polynomial from the array
424.Fa arr_in 424.Fa arr_in
425containing degrees to a bit string placed in the 425containing degrees to a bit string placed in the
426.Vt BIGNUM 426.Vt BIGNUM
@@ -516,7 +516,7 @@ it contained more than five non-zero coefficients.
516.Re 516.Re
517.Sh BUGS 517.Sh BUGS
518.Fn BN_GF2m_mod 518.Fn BN_GF2m_mod
519is arbitrarily limited to reducing polynominals containing at most five 519is arbitrarily limited to reducing polynomials containing at most five
520non-zero coefficients and returns failure if 520non-zero coefficients and returns failure if
521.Fa p 521.Fa p
522contains six or more non-zero coefficients. 522contains six or more non-zero coefficients.