Merge pull request #138 from libtom/relicense

Re-license
This commit is contained in:
Steffen Jaeckel 2018-12-29 20:08:07 +01:00 committed by GitHub
commit 1eabbca8c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
145 changed files with 165 additions and 312 deletions

45
LICENSE
View File

@ -1,29 +1,26 @@
LibTomMath is licensed under DUAL licensing terms.
The LibTom license
Choose and use the license of your needs.
This is free and unencumbered software released into the public domain.
[LICENSE #1]
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
LibTomMath is public domain. As should all quality software be.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
of the public at large and to the detriment of our heirs and
successors. We intend this dedication to be an overt act of
relinquishment in perpetuity of all present and future rights to this
software under copyright law.
Tom St Denis
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
[/LICENSE #1]
[LICENSE #2]
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. You just DO WHAT THE FUCK YOU WANT TO.
[/LICENSE #2]
For more information, please refer to <http://unlicense.org/>

View File

@ -9,8 +9,7 @@
* Michael Fromberger but has been written from scratch with
* additional optimizations in place.
*
* The library is free for all purposes without any express
* guarantee it works.
* SPDX-License-Identifier: Unlicense
*/
static const struct {

View File

@ -9,8 +9,7 @@
* Michael Fromberger but has been written from scratch with
* additional optimizations in place.
*
* The library is free for all purposes without any express
* guarantee it works.
* SPDX-License-Identifier: Unlicense
*/
/* computes the modular inverse via binary extended euclidean algorithm,

View File

@ -9,8 +9,7 @@
* Michael Fromberger but has been written from scratch with
* additional optimizations in place.
*
* The library is free for all purposes without any express
* guarantee it works.
* SPDX-License-Identifier: Unlicense
*/
/* computes xR**-1 == x (mod N) via Montgomery Reduction

View File

@ -9,8 +9,7 @@
* Michael Fromberger but has been written from scratch with
* additional optimizations in place.
*
* The library is free for all purposes without any express
* guarantee it works.
* SPDX-License-Identifier: Unlicense
*/
/* Fast (comba) multiplier

View File

@ -9,8 +9,7 @@
* Michael Fromberger but has been written from scratch with
* additional optimizations in place.
*
* The library is free for all purposes without any express
* guarantee it works.
* SPDX-License-Identifier: Unlicense
*/
/* this is a modified version of fast_s_mul_digs that only produces

View File

@ -9,8 +9,7 @@
* Michael Fromberger but has been written from scratch with
* additional optimizations in place.
*
* The library is free for all purposes without any express
* guarantee it works.
* SPDX-License-Identifier: Unlicense
*/
/* the jist of squaring...

View File

@ -9,8 +9,7 @@
* Michael Fromberger but has been written from scratch with
* additional optimizations in place.
*
* The library is free for all purposes without any express
* guarantee it works.
* SPDX-License-Identifier: Unlicense
*/
/* computes a = 2**b

View File

@ -9,8 +9,7 @@
* Michael Fromberger but has been written from scratch with
* additional optimizations in place.
*
* The library is free for all purposes without any express
* guarantee it works.
* SPDX-License-Identifier: Unlicense
*/
/* b = |a|

View File

@ -9,8 +9,7 @@
* Michael Fromberger but has been written from scratch with
* additional optimizations in place.
*
* The library is free for all purposes without any express
* guarantee it works.
* SPDX-License-Identifier: Unlicense
*/
/* high level addition (handles signs) */

View File

@ -9,8 +9,7 @@
* Michael Fromberger but has been written from scratch with
* additional optimizations in place.
*
* The library is free for all purposes without any express
* guarantee it works.
* SPDX-License-Identifier: Unlicense
*/
/* single digit addition */

View File

@ -9,8 +9,7 @@
* Michael Fromberger but has been written from scratch with
* additional optimizations in place.
*
* The library is free for all purposes without any express
* guarantee it works.
* SPDX-License-Identifier: Unlicense
*/
/* d = a + b (mod c) */

View File

@ -9,8 +9,7 @@
* Michael Fromberger but has been written from scratch with
* additional optimizations in place.
*
* The library is free for all purposes without any express
* guarantee it works.
* SPDX-License-Identifier: Unlicense
*/
/* AND two ints together */

View File

@ -9,8 +9,7 @@
* Michael Fromberger but has been written from scratch with
* additional optimizations in place.
*
* The library is free for all purposes without any express
* guarantee it works.
* SPDX-License-Identifier: Unlicense
*/
/* trim unused digits

View File

@ -9,8 +9,7 @@
* Michael Fromberger but has been written from scratch with
* additional optimizations in place.
*
* The library is free for all purposes without any express
* guarantee it works.
* SPDX-License-Identifier: Unlicense
*/
/* clear one (frees) */

View File

@ -9,8 +9,7 @@
* Michael Fromberger but has been written from scratch with
* additional optimizations in place.
*
* The library is free for all purposes without any express
* guarantee it works.
* SPDX-License-Identifier: Unlicense
*/
#include <stdarg.h>

View File

@ -9,8 +9,7 @@
* Michael Fromberger but has been written from scratch with
* additional optimizations in place.
*
* The library is free for all purposes without any express
* guarantee it works.
* SPDX-License-Identifier: Unlicense
*/
/* compare two ints (signed)*/

View File

@ -9,8 +9,7 @@
* Michael Fromberger but has been written from scratch with
* additional optimizations in place.
*
* The library is free for all purposes without any express
* guarantee it works.
* SPDX-License-Identifier: Unlicense
*/
/* compare a digit */

View File

@ -9,8 +9,7 @@
* Michael Fromberger but has been written from scratch with
* additional optimizations in place.
*
* The library is free for all purposes without any express
* guarantee it works.
* SPDX-License-Identifier: Unlicense
*/
/* compare maginitude of two ints (unsigned) */

View File

@ -9,8 +9,7 @@
* Michael Fromberger but has been written from scratch with
* additional optimizations in place.
*
* The library is free for all purposes without any express
* guarantee it works.
* SPDX-License-Identifier: Unlicense
*/
static const int lnz[16] = {

View File

@ -9,8 +9,7 @@
* Michael Fromberger but has been written from scratch with
* additional optimizations in place.
*
* The library is free for all purposes without any express
* guarantee it works.
* SPDX-License-Identifier: Unlicense
*/
/* b = ~a */

View File

@ -9,8 +9,7 @@
* Michael Fromberger but has been written from scratch with
* additional optimizations in place.
*
* The library is free for all purposes without any express
* guarantee it works.
* SPDX-License-Identifier: Unlicense
*/
/* copy, b = a */

View File

@ -9,8 +9,7 @@
* Michael Fromberger but has been written from scratch with
* additional optimizations in place.
*
* The library is free for all purposes without any express
* guarantee it works.
* SPDX-License-Identifier: Unlicense
*/
/* returns the number of bits in an int */

View File

@ -9,8 +9,7 @@
* Michael Fromberger but has been written from scratch with
* additional optimizations in place.
*
* The library is free for all purposes without any express
* guarantee it works.
* SPDX-License-Identifier: Unlicense
*/
#ifdef BN_MP_DIV_SMALL

View File

@ -9,8 +9,7 @@
* Michael Fromberger but has been written from scratch with
* additional optimizations in place.
*
* The library is free for all purposes without any express
* guarantee it works.
* SPDX-License-Identifier: Unlicense
*/
/* b = a/2 */

View File

@ -9,8 +9,7 @@
* Michael Fromberger but has been written from scratch with
* additional optimizations in place.
*
* The library is free for all purposes without any express
* guarantee it works.
* SPDX-License-Identifier: Unlicense
*/
/* shift right by a certain bit count (store quotient in c, optional remainder in d) */

View File

@ -9,8 +9,7 @@
* Michael Fromberger but has been written from scratch with
* additional optimizations in place.
*
* The library is free for all purposes without any express
* guarantee it works.
* SPDX-License-Identifier: Unlicense
*/
/* divide by three (based on routine from MPI and the GMP manual) */

View File

@ -9,8 +9,7 @@
* Michael Fromberger but has been written from scratch with
* additional optimizations in place.
*
* The library is free for all purposes without any express
* guarantee it works.
* SPDX-License-Identifier: Unlicense
*/
static int s_is_power_of_two(mp_digit b, int *p)

View File

@ -9,8 +9,7 @@
* Michael Fromberger but has been written from scratch with
* additional optimizations in place.
*
* The library is free for all purposes without any express
* guarantee it works.
* SPDX-License-Identifier: Unlicense
*/
/* determines if a number is a valid DR modulus */

View File

@ -9,8 +9,7 @@
* Michael Fromberger but has been written from scratch with
* additional optimizations in place.
*
* The library is free for all purposes without any express
* guarantee it works.
* SPDX-License-Identifier: Unlicense
*/
/* reduce "x" in place modulo "n" using the Diminished Radix algorithm.

View File

@ -9,8 +9,7 @@
* Michael Fromberger but has been written from scratch with
* additional optimizations in place.
*
* The library is free for all purposes without any express
* guarantee it works.
* SPDX-License-Identifier: Unlicense
*/
/* determines the setup value */

View File

@ -9,8 +9,7 @@
* Michael Fromberger but has been written from scratch with
* additional optimizations in place.
*
* The library is free for all purposes without any express
* guarantee it works.
* SPDX-License-Identifier: Unlicense
*/
/* swap the elements of two integers, for cases where you can't simply swap the

View File

@ -9,8 +9,7 @@
* Michael Fromberger but has been written from scratch with
* additional optimizations in place.
*
* The library is free for all purposes without any express
* guarantee it works.
* SPDX-License-Identifier: Unlicense
*/
/* based on gmp's mpz_export.

View File

@ -9,8 +9,7 @@
* Michael Fromberger but has been written from scratch with
* additional optimizations in place.
*
* The library is free for all purposes without any express
* guarantee it works.
* SPDX-License-Identifier: Unlicense
*/
/* wrapper function for mp_expt_d_ex() */

View File

@ -9,8 +9,7 @@
* Michael Fromberger but has been written from scratch with
* additional optimizations in place.
*
* The library is free for all purposes without any express
* guarantee it works.
* SPDX-License-Identifier: Unlicense
*/
/* calculate c = a**b using a square-multiply algorithm */

View File

@ -9,8 +9,7 @@
* Michael Fromberger but has been written from scratch with
* additional optimizations in place.
*
* The library is free for all purposes without any express
* guarantee it works.
* SPDX-License-Identifier: Unlicense
*/

View File

@ -9,8 +9,7 @@
* Michael Fromberger but has been written from scratch with
* additional optimizations in place.
*
* The library is free for all purposes without any express
* guarantee it works.
* SPDX-License-Identifier: Unlicense
*/
/* computes Y == G**X mod P, HAC pp.616, Algorithm 14.85

View File

@ -9,8 +9,7 @@
* Michael Fromberger but has been written from scratch with
* additional optimizations in place.
*
* The library is free for all purposes without any express
* guarantee it works.
* SPDX-License-Identifier: Unlicense
*/
/* Extended euclidean algorithm of (a, b) produces

View File

@ -9,8 +9,7 @@
* Michael Fromberger but has been written from scratch with
* additional optimizations in place.
*
* The library is free for all purposes without any express
* guarantee it works.
* SPDX-License-Identifier: Unlicense
*/
#ifndef LTM_NO_FILE

View File

@ -9,8 +9,7 @@
* Michael Fromberger but has been written from scratch with
* additional optimizations in place.
*
* The library is free for all purposes without any express
* guarantee it works.
* SPDX-License-Identifier: Unlicense
*/
#ifndef LTM_NO_FILE

View File

@ -9,8 +9,7 @@
* Michael Fromberger but has been written from scratch with
* additional optimizations in place.
*
* The library is free for all purposes without any express
* guarantee it works.
* SPDX-License-Identifier: Unlicense
*/
/* Greatest Common Divisor using the binary method */

View File

@ -10,8 +10,7 @@
* Michael Fromberger but has been written from scratch with
* additional optimizations in place.
*
* The library is free for all purposes without any express
* guarantee it works.
* SPDX-License-Identifier: Unlicense
*/
/* Checks the bit at position b and returns MP_YES

View File

@ -9,8 +9,7 @@
* Michael Fromberger but has been written from scratch with
* additional optimizations in place.
*
* The library is free for all purposes without any express
* guarantee it works.
* SPDX-License-Identifier: Unlicense
*/
double mp_get_double(const mp_int *a)

View File

@ -9,8 +9,7 @@
* Michael Fromberger but has been written from scratch with
* additional optimizations in place.
*
* The library is free for all purposes without any express
* guarantee it works.
* SPDX-License-Identifier: Unlicense
*/
/* get the lower 32-bits of an mp_int */

View File

@ -9,8 +9,7 @@
* Michael Fromberger but has been written from scratch with
* additional optimizations in place.
*
* The library is free for all purposes without any express
* guarantee it works.
* SPDX-License-Identifier: Unlicense
*/
/* get the lower unsigned long of an mp_int, platform dependent */

View File

@ -9,8 +9,7 @@
* Michael Fromberger but has been written from scratch with
* additional optimizations in place.
*
* The library is free for all purposes without any express
* guarantee it works.
* SPDX-License-Identifier: Unlicense
*/
/* get the lower unsigned long long of an mp_int, platform dependent */

View File

@ -9,8 +9,7 @@
* Michael Fromberger but has been written from scratch with
* additional optimizations in place.
*
* The library is free for all purposes without any express
* guarantee it works.
* SPDX-License-Identifier: Unlicense
*/
/* grow as required */

View File

@ -9,8 +9,7 @@
* Michael Fromberger but has been written from scratch with
* additional optimizations in place.
*
* The library is free for all purposes without any express
* guarantee it works.
* SPDX-License-Identifier: Unlicense
*/
/* based on gmp's mpz_import.

View File

@ -9,8 +9,7 @@
* Michael Fromberger but has been written from scratch with
* additional optimizations in place.
*
* The library is free for all purposes without any express
* guarantee it works.
* SPDX-License-Identifier: Unlicense
*/
/* init a new mp_int */

View File

@ -9,8 +9,7 @@
* Michael Fromberger but has been written from scratch with
* additional optimizations in place.
*
* The library is free for all purposes without any express
* guarantee it works.
* SPDX-License-Identifier: Unlicense
*/
/* creates "a" then copies b into it */

View File

@ -9,8 +9,7 @@
* Michael Fromberger but has been written from scratch with
* additional optimizations in place.
*
* The library is free for all purposes without any express
* guarantee it works.
* SPDX-License-Identifier: Unlicense
*/
#include <stdarg.h>

View File

@ -9,8 +9,7 @@
* Michael Fromberger but has been written from scratch with
* additional optimizations in place.
*
* The library is free for all purposes without any express
* guarantee it works.
* SPDX-License-Identifier: Unlicense
*/
/* initialize and set a digit */

View File

@ -9,8 +9,7 @@
* Michael Fromberger but has been written from scratch with
* additional optimizations in place.
*
* The library is free for all purposes without any express
* guarantee it works.
* SPDX-License-Identifier: Unlicense
*/
/* initialize and set a digit */

View File

@ -9,8 +9,7 @@
* Michael Fromberger but has been written from scratch with
* additional optimizations in place.
*
* The library is free for all purposes without any express
* guarantee it works.
* SPDX-License-Identifier: Unlicense
*/
/* init an mp_init for a given size */

View File

@ -9,8 +9,7 @@
* Michael Fromberger but has been written from scratch with
* additional optimizations in place.
*
* The library is free for all purposes without any express
* guarantee it works.
* SPDX-License-Identifier: Unlicense
*/
/* hac 14.61, pp608 */

View File

@ -9,8 +9,7 @@
* Michael Fromberger but has been written from scratch with
* additional optimizations in place.
*
* The library is free for all purposes without any express
* guarantee it works.
* SPDX-License-Identifier: Unlicense
*/
/* hac 14.61, pp608 */

View File

@ -9,8 +9,7 @@
* Michael Fromberger but has been written from scratch with
* additional optimizations in place.
*
* The library is free for all purposes without any express
* guarantee it works.
* SPDX-License-Identifier: Unlicense
*/
/* Check if remainders are possible squares - fast exclude non-squares */

View File

@ -9,8 +9,7 @@
* Michael Fromberger but has been written from scratch with
* additional optimizations in place.
*
* The library is free for all purposes without any express
* guarantee it works.
* SPDX-License-Identifier: Unlicense
*/
/* computes the jacobi c = (a | n) (or Legendre if n is prime)

View File

@ -9,8 +9,7 @@
* Michael Fromberger but has been written from scratch with
* additional optimizations in place.
*
* The library is free for all purposes without any express
* guarantee it works.
* SPDX-License-Identifier: Unlicense
*/
/* c = |a| * |b| using Karatsuba Multiplication using

View File

@ -9,8 +9,7 @@
* Michael Fromberger but has been written from scratch with
* additional optimizations in place.
*
* The library is free for all purposes without any express
* guarantee it works.
* SPDX-License-Identifier: Unlicense
*/
/* Karatsuba squaring, computes b = a*a using three

View File

@ -10,8 +10,7 @@
* Michael Fromberger but has been written from scratch with
* additional optimizations in place.
*
* The library is free for all purposes without any express
* guarantee it works.
* SPDX-License-Identifier: Unlicense
*/
/*

View File

@ -9,8 +9,7 @@
* Michael Fromberger but has been written from scratch with
* additional optimizations in place.
*
* The library is free for all purposes without any express
* guarantee it works.
* SPDX-License-Identifier: Unlicense
*/
/* computes least common multiple as |a*b|/(a, b) */

View File

@ -9,8 +9,7 @@
* Michael Fromberger but has been written from scratch with
* additional optimizations in place.
*
* The library is free for all purposes without any express
* guarantee it works.
* SPDX-License-Identifier: Unlicense
*/
/* shift left a certain amount of digits */

View File

@ -9,8 +9,7 @@
* Michael Fromberger but has been written from scratch with
* additional optimizations in place.
*
* The library is free for all purposes without any express
* guarantee it works.
* SPDX-License-Identifier: Unlicense
*/
/* c = a mod b, 0 <= c < b if b > 0, b < c <= 0 if b < 0 */

View File

@ -9,8 +9,7 @@
* Michael Fromberger but has been written from scratch with
* additional optimizations in place.
*
* The library is free for all purposes without any express
* guarantee it works.
* SPDX-License-Identifier: Unlicense
*/
/* calc a value mod 2**b */

View File

@ -9,8 +9,7 @@
* Michael Fromberger but has been written from scratch with
* additional optimizations in place.
*
* The library is free for all purposes without any express
* guarantee it works.
* SPDX-License-Identifier: Unlicense
*/
int mp_mod_d(const mp_int *a, mp_digit b, mp_digit *c)

View File

@ -9,8 +9,7 @@
* Michael Fromberger but has been written from scratch with
* additional optimizations in place.
*
* The library is free for all purposes without any express
* guarantee it works.
* SPDX-License-Identifier: Unlicense
*/
/*

View File

@ -9,8 +9,7 @@
* Michael Fromberger but has been written from scratch with
* additional optimizations in place.
*
* The library is free for all purposes without any express
* guarantee it works.
* SPDX-License-Identifier: Unlicense
*/
/* computes xR**-1 == x (mod N) via Montgomery Reduction */

View File

@ -9,8 +9,7 @@
* Michael Fromberger but has been written from scratch with
* additional optimizations in place.
*
* The library is free for all purposes without any express
* guarantee it works.
* SPDX-License-Identifier: Unlicense
*/
/* setups the montgomery reduction stuff */

View File

@ -9,8 +9,7 @@
* Michael Fromberger but has been written from scratch with
* additional optimizations in place.
*
* The library is free for all purposes without any express
* guarantee it works.
* SPDX-License-Identifier: Unlicense
*/
/* high level multiplication (handles sign) */

View File

@ -9,8 +9,7 @@
* Michael Fromberger but has been written from scratch with
* additional optimizations in place.
*
* The library is free for all purposes without any express
* guarantee it works.
* SPDX-License-Identifier: Unlicense
*/
/* b = a*2 */

View File

@ -9,8 +9,7 @@
* Michael Fromberger but has been written from scratch with
* additional optimizations in place.
*
* The library is free for all purposes without any express
* guarantee it works.
* SPDX-License-Identifier: Unlicense
*/
/* shift left by a certain bit count */

View File

@ -9,8 +9,7 @@
* Michael Fromberger but has been written from scratch with
* additional optimizations in place.
*
* The library is free for all purposes without any express
* guarantee it works.
* SPDX-License-Identifier: Unlicense
*/
/* multiply by a digit */

View File

@ -9,8 +9,7 @@
* Michael Fromberger but has been written from scratch with
* additional optimizations in place.
*
* The library is free for all purposes without any express
* guarantee it works.
* SPDX-License-Identifier: Unlicense
*/
/* d = a * b (mod c) */

View File

@ -9,8 +9,7 @@
* Michael Fromberger but has been written from scratch with
* additional optimizations in place.
*
* The library is free for all purposes without any express
* guarantee it works.
* SPDX-License-Identifier: Unlicense
*/
/* wrapper function for mp_n_root_ex()

View File

@ -9,8 +9,7 @@
* Michael Fromberger but has been written from scratch with
* additional optimizations in place.
*
* The library is free for all purposes without any express
* guarantee it works.
* SPDX-License-Identifier: Unlicense
*/
/* find the n'th root of an integer

View File

@ -9,8 +9,7 @@
* Michael Fromberger but has been written from scratch with
* additional optimizations in place.
*
* The library is free for all purposes without any express
* guarantee it works.
* SPDX-License-Identifier: Unlicense
*/
/* b = -a */

View File

@ -9,8 +9,7 @@
* Michael Fromberger but has been written from scratch with
* additional optimizations in place.
*
* The library is free for all purposes without any express
* guarantee it works.
* SPDX-License-Identifier: Unlicense
*/
/* OR two ints together */

View File

@ -9,8 +9,7 @@
* Michael Fromberger but has been written from scratch with
* additional optimizations in place.
*
* The library is free for all purposes without any express
* guarantee it works.
* SPDX-License-Identifier: Unlicense
*/
/* performs one Fermat test.

View File

@ -10,8 +10,7 @@
* Michael Fromberger but has been written from scratch with
* additional optimizations in place.
*
* The library is free for all purposes without any express
* guarantee it works.
* SPDX-License-Identifier: Unlicense
*/
/*

View File

@ -9,8 +9,7 @@
* Michael Fromberger but has been written from scratch with
* additional optimizations in place.
*
* The library is free for all purposes without any express
* guarantee it works.
* SPDX-License-Identifier: Unlicense
*/
/* determines if an integers is divisible by one

View File

@ -9,8 +9,7 @@
* Michael Fromberger but has been written from scratch with
* additional optimizations in place.
*
* The library is free for all purposes without any express
* guarantee it works.
* SPDX-License-Identifier: Unlicense
*/
/* portable integer log of two with small footprint */

View File

@ -9,8 +9,7 @@
* Michael Fromberger but has been written from scratch with
* additional optimizations in place.
*
* The library is free for all purposes without any express
* guarantee it works.
* SPDX-License-Identifier: Unlicense
*/
/* Miller-Rabin test of "a" to the base of "b" as described in

View File

@ -9,8 +9,7 @@
* Michael Fromberger but has been written from scratch with
* additional optimizations in place.
*
* The library is free for all purposes without any express
* guarantee it works.
* SPDX-License-Identifier: Unlicense
*/
/* finds the next prime after the number "a" using "t" trials

View File

@ -9,8 +9,7 @@
* Michael Fromberger but has been written from scratch with
* additional optimizations in place.
*
* The library is free for all purposes without any express
* guarantee it works.
* SPDX-License-Identifier: Unlicense
*/

View File

@ -9,8 +9,7 @@
* Michael Fromberger but has been written from scratch with
* additional optimizations in place.
*
* The library is free for all purposes without any express
* guarantee it works.
* SPDX-License-Identifier: Unlicense
*/
/* makes a truly random prime of a given size (bits),

View File

@ -10,8 +10,7 @@
* Michael Fromberger but has been written from scratch with
* additional optimizations in place.
*
* The library is free for all purposes without any express
* guarantee it works.
* SPDX-License-Identifier: Unlicense
*/
/*

View File

@ -9,8 +9,7 @@
* Michael Fromberger but has been written from scratch with
* additional optimizations in place.
*
* The library is free for all purposes without any express
* guarantee it works.
* SPDX-License-Identifier: Unlicense
*/
/* returns size of ASCII reprensentation */

View File

@ -9,8 +9,7 @@
* Michael Fromberger but has been written from scratch with
* additional optimizations in place.
*
* The library is free for all purposes without any express
* guarantee it works.
* SPDX-License-Identifier: Unlicense
*/
/* chars used in radix conversions */

View File

@ -9,8 +9,7 @@
* Michael Fromberger but has been written from scratch with
* additional optimizations in place.
*
* The library is free for all purposes without any express
* guarantee it works.
* SPDX-License-Identifier: Unlicense
*/
/* First the OS-specific special cases

View File

@ -9,8 +9,7 @@
* Michael Fromberger but has been written from scratch with
* additional optimizations in place.
*
* The library is free for all purposes without any express
* guarantee it works.
* SPDX-License-Identifier: Unlicense
*/
/* read a string [ASCII] in a given radix */

View File

@ -9,8 +9,7 @@
* Michael Fromberger but has been written from scratch with
* additional optimizations in place.
*
* The library is free for all purposes without any express
* guarantee it works.
* SPDX-License-Identifier: Unlicense
*/
/* read signed bin, big endian, first byte is 0==positive or 1==negative */

View File

@ -9,8 +9,7 @@
* Michael Fromberger but has been written from scratch with
* additional optimizations in place.
*
* The library is free for all purposes without any express
* guarantee it works.
* SPDX-License-Identifier: Unlicense
*/
/* reads a unsigned char array, assumes the msb is stored first [big endian] */

View File

@ -9,8 +9,7 @@
* Michael Fromberger but has been written from scratch with
* additional optimizations in place.
*
* The library is free for all purposes without any express
* guarantee it works.
* SPDX-License-Identifier: Unlicense
*/
/* reduces x mod m, assumes 0 < x < m**2, mu is

View File

@ -9,8 +9,7 @@
* Michael Fromberger but has been written from scratch with
* additional optimizations in place.
*
* The library is free for all purposes without any express
* guarantee it works.
* SPDX-License-Identifier: Unlicense
*/
/* reduces a modulo n where n is of the form 2**p - d */

View File

@ -9,8 +9,7 @@
* Michael Fromberger but has been written from scratch with
* additional optimizations in place.
*
* The library is free for all purposes without any express
* guarantee it works.
* SPDX-License-Identifier: Unlicense
*/
/* reduces a modulo n where n is of the form 2**p - d

View File

@ -9,8 +9,7 @@
* Michael Fromberger but has been written from scratch with
* additional optimizations in place.
*
* The library is free for all purposes without any express
* guarantee it works.
* SPDX-License-Identifier: Unlicense
*/
/* determines the setup value */

View File

@ -9,8 +9,7 @@
* Michael Fromberger but has been written from scratch with
* additional optimizations in place.
*
* The library is free for all purposes without any express
* guarantee it works.
* SPDX-License-Identifier: Unlicense
*/
/* determines the setup value */

View File

@ -9,8 +9,7 @@
* Michael Fromberger but has been written from scratch with
* additional optimizations in place.
*
* The library is free for all purposes without any express
* guarantee it works.
* SPDX-License-Identifier: Unlicense
*/
/* determines if mp_reduce_2k can be used */

View File

@ -9,8 +9,7 @@
* Michael Fromberger but has been written from scratch with
* additional optimizations in place.
*
* The library is free for all purposes without any express
* guarantee it works.
* SPDX-License-Identifier: Unlicense
*/
/* determines if reduce_2k_l can be used */

Some files were not shown because too many files have changed in this diff Show More