more clean-up & relicense

This commit is contained in:
Steffen Jaeckel 2019-10-03 16:54:37 +02:00
parent 2c320c3d54
commit 6ac31fe980
59 changed files with 127 additions and 54 deletions

View File

@ -1,3 +1,6 @@
/* TomsFastMath, a fast ISO C bignum library. -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */
#include "tfm.h"
#include <time.h>

View File

@ -1,3 +1,6 @@
/* TomsFastMath, a fast ISO C bignum library. -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */
/* A simple static test program. */
#include <tfm.h>

View File

@ -1,3 +1,6 @@
/* TomsFastMath, a fast ISO C bignum library. -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */
/* TFM demo program */
#include <tfm.h>
#include <time.h>

View File

@ -1,3 +1,6 @@
/* TomsFastMath, a fast ISO C bignum library. -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */
/* TFM timing analysis */
#define _GNU_SOURCE
#include <tfm.h>

View File

@ -1,3 +1,6 @@
# TomsFastMath, a fast ISO C bignum library. -- Tom St Denis
# SPDX-License-Identifier: Unlicense
ifeq ($V,1)
silent=
silent_stdout=

View File

@ -1,3 +1,6 @@
% TomsFastMath, a fast ISO C bignum library. -- Tom St Denis
% SPDX-License-Identifier: Unlicense
\documentclass[b5paper]{book}
\usepackage{hyperref}
\usepackage{makeidx}

View File

@ -1,6 +1,8 @@
#!/usr/bin/perl
#
# we want to filter every between START_INS and END_INS out and then insert crap from another file (this is fun)
#
# SPDX-License-Identifier: Unlicense
$dst = shift;
$ins = shift;

1
gen.pl
View File

@ -3,6 +3,7 @@
# Generates a "single file" you can use to quickly
# add the whole source without any makefile troubles
#
# SPDX-License-Identifier: Unlicense
use strict;
open( OUT, ">mpi.c" ) or die "Couldn't open mpi.c for writing: $!";

View File

@ -1,9 +1,6 @@
#!/bin/bash
# SPDX-License-Identifier: Unlicense
export a=`find . -type f | sort | grep "[.]/src" | grep "[.]c" | grep -v generators | sed -e 'sE\./EE' | sed -e 's/\.c/\.o/' | xargs`
perl ./parsenames.pl OBJECTS "$a"
export a=`find . -type f | grep [.]/src | grep [.]h | sed -e 'se\./ee' | xargs`
perl ./parsenames.pl HEADERS "$a"
# $Source: /cvs/libtom/tomsfastmath/genlist.sh,v $
# $Revision: 1.1 $
# $Date: 2006/12/31 21:31:40 $

View File

@ -1,6 +1,6 @@
#makefile for TomsFastMath
#
#
# makefile for TomsFastMath, a fast ISO C bignum library. -- Tom St Denis
# SPDX-License-Identifier: Unlicense
ifndef LIBNAME
LIBNAME=libtfm.a
endif
@ -130,7 +130,3 @@ stest: $(LIBNAME) demo/stest.o
rsatest: $(LIBNAME) demo/rsa.o
$(CC) $(CFLAGS) demo/rsa.o $(LIBNAME) -o rsatest
# ref: $Format:%D$
# git commit: $Format:%H$
# commit time: $Format:%ai$

View File

@ -1,6 +1,6 @@
#makefile for TomsFastMath
#
#
# makefile for TomsFastMath, a fast ISO C bignum library. -- Tom St Denis
# SPDX-License-Identifier: Unlicense
ifndef LIBNAME
LIBNAME=libtfm.la
endif
@ -80,8 +80,3 @@ stest: $(LIBNAME) demo/stest.o
.PHONY: timing
timing: $(LIBNAME) demo/timing.o
$(LT) --mode=link --tag=CC $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o timing demo/timing.o $(LIBNAME)
# $Source$
# $Revision$
# $Date$

View File

@ -1,6 +1,7 @@
#
# Include makefile used by makefile + makefile.shared
# (GNU make only)
# SPDX-License-Identifier: Unlicense
ifndef INSTALL_CMD
$(error your makefile must define INSTALL_CMD)

View File

@ -1,3 +1,6 @@
# TomsFastMath, a fast ISO C bignum library. -- Tom St Denis
# SPDX-License-Identifier: Unlicense
CFLAGS += -Wall -W -O3 -Wno-unused-result
default: mtest

View File

@ -27,6 +27,7 @@ mulmod
1
*/
/* SPDX-License-Identifier: Unlicense */
#ifdef MP_8BIT
#define THE_MASK 127

