[libntl] 09/09: merge patched into master

Julien Puydt julien.puydt at laposte.net
Wed Jun 1 14:01:16 UTC 2016


This is an automated email from the git hooks/post-receive script.

jpuydt-guest pushed a commit to branch master
in repository libntl.

commit cc816839dba71c26f2bb39d0a99f4cea48cbb455
Merge: ac3b7f9 e06aa12
Author: Julien Puydt <julien.puydt at laposte.net>
Date:   Wed Jun 1 16:00:42 2016 +0200

    merge patched into master

 debian/.git-dpm                                    |   4 +-
 ...ace-md5-implementation-newer-upstreams-do.patch | 401 +++++++++++++++++++++
 ...llback-for-sage-newer-sage-versions-don-t.patch |  27 ++
 debian/patches/series                              |   2 +
 include/NTL/tools.h                                |   6 -
 src/ZZ.c                                           | 316 +++++++++-------
 6 files changed, 615 insertions(+), 141 deletions(-)

diff --cc debian/.git-dpm
index 8562a67,0000000..ff6395f
mode 100644,000000..100644
--- a/debian/.git-dpm
+++ b/debian/.git-dpm
@@@ -1,8 -1,0 +1,8 @@@
 +# see git-dpm(1) from git-dpm package
- b59e2b1c8abab687d2cfd93b8797b864914ee5b5
- b59e2b1c8abab687d2cfd93b8797b864914ee5b5
++e06aa120924b28bab11023bbdc4875b339b503af
++e06aa120924b28bab11023bbdc4875b339b503af
 +0feffaef525a8bd40df7cb43ed60a16e1c92ed8e
 +0feffaef525a8bd40df7cb43ed60a16e1c92ed8e
 +ntl_9.3.0.orig.tar.gz
 +f0d1ae87d793e19bf957f8b9a53ec59967779c03
 +888710
