libzahl.7 - libzahl - big integer library | |
git clone git://git.suckless.org/libzahl | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
libzahl.7 (2304B) | |
--- | |
1 .TH LIBZAHL 7 libzahl | |
2 .SH NAME | |
3 libzahl - Big integer library | |
4 .SH ETYMOLOGY | |
5 The bold uppercase \(aqZ\(aq which represents the | |
6 set of all integers is derived from the german word | |
7 \(aqZahlen\(aq, whose singular is \(aqZahl\(aq. | |
8 .SH DESCRIPTION | |
9 .B libzahl | |
10 is a C library for arbitrary size integers, that | |
11 aims to be usable for robust programs, and be | |
12 fast. | |
13 .P | |
14 .B libzahl | |
15 will accomplish this by using long jumps when an | |
16 error is detected, rather than letting the caller | |
17 also perform a check. This shall make the code in | |
18 the user program cleaner too. | |
19 .B libzahl | |
20 will use dedicated temporary bignum integers whether | |
21 possible, and necessary, for its internal calculations. | |
22 .B libzahl | |
23 will not deallocate allocations, but rather cache | |
24 them for reuse. | |
25 .P | |
26 With the exception of functions working with strings, | |
27 all output parameters are before the input parameters. | |
28 .P | |
29 Like any self-respecting big number library, libzahl | |
30 supports assign values to variables that are also | |
31 input variables. However, keep in mind that commutative | |
32 functions are optimised for the first operand to also | |
33 be the output over the second operand to also be the | |
34 input. For example, \fIzadd(a,a,b)\fP should be faster | |
35 than \fIzadd(a,b,a)\fP, although both are supported. | |
36 Whether or not the function believe that it is more | |
37 likely to occur that the input variables are different | |
38 that the output variable than the output variable | |
39 being the first input variable depends on the function. | |
40 Some functions are implemented to believe that the | |
41 first is more likely, other fucntions are implemented | |
42 to believe that the latter is more likely. | |
43 .SH RATIONALE | |
44 GMP MP cannot be used for robust programs. LibTomMath | |
45 is too slow, probably because of all memory allocations, | |
46 and has an nonintuitive API. Hebimath is promising, but | |
47 I think it can be done better. | |
48 .SH NOTES | |
49 .B libzahl | |
50 is currently not thread-safe. | |
51 .P | |
52 You are strongly discouraged from using | |
53 .B libzahl | |
54 for cryptographic applications. Instead, use a library | |
55 specifically targeting cryptography, otherwise, your | |
56 program may be subject to side-channel attacks such as | |
57 timing attacks, power-monitoring attacks, electromagnetic | |
58 attacks, acoustic cryptanalysis, and data remanence | |
59 attacks. | |
60 .B libzahl | |
61 is known to be susceptible to timing attacks and data | |
62 remanence attacks. | |
63 .SH SEE ALSO | |
64 .BR zsetup (3) |