From: Nikos Mavrogiannopoulos Date: Sun, 29 May 2011 10:35:57 +0000 (+0200) Subject: Added FSF copyright to public domain files. X-Git-Tag: gnutls_2_99_3~84 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8dc2a74cbdad286b6a97d55b2a47929f07e44aa7;p=thirdparty%2Fgnutls.git Added FSF copyright to public domain files. --- diff --git a/lib/nettle/Makefile.am b/lib/nettle/Makefile.am index 500117b504..89622c4635 100644 --- a/lib/nettle/Makefile.am +++ b/lib/nettle/Makefile.am @@ -36,7 +36,6 @@ noinst_LTLIBRARIES = libcrypto.la libcrypto_la_SOURCES = pk.c mpi.c mac.c cipher.c rnd.c init.c egd.c egd.h \ multi.c ecc_free.c ecc.h ecc_make_key.c ecc_shared_secret.c \ - ecc_test.c ecc_map.c \ - ecc_mulmod.c ecc_points.c ecc_projective_dbl_point_3.c \ + ecc_map.c ecc_mulmod.c ecc_points.c ecc_projective_dbl_point_3.c \ ecc_projective_add_point.c ecc_projective_dbl_point.c \ ecc_sign_hash.c ecc_verify_hash.c gnettle.h diff --git a/lib/nettle/ecc_free.c b/lib/nettle/ecc_free.c index bbf087dfd5..b5e23f94c1 100644 --- a/lib/nettle/ecc_free.c +++ b/lib/nettle/ecc_free.c @@ -1,19 +1,29 @@ -/* LibTomCrypt, modular cryptographic library -- Tom St Denis +/* + * Copyright (C) 2011 Free Software Foundation, Inc. * - * LibTomCrypt is a library that provides various cryptographic - * algorithms in a highly modular and flexible manner. + * This file is part of GNUTLS. * - * The library is free for all purposes without any express - * guarantee it works. + * The GNUTLS library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, + * USA * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ -/* Implements ECC over Z/pZ for curve y^2 = x^3 + ax + b - * - * All curves taken from NIST recommendation paper of July 1999 - * Available at http://csrc.nist.gov/cryptval/dss.htm +/* Based on public domain code of LibTomCrypt by Tom St Denis. + * Adapted to gmp and nettle by Nikos Mavrogiannopoulos. */ + #include "ecc.h" /** diff --git a/lib/nettle/ecc_make_key.c b/lib/nettle/ecc_make_key.c index 3667a5bbd6..ade9e5f672 100644 --- a/lib/nettle/ecc_make_key.c +++ b/lib/nettle/ecc_make_key.c @@ -1,19 +1,29 @@ -/* LibTomCrypt, modular cryptographic library -- Tom St Denis +/* + * Copyright (C) 2011 Free Software Foundation, Inc. * - * LibTomCrypt is a library that provides various cryptographic - * algorithms in a highly modular and flexible manner. + * This file is part of GNUTLS. * - * The library is free for all purposes without any express - * guarantee it works. + * The GNUTLS library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, + * USA * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ -/* Implements ECC over Z/pZ for curve y^2 = x^3 + ax + b - * - * All curves taken from NIST recommendation paper of July 1999 - * Available at http://csrc.nist.gov/cryptval/dss.htm +/* Based on public domain code of LibTomCrypt by Tom St Denis. + * Adapted to gmp and nettle by Nikos Mavrogiannopoulos. */ + #include "ecc.h" /** diff --git a/lib/nettle/ecc_map.c b/lib/nettle/ecc_map.c index 2ad60bb8b4..a68feb0207 100644 --- a/lib/nettle/ecc_map.c +++ b/lib/nettle/ecc_map.c @@ -1,19 +1,29 @@ -/* LibTomCrypt, modular cryptographic library -- Tom St Denis +/* + * Copyright (C) 2011 Free Software Foundation, Inc. * - * LibTomCrypt is a library that provides various cryptographic - * algorithms in a highly modular and flexible manner. + * This file is part of GNUTLS. * - * The library is free for all purposes without any express - * guarantee it works. + * The GNUTLS library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, + * USA * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ -/* Implements ECC over Z/pZ for curve y^2 = x^3 + ax + b - * - * All curves taken from NIST recommendation paper of July 1999 - * Available at http://csrc.nist.gov/cryptval/dss.htm +/* Based on public domain code of LibTomCrypt by Tom St Denis. + * Adapted to gmp and nettle by Nikos Mavrogiannopoulos. */ + #include "ecc.h" /** diff --git a/lib/nettle/ecc_mulmod.c b/lib/nettle/ecc_mulmod.c index c8e91a4254..6781b03fad 100644 --- a/lib/nettle/ecc_mulmod.c +++ b/lib/nettle/ecc_mulmod.c @@ -1,19 +1,29 @@ -/* LibTomCrypt, modular cryptographic library -- Tom St Denis +/* + * Copyright (C) 2011 Free Software Foundation, Inc. * - * LibTomCrypt is a library that provides various cryptographic - * algorithms in a highly modular and flexible manner. + * This file is part of GNUTLS. * - * The library is free for all purposes without any express - * guarantee it works. + * The GNUTLS library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, + * USA * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ -/* Implements ECC over Z/pZ for curve y^2 = x^3 + ax + b - * - * All curves taken from NIST recommendation paper of July 1999 - * Available at http://csrc.nist.gov/cryptval/dss.htm +/* Based on public domain code of LibTomCrypt by Tom St Denis. + * Adapted to gmp and nettle by Nikos Mavrogiannopoulos. */ + #include "ecc.h" /** diff --git a/lib/nettle/ecc_points.c b/lib/nettle/ecc_points.c index 7a29cb1751..ff13755d1f 100644 --- a/lib/nettle/ecc_points.c +++ b/lib/nettle/ecc_points.c @@ -1,19 +1,29 @@ -/* LibTomCrypt, modular cryptographic library -- Tom St Denis +/* + * Copyright (C) 2011 Free Software Foundation, Inc. * - * LibTomCrypt is a library that provides various cryptographic - * algorithms in a highly modular and flexible manner. + * This file is part of GNUTLS. * - * The library is free for all purposes without any express - * guarantee it works. + * The GNUTLS library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, + * USA * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ -/* Implements ECC over Z/pZ for curve y^2 = x^3 + ax + b - * - * All curves taken from NIST recommendation paper of July 1999 - * Available at http://csrc.nist.gov/cryptval/dss.htm +/* Based on public domain code of LibTomCrypt by Tom St Denis. + * Adapted to gmp and nettle by Nikos Mavrogiannopoulos. */ + #include "ecc.h" /** diff --git a/lib/nettle/ecc_projective_add_point.c b/lib/nettle/ecc_projective_add_point.c index 35d12bc395..b6922890bb 100644 --- a/lib/nettle/ecc_projective_add_point.c +++ b/lib/nettle/ecc_projective_add_point.c @@ -1,19 +1,29 @@ -/* LibTomCrypt, modular cryptographic library -- Tom St Denis +/* + * Copyright (C) 2011 Free Software Foundation, Inc. * - * LibTomCrypt is a library that provides various cryptographic - * algorithms in a highly modular and flexible manner. + * This file is part of GNUTLS. * - * The library is free for all purposes without any express - * guarantee it works. + * The GNUTLS library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, + * USA * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ -/* Implements ECC over Z/pZ for curve y^2 = x^3 + ax + b - * - * All curves taken from NIST recommendation paper of July 1999 - * Available at http://csrc.nist.gov/cryptval/dss.htm +/* Based on public domain code of LibTomCrypt by Tom St Denis. + * Adapted to gmp and nettle by Nikos Mavrogiannopoulos. */ + #include "ecc.h" /** diff --git a/lib/nettle/ecc_projective_dbl_point_3.c b/lib/nettle/ecc_projective_dbl_point_3.c index 1b85f6867e..28f08b3a0f 100644 --- a/lib/nettle/ecc_projective_dbl_point_3.c +++ b/lib/nettle/ecc_projective_dbl_point_3.c @@ -1,19 +1,29 @@ -/* LibTomCrypt, modular cryptographic library -- Tom St Denis +/* + * Copyright (C) 2011 Free Software Foundation, Inc. * - * LibTomCrypt is a library that provides various cryptographic - * algorithms in a highly modular and flexible manner. + * This file is part of GNUTLS. * - * The library is free for all purposes without any express - * guarantee it works. + * The GNUTLS library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, + * USA * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ -/* Implements ECC over Z/pZ for curve y^2 = x^3 - 3x + b - * - * All curves taken from NIST recommendation paper of July 1999 - * Available at http://csrc.nist.gov/cryptval/dss.htm +/* Based on public domain code of LibTomCrypt by Tom St Denis. + * Adapted to gmp and nettle by Nikos Mavrogiannopoulos. */ + #include "ecc.h" /** diff --git a/lib/nettle/ecc_shared_secret.c b/lib/nettle/ecc_shared_secret.c index c229870b51..8e41a6059f 100644 --- a/lib/nettle/ecc_shared_secret.c +++ b/lib/nettle/ecc_shared_secret.c @@ -1,19 +1,29 @@ -/* LibTomCrypt, modular cryptographic library -- Tom St Denis +/* + * Copyright (C) 2011 Free Software Foundation, Inc. * - * LibTomCrypt is a library that provides various cryptographic - * algorithms in a highly modular and flexible manner. + * This file is part of GNUTLS. * - * The library is free for all purposes without any express - * guarantee it works. + * The GNUTLS library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, + * USA * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ -/* Implements ECC over Z/pZ for curve y^2 = x^3 + ax + b - * - * All curves taken from NIST recommendation paper of July 1999 - * Available at http://csrc.nist.gov/cryptval/dss.htm +/* Based on public domain code of LibTomCrypt by Tom St Denis. + * Adapted to gmp and nettle by Nikos Mavrogiannopoulos. */ + #include "ecc.h" #include diff --git a/lib/nettle/ecc_sign_hash.c b/lib/nettle/ecc_sign_hash.c index 12be36dc72..be0d8d7e56 100644 --- a/lib/nettle/ecc_sign_hash.c +++ b/lib/nettle/ecc_sign_hash.c @@ -1,19 +1,29 @@ -/* LibTomCrypt, modular cryptographic library -- Tom St Denis +/* + * Copyright (C) 2011 Free Software Foundation, Inc. * - * LibTomCrypt is a library that provides various cryptographic - * algorithms in a highly modular and flexible manner. + * This file is part of GNUTLS. * - * The library is free for all purposes without any express - * guarantee it works. + * The GNUTLS library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, + * USA * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ -/* Implements ECC over Z/pZ for curve y^2 = x^3 + ax + b - * - * All curves taken from NIST recommendation paper of July 1999 - * Available at http://csrc.nist.gov/cryptval/dss.htm +/* Based on public domain code of LibTomCrypt by Tom St Denis. + * Adapted to gmp and nettle by Nikos Mavrogiannopoulos. */ + #include "ecc.h" #include diff --git a/lib/nettle/ecc_test.c b/lib/nettle/ecc_test.c deleted file mode 100644 index 30250faf3a..0000000000 --- a/lib/nettle/ecc_test.c +++ /dev/null @@ -1,142 +0,0 @@ -/* LibTomCrypt, modular cryptographic library -- Tom St Denis - * - * LibTomCrypt is a library that provides various cryptographic - * algorithms in a highly modular and flexible manner. - * - * The library is free for all purposes without any express - * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org - */ - -/* Implements ECC over Z/pZ for curve y^2 = x^3 + ax + b - * - * All curves taken from NIST recommendation paper of July 1999 - * Available at http://csrc.nist.gov/cryptval/dss.htm - */ -#include "ecc.h" -#include "gnettle.h" -#include -#include - -/** - @file ecc_test.c - ECC Crypto, Tom St Denis -*/ - -/** - Perform on the ECC system - @return 0 if successful -*/ -int -ecc_test (void) -{ - mpz_t modulus, order, A; - ecc_point *G, *GG; - int i, err; - - if ((err = mp_init_multi (&modulus, &A, &order, NULL)) != 0) - { - return err; - } - - G = ecc_new_point (); - GG = ecc_new_point (); - if (G == NULL || GG == NULL) - { - mp_clear_multi (&modulus, &order, NULL); - ecc_del_point (G); - ecc_del_point (GG); - return -1; - } - - for (i = 1; i <= 3; i++) - { - const gnutls_ecc_curve_entry_st *st = _gnutls_ecc_curve_get_params (i); - - printf ("Testing %s (%d)\n", gnutls_ecc_curve_get_name (i), i); - - if (mpz_set_str (A, (char *) st->A, 16) != 0) - { - fprintf (stderr, "XXX %d\n", __LINE__); - err = -1; - goto done; - } - - if (mpz_set_str (modulus, (char *) st->prime, 16) != 0) - { - fprintf (stderr, "XXX %d\n", __LINE__); - err = -1; - goto done; - } - - if (mpz_set_str (order, (char *) st->order, 16) != 0) - { - fprintf (stderr, "XXX %d\n", __LINE__); - err = -1; - goto done; - } - - /* is prime actually prime? */ - if ((err = mpz_probab_prime_p (modulus, PRIME_CHECK_PARAM)) <= 0) - { - fprintf (stderr, "XXX %d\n", __LINE__); - err = -1; - goto done; - } - - if ((err = mpz_probab_prime_p (order, PRIME_CHECK_PARAM)) <= 0) - { - fprintf (stderr, "XXX %d\n", __LINE__); - err = -1; - goto done; - } - - if (mpz_set_str (G->x, (char *) st->Gx, 16) != 0) - { - fprintf (stderr, "XXX %d\n", __LINE__); - err = -1; - goto done; - } - - if (mpz_set_str (G->y, (char *) st->Gy, 16) != 0) - { - fprintf (stderr, "XXX %d\n", __LINE__); - err = -1; - goto done; - } - mpz_set_ui (G->z, 1); - - /* then we should have G == (order + 1)G */ - mpz_add_ui (order, order, 1); - if ((err = ecc_mulmod (order, G, GG, A, modulus, 1)) != 0) - { - goto done; - } - - if (mpz_cmp (G->y, GG->y) != 0) - { - fprintf (stderr, "XXX %d\n", __LINE__); - err = -1; - goto done; - } - - if (mpz_cmp (G->x, GG->x) != 0) - { - fprintf (stderr, "XXX %d\n", __LINE__); - err = -1; - goto done; - } - - } - err = 0; -done: - ecc_del_point (GG); - ecc_del_point (G); - mp_clear_multi (&order, &modulus, &A, NULL); - return err; -} - -/* $Source: /cvs/libtom/libtomcrypt/src/pk/ecc/ecc_test.c,v $ */ -/* $Revision: 1.12 $ */ -/* $Date: 2007/05/12 14:32:35 $ */ diff --git a/lib/nettle/ecc_verify_hash.c b/lib/nettle/ecc_verify_hash.c index 62efae02d2..3c5a1e5b61 100644 --- a/lib/nettle/ecc_verify_hash.c +++ b/lib/nettle/ecc_verify_hash.c @@ -1,19 +1,29 @@ -/* LibTomCrypt, modular cryptographic library -- Tom St Denis +/* + * Copyright (C) 2011 Free Software Foundation, Inc. * - * LibTomCrypt is a library that provides various cryptographic - * algorithms in a highly modular and flexible manner. + * This file is part of GNUTLS. * - * The library is free for all purposes without any express - * guarantee it works. + * The GNUTLS library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, + * USA * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ -/* Implements ECC over Z/pZ for curve y^2 = x^3 + ax + b - * - * All curves taken from NIST recommendation paper of July 1999 - * Available at http://csrc.nist.gov/cryptval/dss.htm +/* Based on public domain code of LibTomCrypt by Tom St Denis. + * Adapted to gmp and nettle by Nikos Mavrogiannopoulos. */ + #include "ecc.h" /**