diff --cc debian/patches/0004-Revert-replace-md5-implementation-newer-upstreams-do.patch
index 0000000,0000000..6336d2f
new file mode 100644
--- /dev/null
+++ b/debian/patches/0004-Revert-replace-md5-implementation-newer-upstreams-do.patch
@@@ -1,0 -1,0 +1,401 @@@
++From 210de58b5566accb42e85ada5cc7dc1ab2b63e2f Mon Sep 17 00:00:00 2001
++From: Julien Puydt <julien.puydt at laposte.net>
++Date: Wed, 1 Jun 2016 16:00:04 +0200
++Subject: Revert "replace md5 implementation" -- newer upstreams don't need it
++
++This reverts commit b59e2b1c8abab687d2cfd93b8797b864914ee5b5.
++---
++ src/ZZ.c | 316 ++++++++++++++++++++++++++++++++++++---------------------------
++ 1 file changed, 183 insertions(+), 133 deletions(-)
++
++diff --git a/src/ZZ.c b/src/ZZ.c
++index 2d49f0a..2329d7f 100644
++--- a/src/ZZ.c
+++++ b/src/ZZ.c
++@@ -1384,157 +1384,207 @@ long power_long(long a, long e)
++ // which I've modified to work on 64-bit machines
++ 
++ 
++-#ifndef uint32
++-# if NTL_BITS_PER_INT == 32
++-typedef unsigned int uint32;
++-# elif NTL_BITS_PER_LONG == 32
++-typedef unsigned long uint32;
++-# else
++-#  error unable to find 32 bit type
++-# endif
++-#endif
++ /*
++- *  BEGIN md5 stuff
+++ *  BEGIN RSA's md5 stuff
++  *
++  */
++ 
++ /*
++- * This code implements the MD5 message-digest algorithm.
++- * The algorithm is due to Ron Rivest.  This code was
++- * written by Colin Plumb in 1993, no copyright is claimed.
++- * This code is in the public domain; do with it what you wish.
++- *
++- * Equivalent code is available from RSA Data Security, Inc.
++- * This code has been tested against that, and is equivalent,
++- * except that you don't need to include two pages of legalese
++- * with every copy.
++- *
++- Modified to only contain the functions needed here.
+++ **********************************************************************
+++ ** md5.c                                                            **
+++ ** RSA Data Security, Inc. MD5 Message Digest Algorithm             **
+++ ** Created: 2/17/90 RLR                                             **
+++ ** Revised: 1/91 SRD,AJ,BSK,JT Reference C Version                  **
+++ **********************************************************************
++  */
++ 
++ /*
++- * Start MD5 accumulation.  Set bit count to 0 and buffer to mysterious
++- * initialization constants.
+++ **********************************************************************
+++ ** Copyright (C) 1990, RSA Data Security, Inc. All rights reserved. **
+++ **                                                                  **
+++ ** License to copy and use this software is granted provided that   **
+++ ** it is identified as the "RSA Data Security, Inc. MD5 Message     **
+++ ** Digest Algorithm" in all material mentioning or referencing this **
+++ ** software or this function.                                       **
+++ **                                                                  **
+++ ** License is also granted to make and use derivative works         **
+++ ** provided that such works are identified as "derived from the RSA **
+++ ** Data Security, Inc. MD5 Message Digest Algorithm" in all         **
+++ ** material mentioning or referencing the derived work.             **
+++ **                                                                  **
+++ ** RSA Data Security, Inc. makes no representations concerning      **
+++ ** either the merchantability of this software or the suitability   **
+++ ** of this software for any particular purpose.  It is provided "as **
+++ ** is" without express or implied warranty of any kind.             **
+++ **                                                                  **
+++ ** These notices must be retained in any copies of any part of this **
+++ ** documentation and/or software.                                   **
+++ **********************************************************************
++  */
+++
+++
+++#if (NTL_BITS_PER_LONG <= 32)
+++#define TRUNC32(x) (x)
+++#else
+++#define TRUNC32(x) ((x) & ((1UL << 32)-1UL))
+++#endif
+++
+++/* F, G and H are basic MD5 functions: selection, majority, parity */
+++#define F(x, y, z) (((x) & (y)) | ((~x) & (z)))
+++#define G(x, y, z) (((x) & (z)) | ((y) & (~z)))
+++#define H(x, y, z) ((x) ^ (y) ^ (z))
+++#define I(x, y, z) (TRUNC32((y) ^ ((x) | (~z)))) 
+++
+++/* ROTATE_LEFT rotates x left n bits */
+++#define ROTATE_LEFT(x, n) (TRUNC32(((x) << (n)) | ((x) >> (32-(n)))))
+++
+++/* FF, GG, HH, and II transformations for rounds 1, 2, 3, and 4 */
+++/* Rotation is separate from addition to prevent recomputation */
+++#define FF(a, b, c, d, x, s, ac) \
+++  {(a) = TRUNC32((a) + F((b), (c), (d)) + (x) + (ac)); \
+++   (a) = ROTATE_LEFT((a), (s)); \
+++   (a) = TRUNC32((a) + (b)); \
+++  }
+++#define GG(a, b, c, d, x, s, ac) \
+++  {(a) = TRUNC32((a) + G((b), (c), (d)) + (x) + (ac)); \
+++   (a) = ROTATE_LEFT((a), (s)); \
+++   (a) = TRUNC32((a) + (b)); \
+++  }
+++#define HH(a, b, c, d, x, s, ac) \
+++  {(a) = TRUNC32((a) + H((b), (c), (d)) + (x) + (ac)); \
+++   (a) = ROTATE_LEFT((a), (s)); \
+++   (a) = TRUNC32((a) + (b)); \
+++  }
+++#define II(a, b, c, d, x, s, ac) \
+++  {(a) = TRUNC32((a) + I((b), (c), (d)) + (x) + (ac)); \
+++   (a) = ROTATE_LEFT((a), (s)); \
+++   (a) = TRUNC32((a) + (b)); \
+++  }
+++
+++
+++
++ static
++-void MD5Init(uint32 buf[4])
+++void MD5_default_IV(unsigned long *buf)
++ {
++-    buf[0] = 0x67452301U;
++-    buf[1] = 0xefcdab89U;
++-    buf[2] = 0x98badcfeU;
++-    buf[3] = 0x10325476U;
+++   buf[0] = 0x67452301UL;
+++   buf[1] = 0xefcdab89UL;
+++   buf[2] = 0x98badcfeUL;
+++   buf[3] = 0x10325476UL;
++ }
++ 
++-/* The four core functions - F1 is optimized somewhat */
++ 
++-/* #define F1(x, y, z) (x & y | ~x & z) */
++-#define F1(x, y, z) (z ^ (x & (y ^ z)))
++-#define F2(x, y, z) F1(z, x, y)
++-#define F3(x, y, z) (x ^ y ^ z)
++-#define F4(x, y, z) (y ^ (x | ~z))
++ 
++-/* This is the central step in the MD5 algorithm. */
++-#define MD5STEP(f, w, x, y, z, data, s) \
++-	( w += f(x, y, z) + data,  w = w<<s | w>>(32-s),  w += x )
++-
++-/*
++- * The core of the MD5 algorithm, this alters an existing MD5 hash to
++- * reflect the addition of 16 longwords of new data.  MD5Update blocks
++- * the data and converts bytes into longwords for this routine.
+++/* Basic MD5 step. Transform buf based on in.
++  */
+++
++ static
++-void MD5Transform(uint32 buf[4], uint32 const in[16])
++-{
++-    register uint32 a, b, c, d;
++-
++-    a = buf[0];
++-    b = buf[1];
++-    c = buf[2];
++-    d = buf[3];
++-
++-    MD5STEP(F1, a, b, c, d, in[0] + 0xd76aa478U, 7);
++-    MD5STEP(F1, d, a, b, c, in[1] + 0xe8c7b756U, 12);
++-    MD5STEP(F1, c, d, a, b, in[2] + 0x242070dbU, 17);
++-    MD5STEP(F1, b, c, d, a, in[3] + 0xc1bdceeeU, 22);
++-    MD5STEP(F1, a, b, c, d, in[4] + 0xf57c0fafU, 7);
++-    MD5STEP(F1, d, a, b, c, in[5] + 0x4787c62aU, 12);
++-    MD5STEP(F1, c, d, a, b, in[6] + 0xa8304613U, 17);
++-    MD5STEP(F1, b, c, d, a, in[7] + 0xfd469501U, 22);
++-    MD5STEP(F1, a, b, c, d, in[8] + 0x698098d8U, 7);
++-    MD5STEP(F1, d, a, b, c, in[9] + 0x8b44f7afU, 12);
++-    MD5STEP(F1, c, d, a, b, in[10] + 0xffff5bb1U, 17);
++-    MD5STEP(F1, b, c, d, a, in[11] + 0x895cd7beU, 22);
++-    MD5STEP(F1, a, b, c, d, in[12] + 0x6b901122U, 7);
++-    MD5STEP(F1, d, a, b, c, in[13] + 0xfd987193U, 12);
++-    MD5STEP(F1, c, d, a, b, in[14] + 0xa679438eU, 17);
++-    MD5STEP(F1, b, c, d, a, in[15] + 0x49b40821U, 22);
++-
++-    MD5STEP(F2, a, b, c, d, in[1] + 0xf61e2562U, 5);
++-    MD5STEP(F2, d, a, b, c, in[6] + 0xc040b340U, 9);
++-    MD5STEP(F2, c, d, a, b, in[11] + 0x265e5a51U, 14);
++-    MD5STEP(F2, b, c, d, a, in[0] + 0xe9b6c7aaU, 20);
++-    MD5STEP(F2, a, b, c, d, in[5] + 0xd62f105dU, 5);
++-    MD5STEP(F2, d, a, b, c, in[10] + 0x02441453U, 9);
++-    MD5STEP(F2, c, d, a, b, in[15] + 0xd8a1e681, 14);
++-    MD5STEP(F2, b, c, d, a, in[4] + 0xe7d3fbc8U, 20);
++-    MD5STEP(F2, a, b, c, d, in[9] + 0x21e1cde6U, 5);
++-    MD5STEP(F2, d, a, b, c, in[14] + 0xc33707d6U, 9);
++-    MD5STEP(F2, c, d, a, b, in[3] + 0xf4d50d87U, 14);
++-    MD5STEP(F2, b, c, d, a, in[8] + 0x455a14edU, 20);
++-    MD5STEP(F2, a, b, c, d, in[13] + 0xa9e3e905U, 5);
++-    MD5STEP(F2, d, a, b, c, in[2] + 0xfcefa3f8U, 9);
++-    MD5STEP(F2, c, d, a, b, in[7] + 0x676f02d9U, 14);
++-    MD5STEP(F2, b, c, d, a, in[12] + 0x8d2a4c8aU, 20);
++-
++-    MD5STEP(F3, a, b, c, d, in[5] + 0xfffa3942U, 4);
++-    MD5STEP(F3, d, a, b, c, in[8] + 0x8771f681U, 11);
++-    MD5STEP(F3, c, d, a, b, in[11] + 0x6d9d6122U, 16);
++-    MD5STEP(F3, b, c, d, a, in[14] + 0xfde5380cU, 23);
++-    MD5STEP(F3, a, b, c, d, in[1] + 0xa4beea44U, 4);
++-    MD5STEP(F3, d, a, b, c, in[4] + 0x4bdecfa9U, 11);
++-    MD5STEP(F3, c, d, a, b, in[7] + 0xf6bb4b60U, 16);
++-    MD5STEP(F3, b, c, d, a, in[10] + 0xbebfbc70U, 23);
++-    MD5STEP(F3, a, b, c, d, in[13] + 0x289b7ec6U, 4);
++-    MD5STEP(F3, d, a, b, c, in[0] + 0xeaa127faU, 11);
++-    MD5STEP(F3, c, d, a, b, in[3] + 0xd4ef3085U, 16);
++-    MD5STEP(F3, b, c, d, a, in[6] + 0x04881d05U, 23);
++-    MD5STEP(F3, a, b, c, d, in[9] + 0xd9d4d039U, 4);
++-    MD5STEP(F3, d, a, b, c, in[12] + 0xe6db99e5U, 11);
++-    MD5STEP(F3, c, d, a, b, in[15] + 0x1fa27cf8U, 16);
++-    MD5STEP(F3, b, c, d, a, in[2] + 0xc4ac5665U, 23);
++-
++-    MD5STEP(F4, a, b, c, d, in[0] + 0xf4292244U, 6);
++-    MD5STEP(F4, d, a, b, c, in[7] + 0x432aff97U, 10);
++-    MD5STEP(F4, c, d, a, b, in[14] + 0xab9423a7U, 15);
++-    MD5STEP(F4, b, c, d, a, in[5] + 0xfc93a039U, 21);
++-    MD5STEP(F4, a, b, c, d, in[12] + 0x655b59c3U, 6);
++-    MD5STEP(F4, d, a, b, c, in[3] + 0x8f0ccc92U, 10);
++-    MD5STEP(F4, c, d, a, b, in[10] + 0xffeff47dU, 15);
++-    MD5STEP(F4, b, c, d, a, in[1] + 0x85845dd1U, 21);
++-    MD5STEP(F4, a, b, c, d, in[8] + 0x6fa87e4fU, 6);
++-    MD5STEP(F4, d, a, b, c, in[15] + 0xfe2ce6e0U, 10);
++-    MD5STEP(F4, c, d, a, b, in[6] + 0xa3014314U, 15);
++-    MD5STEP(F4, b, c, d, a, in[13] + 0x4e0811a1U, 21);
++-    MD5STEP(F4, a, b, c, d, in[4] + 0xf7537e82U, 6);
++-    MD5STEP(F4, d, a, b, c, in[11] + 0xbd3af235U, 10);
++-    MD5STEP(F4, c, d, a, b, in[2] + 0x2ad7d2bbU, 15);
++-    MD5STEP(F4, b, c, d, a, in[9] + 0xeb86d391U, 21);
++-
++-    buf[0] += a;
++-    buf[1] += b;
++-    buf[2] += c;
++-    buf[3] += d;
+++void MD5_compress(unsigned long *buf, unsigned long *in)
+++{
+++  unsigned long a = buf[0], b = buf[1], c = buf[2], d = buf[3];
+++
+++  /* Round 1 */
+++#define S11 7
+++#define S12 12
+++#define S13 17
+++#define S14 22
+++  FF ( a, b, c, d, in[ 0], S11, 3614090360UL); /* 1 */
+++  FF ( d, a, b, c, in[ 1], S12, 3905402710UL); /* 2 */
+++  FF ( c, d, a, b, in[ 2], S13,  606105819UL); /* 3 */
+++  FF ( b, c, d, a, in[ 3], S14, 3250441966UL); /* 4 */
+++  FF ( a, b, c, d, in[ 4], S11, 4118548399UL); /* 5 */
+++  FF ( d, a, b, c, in[ 5], S12, 1200080426UL); /* 6 */
+++  FF ( c, d, a, b, in[ 6], S13, 2821735955UL); /* 7 */
+++  FF ( b, c, d, a, in[ 7], S14, 4249261313UL); /* 8 */
+++  FF ( a, b, c, d, in[ 8], S11, 1770035416UL); /* 9 */
+++  FF ( d, a, b, c, in[ 9], S12, 2336552879UL); /* 10 */
+++  FF ( c, d, a, b, in[10], S13, 4294925233UL); /* 11 */
+++  FF ( b, c, d, a, in[11], S14, 2304563134UL); /* 12 */
+++  FF ( a, b, c, d, in[12], S11, 1804603682UL); /* 13 */
+++  FF ( d, a, b, c, in[13], S12, 4254626195UL); /* 14 */
+++  FF ( c, d, a, b, in[14], S13, 2792965006UL); /* 15 */
+++  FF ( b, c, d, a, in[15], S14, 1236535329UL); /* 16 */
+++
+++  /* Round 2 */
+++#define S21 5
+++#define S22 9
+++#define S23 14
+++#define S24 20
+++  GG ( a, b, c, d, in[ 1], S21, 4129170786UL); /* 17 */
+++  GG ( d, a, b, c, in[ 6], S22, 3225465664UL); /* 18 */
+++  GG ( c, d, a, b, in[11], S23,  643717713UL); /* 19 */
+++  GG ( b, c, d, a, in[ 0], S24, 3921069994UL); /* 20 */
+++  GG ( a, b, c, d, in[ 5], S21, 3593408605UL); /* 21 */
+++  GG ( d, a, b, c, in[10], S22,   38016083UL); /* 22 */
+++  GG ( c, d, a, b, in[15], S23, 3634488961UL); /* 23 */
+++  GG ( b, c, d, a, in[ 4], S24, 3889429448UL); /* 24 */
+++  GG ( a, b, c, d, in[ 9], S21,  568446438UL); /* 25 */
+++  GG ( d, a, b, c, in[14], S22, 3275163606UL); /* 26 */
+++  GG ( c, d, a, b, in[ 3], S23, 4107603335UL); /* 27 */
+++  GG ( b, c, d, a, in[ 8], S24, 1163531501UL); /* 28 */
+++  GG ( a, b, c, d, in[13], S21, 2850285829UL); /* 29 */
+++  GG ( d, a, b, c, in[ 2], S22, 4243563512UL); /* 30 */
+++  GG ( c, d, a, b, in[ 7], S23, 1735328473UL); /* 31 */
+++  GG ( b, c, d, a, in[12], S24, 2368359562UL); /* 32 */
+++
+++  /* Round 3 */
+++#define S31 4
+++#define S32 11
+++#define S33 16
+++#define S34 23
+++  HH ( a, b, c, d, in[ 5], S31, 4294588738UL); /* 33 */
+++  HH ( d, a, b, c, in[ 8], S32, 2272392833UL); /* 34 */
+++  HH ( c, d, a, b, in[11], S33, 1839030562UL); /* 35 */
+++  HH ( b, c, d, a, in[14], S34, 4259657740UL); /* 36 */
+++  HH ( a, b, c, d, in[ 1], S31, 2763975236UL); /* 37 */
+++  HH ( d, a, b, c, in[ 4], S32, 1272893353UL); /* 38 */
+++  HH ( c, d, a, b, in[ 7], S33, 4139469664UL); /* 39 */
+++  HH ( b, c, d, a, in[10], S34, 3200236656UL); /* 40 */
+++  HH ( a, b, c, d, in[13], S31,  681279174UL); /* 41 */
+++  HH ( d, a, b, c, in[ 0], S32, 3936430074UL); /* 42 */
+++  HH ( c, d, a, b, in[ 3], S33, 3572445317UL); /* 43 */
+++  HH ( b, c, d, a, in[ 6], S34,   76029189UL); /* 44 */
+++  HH ( a, b, c, d, in[ 9], S31, 3654602809UL); /* 45 */
+++  HH ( d, a, b, c, in[12], S32, 3873151461UL); /* 46 */
+++  HH ( c, d, a, b, in[15], S33,  530742520UL); /* 47 */
+++  HH ( b, c, d, a, in[ 2], S34, 3299628645UL); /* 48 */
+++
+++  /* Round 4 */
+++#define S41 6
+++#define S42 10
+++#define S43 15
+++#define S44 21
+++  II ( a, b, c, d, in[ 0], S41, 4096336452UL); /* 49 */
+++  II ( d, a, b, c, in[ 7], S42, 1126891415UL); /* 50 */
+++  II ( c, d, a, b, in[14], S43, 2878612391UL); /* 51 */
+++  II ( b, c, d, a, in[ 5], S44, 4237533241UL); /* 52 */
+++  II ( a, b, c, d, in[12], S41, 1700485571UL); /* 53 */
+++  II ( d, a, b, c, in[ 3], S42, 2399980690UL); /* 54 */
+++  II ( c, d, a, b, in[10], S43, 4293915773UL); /* 55 */
+++  II ( b, c, d, a, in[ 1], S44, 2240044497UL); /* 56 */
+++  II ( a, b, c, d, in[ 8], S41, 1873313359UL); /* 57 */
+++  II ( d, a, b, c, in[15], S42, 4264355552UL); /* 58 */
+++  II ( c, d, a, b, in[ 6], S43, 2734768916UL); /* 59 */
+++  II ( b, c, d, a, in[13], S44, 1309151649UL); /* 60 */
+++  II ( a, b, c, d, in[ 4], S41, 4149444226UL); /* 61 */
+++  II ( d, a, b, c, in[11], S42, 3174756917UL); /* 62 */
+++  II ( c, d, a, b, in[ 2], S43,  718787259UL); /* 63 */
+++  II ( b, c, d, a, in[ 9], S44, 3951481745UL); /* 64 */
+++
+++  buf[0] = TRUNC32(buf[0] + a);
+++  buf[1] = TRUNC32(buf[1] + b);
+++  buf[2] = TRUNC32(buf[2] + c);
+++  buf[3] = TRUNC32(buf[3] + d);
++ }
++ 
++ 
++ /*
++- *  END md5 stuff
+++ *  END RSA's md5 stuff
++  *
++  */
++ 
++ 
++ static
++-void words_from_bytes(uint32 *txtl, unsigned char *txtc, long n)
+++void words_from_bytes(unsigned long *txtl, const unsigned char *txtc, long n)
++ {
++    long i;
++    unsigned long v;
++@@ -1549,7 +1599,7 @@ void words_from_bytes(uint32 *txtl, unsigned char *txtc, long n)
++ }
++ 
++ static 
++-void bytes_from_words(unsigned char *txtc, uint32 *txtl, long n)
+++void bytes_from_words(unsigned char *txtc, const unsigned long *txtl, long n)
++ {
++    long i;
++    unsigned long v;
++@@ -1568,9 +1618,9 @@ void bytes_from_words(unsigned char *txtc, uint32 *txtl, long n)
++ 
++ 
++ static
++-void MD5_compress1(uint32 *buf, unsigned char *in, long n)
+++void MD5_compress1(unsigned long *buf, unsigned char *in, long n)
++ {
++-   uint32 txtl[16];
+++   unsigned long txtl[16];
++    unsigned char txtc[64]; 
++    long i, j, k;
++ 
++@@ -1585,7 +1635,7 @@ void MD5_compress1(uint32 *buf, unsigned char *in, long n)
++       for (; j < 64; j++)
++          txtc[j] = 0;
++       words_from_bytes(txtl, txtc, 16);
++-      MD5Transform(buf, txtl);
+++      MD5_compress(buf, txtl);
++       i += k;
++    }
++ }
++@@ -1670,7 +1720,7 @@ void arc4(unsigned char *buffer_ptr, long buffer_len, _ZZ_arc4_key *key)
++ NTL_THREAD_LOCAL static long ran_initialized = 0;
++ NTL_THREAD_LOCAL static _ZZ_arc4_key ran_key;
++ 
++-static uint32 default_md5_tab[16] = {
+++static const unsigned long default_md5_tab[16] = {
++ 744663023UL, 1011602954UL, 3163087192UL, 3383838527UL, 
++ 3305324122UL, 3197458079UL, 2266495600UL, 2760303563UL, 
++ 346234297UL, 1919920720UL, 1896169861UL, 2192176675UL, 
++@@ -1694,11 +1744,11 @@ void build_arc4_tab(unsigned char *seed_bytes, const ZZ& s)
++ 
++    bytes_from_words(txt + nb + 4, default_md5_tab, 16);
++ 
++-   uint32 buf[4];
+++   unsigned long buf[4];
++ 
++-   uint32 i;
+++   unsigned long i;
++    for (i = 0; i < 16; i++) {
++-      MD5Init(buf);
+++      MD5_default_IV(buf);
++       bytes_from_words(txt, &i, 1);
++ 
++       MD5_compress1(buf, txt, nb + 68);
diff --cc debian/patches/0005-Revert-a-callback-for-sage-newer-sage-versions-don-t.patch
index 0000000,0000000..a22abff
new file mode 100644
--- /dev/null
+++ b/debian/patches/0005-Revert-a-callback-for-sage-newer-sage-versions-don-t.patch
@@@ -1,0 -1,0 +1,27 @@@
++From e06aa120924b28bab11023bbdc4875b339b503af Mon Sep 17 00:00:00 2001
++From: Julien Puydt <julien.puydt at laposte.net>
++Date: Wed, 1 Jun 2016 16:00:23 +0200
++Subject: Revert "a callback for sage" -- newer sage versions don't need it
++
++This reverts commit 7388721f59eb63de219ef44c7a54e1ceefc6d257.
++---
++ include/NTL/tools.h | 6 ------
++ 1 file changed, 6 deletions(-)
++
++diff --git a/include/NTL/tools.h b/include/NTL/tools.h
++index 425229d..a9dc6cf 100644
++--- a/include/NTL/tools.h
+++++ b/include/NTL/tools.h
++@@ -367,12 +367,6 @@ long CharToIntVal(long c);
++ char IntValToChar(long a);
++ 
++ 
++-/*
++-  This function is not present in vanilla NTL 5.4.2.
++-  See tools.c for documentation.
++- */
++-void SetErrorCallbackFunction(void (*func)(const char *s, void *context), void *context);
++-
++ 
++ 
++ 
diff --cc debian/patches/series
index 6c5f433,0000000..85093a0
mode 100644,000000..100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@@ -1,3 -1,0 +1,5 @@@
 +0001-gcc-4.5-mips.patch
 +0002-a-callback-for-sage.patch
 +0003-replace-md5-implementation.patch
++0004-Revert-replace-md5-implementation-newer-upstreams-do.patch
++0005-Revert-a-callback-for-sage-newer-sage-versions-don-t.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/libntl.git



More information about the debian-science-commits mailing list