View File

@ -4,6 +4,7 @@
# wrapped at 80 chars
#
# Tom St Denis
# SPDX-License-Identifier: Unlicense
@a = split(" ", $ARGV[1]);
$b = "$ARGV[0]=";
$len = length($b);
@ -20,7 +21,3 @@ foreach my $obj (@a) {
#if ($ARGV[0] eq "HEADERS") { print "testprof/tomcrypt_test.h"; }
print "\n\n";
# $Source: /cvs/libtom/tomsfastmath/parsenames.pl,v $
# $Revision: 1.1 $
# $Date: 2006/12/31 21:31:40 $

View File

@ -1,3 +1,6 @@
/* TomsFastMath, a fast ISO C bignum library. -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */
#include <stdio.h>
#include <stdlib.h>
@ -8,6 +11,8 @@ int main(int argc, char **argv)
printf(
#if 1
"/* TomsFastMath, a fast ISO C bignum library. -- Tom St Denis */\n"
"/* SPDX-License-Identifier: Unlicense */\n"
"#ifdef TFM_SMALL_MONT_SET\n"
"/* computes x/R == x (mod N) via Montgomery Reduction */\n"
"void fp_montgomery_reduce_small(fp_int *a, fp_int *m, fp_digit mp)\n"

View File

@ -12,6 +12,8 @@ int main(int argc, char **argv)
/* print out preamble */
printf(
"/* TomsFastMath, a fast ISO C bignum library. -- Tom St Denis */\n"
"/* SPDX-License-Identifier: Unlicense */\n"
"#ifndef TFM_PRE_GEN_MPI_C\n"
"#define TFM_DEFINES\n"
"#include \"fp_mul_comba.c\"\n"

View File

@ -1,3 +1,6 @@
/* TomsFastMath, a fast ISO C bignum library. -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */
/* program emits a NxN comba multiplier for 1x1 to 16x16 */
#include <stdio.h>
@ -7,6 +10,8 @@ int main(int argc, char **argv)
/* print out preamble */
printf(
"/* TomsFastMath, a fast ISO C bignum library. -- Tom St Denis */\n"
"/* SPDX-License-Identifier: Unlicense */\n"
"#ifndef TFM_PRE_GEN_MPI_C\n"
"#define TFM_DEFINES\n"
"#include \"fp_mul_comba.c\"\n"

View File

@ -10,6 +10,8 @@ int main(int argc, char **argv)
N = atoi(argv[1]);
printf(
"/* TomsFastMath, a fast ISO C bignum library. -- Tom St Denis */\n"
"/* SPDX-License-Identifier: Unlicense */\n"
"#ifndef TFM_PRE_GEN_MPI_C\n"
"#define TFM_DEFINES\n"
"#include \"fp_sqr_comba.c\"\n"

View File

@ -9,6 +9,8 @@ int main(int argc, char **argv)
int x, y, z, N, f;
printf(
"/* TomsFastMath, a fast ISO C bignum library. -- Tom St Denis */\n"
"/* SPDX-License-Identifier: Unlicense */\n"
"#ifndef TFM_PRE_GEN_MPI_C\n"
"#define TFM_DEFINES\n"
"#include \"fp_sqr_comba.c\"\n"

View File

@ -1,3 +1,6 @@
# TomsFastMath, a fast ISO C bignum library. -- Tom St Denis
# SPDX-License-Identifier: Unlicense
all: comba_sqr_gen comba_sqr_smallgen
clean:

View File

@ -1,12 +1,11 @@
/* TomsFastMath, a fast ISO C bignum library.
/* TomsFastMath, a fast ISO C bignum library. -- Tom St Denis
*
* This project is meant to fill in where LibTomMath
* falls short. That is speed ;-)
*
* This project is public domain and free for all purposes.
*
* Tom St Denis, tomstdenis@gmail.com
*/
/* SPDX-License-Identifier: Unlicense */
#ifndef TFM_H_
#define TFM_H_
@ -492,7 +491,3 @@ int fp_toradix(fp_int *a, char *str, int radix);
int fp_toradix_n(fp_int * a, char *str, int radix, int maxlen);
#endif
/* $Source$ */
/* $Revision$ */
/* $Date$ */

View File

@ -1,12 +1,5 @@
/* TomsFastMath, a fast ISO C bignum library.
*
* This project is meant to fill in where LibTomMath
* falls short. That is speed ;-)
*
* This project is public domain and free for all purposes.
*
* Tom St Denis, tomstdenis@gmail.com
*/
/* TomsFastMath, a fast ISO C bignum library. -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */
#ifndef TFM_PRIVATE_H_
#define TFM_PRIVATE_H_
@ -119,7 +112,3 @@ void fp_sqr_comba64(fp_int *A, fp_int *B);
extern const char *fp_s_rmap;
#endif
/* $Source$ */
/* $Revision$ */
/* $Date$ */

View File

@ -1,3 +1,5 @@
/* TomsFastMath, a fast ISO C bignum library. -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */
#ifdef TFM_SMALL_MONT_SET
/* computes x/R == x (mod N) via Montgomery Reduction */
void fp_montgomery_reduce_small(fp_int *a, fp_int *m, fp_digit mp)

View File

@ -125,8 +125,3 @@ clean:
C->dp[y] = 0;
}
}
/* $Source: /cvs/libtom/tomsfastmath/src/mul/fp_mul.c,v $ */
/* $Revision: 1.1 $ */
/* $Date: 2006/12/31 21:25:53 $ */

View File

@ -1,3 +1,5 @@
/* TomsFastMath, a fast ISO C bignum library. -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */
#ifndef TFM_PRE_GEN_MPI_C
#define TFM_DEFINES
#include "fp_mul_comba.c"

View File

@ -1,3 +1,5 @@
/* TomsFastMath, a fast ISO C bignum library. -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */
#ifndef TFM_PRE_GEN_MPI_C
#define TFM_DEFINES
#include "fp_mul_comba.c"

View File

@ -1,3 +1,5 @@
/* TomsFastMath, a fast ISO C bignum library. -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */
#ifndef TFM_PRE_GEN_MPI_C
#define TFM_DEFINES
#include "fp_mul_comba.c"

View File

@ -1,3 +1,5 @@
/* TomsFastMath, a fast ISO C bignum library. -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */
#ifndef TFM_PRE_GEN_MPI_C
#define TFM_DEFINES
#include "fp_mul_comba.c"

View File

@ -1,3 +1,5 @@
/* TomsFastMath, a fast ISO C bignum library. -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */
#ifndef TFM_PRE_GEN_MPI_C
#define TFM_DEFINES
#include "fp_mul_comba.c"

View File

@ -1,3 +1,5 @@
/* TomsFastMath, a fast ISO C bignum library. -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */
#ifndef TFM_PRE_GEN_MPI_C
#define TFM_DEFINES
#include "fp_mul_comba.c"

View File

@ -1,3 +1,5 @@
/* TomsFastMath, a fast ISO C bignum library. -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */
#ifndef TFM_PRE_GEN_MPI_C
#define TFM_DEFINES
#include "fp_mul_comba.c"

View File

@ -1,3 +1,5 @@
/* TomsFastMath, a fast ISO C bignum library. -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */
#ifndef TFM_PRE_GEN_MPI_C
#define TFM_DEFINES
#include "fp_mul_comba.c"

View File

@ -1,3 +1,5 @@
/* TomsFastMath, a fast ISO C bignum library. -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */
#ifndef TFM_PRE_GEN_MPI_C
#define TFM_DEFINES
#include "fp_mul_comba.c"

View File

@ -1,3 +1,5 @@
/* TomsFastMath, a fast ISO C bignum library. -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */
#ifndef TFM_PRE_GEN_MPI_C
#define TFM_DEFINES
#include "fp_mul_comba.c"

View File

@ -1,3 +1,5 @@
/* TomsFastMath, a fast ISO C bignum library. -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */
#ifndef TFM_PRE_GEN_MPI_C
#define TFM_DEFINES
#include "fp_mul_comba.c"

View File

@ -1,3 +1,5 @@
/* TomsFastMath, a fast ISO C bignum library. -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */
#ifndef TFM_PRE_GEN_MPI_C
#define TFM_DEFINES
#include "fp_mul_comba.c"

View File

@ -1,3 +1,5 @@
/* TomsFastMath, a fast ISO C bignum library. -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */
#ifndef TFM_PRE_GEN_MPI_C
#define TFM_DEFINES
#include "fp_mul_comba.c"

View File

@ -1,3 +1,5 @@
/* TomsFastMath, a fast ISO C bignum library. -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */
#ifndef TFM_PRE_GEN_MPI_C
#define TFM_DEFINES
#include "fp_mul_comba.c"

View File

@ -1,3 +1,5 @@
/* TomsFastMath, a fast ISO C bignum library. -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */
#ifndef TFM_PRE_GEN_MPI_C
#define TFM_DEFINES
#include "fp_mul_comba.c"

View File

@ -112,8 +112,3 @@ clean:
B->dp[y] = 0;
}
}
/* $Source: /cvs/libtom/tomsfastmath/src/sqr/fp_sqr.c,v $ */
/* $Revision: 1.1 $ */
/* $Date: 2006/12/31 21:25:53 $ */

View File

@ -1,3 +1,5 @@
/* TomsFastMath, a fast ISO C bignum library. -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */
#ifndef TFM_PRE_GEN_MPI_C
#define TFM_DEFINES
#include "fp_sqr_comba.c"

View File

@ -1,3 +1,5 @@
/* TomsFastMath, a fast ISO C bignum library. -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */
#ifndef TFM_PRE_GEN_MPI_C
#define TFM_DEFINES
#include "fp_sqr_comba.c"

View File

@ -1,3 +1,5 @@
/* TomsFastMath, a fast ISO C bignum library. -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */
#ifndef TFM_PRE_GEN_MPI_C
#define TFM_DEFINES
#include "fp_sqr_comba.c"

View File

@ -1,3 +1,5 @@
/* TomsFastMath, a fast ISO C bignum library. -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */
#ifndef TFM_PRE_GEN_MPI_C
#define TFM_DEFINES
#include "fp_sqr_comba.c"

View File

@ -1,3 +1,5 @@
/* TomsFastMath, a fast ISO C bignum library. -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */
#ifndef TFM_PRE_GEN_MPI_C
#define TFM_DEFINES
#include "fp_sqr_comba.c"

View File

@ -1,3 +1,5 @@
/* TomsFastMath, a fast ISO C bignum library. -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */
#ifndef TFM_PRE_GEN_MPI_C
#define TFM_DEFINES
#include "fp_sqr_comba.c"

View File

@ -1,3 +1,5 @@
/* TomsFastMath, a fast ISO C bignum library. -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */
#ifndef TFM_PRE_GEN_MPI_C
#define TFM_DEFINES
#include "fp_sqr_comba.c"

View File

@ -1,3 +1,5 @@
/* TomsFastMath, a fast ISO C bignum library. -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */
#ifndef TFM_PRE_GEN_MPI_C
#define TFM_DEFINES
#include "fp_sqr_comba.c"

View File

@ -1,3 +1,5 @@
/* TomsFastMath, a fast ISO C bignum library. -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */
#ifndef TFM_PRE_GEN_MPI_C
#define TFM_DEFINES
#include "fp_sqr_comba.c"

View File

@ -1,3 +1,5 @@
/* TomsFastMath, a fast ISO C bignum library. -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */
#ifndef TFM_PRE_GEN_MPI_C
#define TFM_DEFINES
#include "fp_sqr_comba.c"

View File

@ -1,3 +1,5 @@
/* TomsFastMath, a fast ISO C bignum library. -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */
#ifndef TFM_PRE_GEN_MPI_C
#define TFM_DEFINES
#include "fp_sqr_comba.c"

View File

@ -1,3 +1,5 @@
/* TomsFastMath, a fast ISO C bignum library. -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */
#ifndef TFM_PRE_GEN_MPI_C
#define TFM_DEFINES
#include "fp_sqr_comba.c"

View File

@ -1,3 +1,5 @@
/* TomsFastMath, a fast ISO C bignum library. -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */
#ifndef TFM_PRE_GEN_MPI_C
#define TFM_DEFINES
#include "fp_sqr_comba.c"

View File

@ -1,3 +1,5 @@
/* TomsFastMath, a fast ISO C bignum library. -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */
#ifndef TFM_PRE_GEN_MPI_C
#define TFM_DEFINES
#include "fp_sqr_comba.c"

View File

@ -1,3 +1,5 @@
/* TomsFastMath, a fast ISO C bignum library. -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */
#ifndef TFM_PRE_GEN_MPI_C
#define TFM_DEFINES
#include "fp_sqr_comba.c"

View File

@ -1,6 +1,8 @@
#!/bin/bash -e
#
# Can be run with e.g. ./testme.sh "gcc-4.8 gcc-4.9", defaults to ./testme.sh "gcc"
#
# SPDX-License-Identifier: Unlicense
_runtest()
{

View File

@ -1,3 +1,6 @@
# TomsFastMath, a fast ISO C bignum library. -- Tom St Denis
# SPDX-License-Identifier: Unlicense
Name: TomFastMath
Description: Fast multiple-precision integer library
Version: @VERSION@

View File

@ -1,4 +1,6 @@
#!/bin/bash
#
# SPDX-License-Identifier: Unlicense
bash genlist.sh > tmplist