]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
Added FSF copyright to public domain files.
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Sun, 29 May 2011 10:35:57 +0000 (12:35 +0200)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Sun, 29 May 2011 10:35:57 +0000 (12:35 +0200)
12 files changed:
lib/nettle/Makefile.am
lib/nettle/ecc_free.c
lib/nettle/ecc_make_key.c
lib/nettle/ecc_map.c
lib/nettle/ecc_mulmod.c
lib/nettle/ecc_points.c
lib/nettle/ecc_projective_add_point.c
lib/nettle/ecc_projective_dbl_point_3.c
lib/nettle/ecc_shared_secret.c
lib/nettle/ecc_sign_hash.c
lib/nettle/ecc_test.c [deleted file]
lib/nettle/ecc_verify_hash.c

index 500117b5046fa075890f1c5e3d1a43c72f7b2d44..89622c4635a4326c29a9cacbd8d12377dcd13074 100644 (file)
@@ -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
index bbf087dfd595d3162bdc4271656fd649c9195c44..b5e23f94c1830a3caf10620f92f3b52362b3a34c 100644 (file)
@@ -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"
 
 /**
index 3667a5bbd654c1adcdaf4d1a339c3df8e4abb5cb..ade9e5f67293a2c289d9d2bfd7253055e931eddb 100644 (file)
@@ -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"
 
 /**
index 2ad60bb8b4bce4e708eb5dae13d2fced11a0215b..a68feb0207c280e9c1e2cab8ab3ca9641730b140 100644 (file)
@@ -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"
 
 /**
index c8e91a4254c22c9930dbac2809c2fcaf7d5384f4..6781b03fadd3adb9ab450576a3ccec7eead0231f 100644 (file)
@@ -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"
 
 /**
index 7a29cb1751ab32af9d683abe51aa021b536a5e29..ff13755d1f6162fdb5952068fada4b9d668c77e3 100644 (file)
@@ -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"
 
 /**
index 35d12bc39539d2671be6d55a2829f075f33121fe..b6922890bbabd8afe780f57f0cfb020ae5e7f1b0 100644 (file)
@@ -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"
 
 /**
index 1b85f6867ea9fd4662f37d7774ad964a83247894..28f08b3a0f34ff5b719507f053e75c3fe811c490 100644 (file)
@@ -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"
 
 /**
index c229870b51c43f474193d71541905ac7867f791d..8e41a6059f7c1a535be9fd48a2e2612cbff45743 100644 (file)
@@ -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 <string.h>
 
index 12be36dc725eb2a7e6db634f41f050eb34a32bfc..be0d8d7e560a356d67fdd0446714eb643e48055d 100644 (file)
@@ -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 <nettle/dsa.h>
 
diff --git a/lib/nettle/ecc_test.c b/lib/nettle/ecc_test.c
deleted file mode 100644 (file)
index 30250fa..0000000
+++ /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 <gnutls_int.h>
-#include <algorithms.h>
-
-/**
-  @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 $ */
index 62efae02d2ce60c17387b51c53761590295c3b6f..3c5a1e5b61055a72832e8dec3bd943938c102b6d 100644 (file)
@@ -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"
 
 /**