~ubuntu-branches/ubuntu/natty/libgcrypt11/natty-proposed

« back to all changes in this revision

Viewing changes to debian/patches/20_HMAC-SHA-384.diff

  • Committer: Bazaar Package Importer
  • Author(s): Bhavani Shankar
  • Date: 2009-05-16 20:13:32 UTC
  • mfrom: (1.1.6 upstream) (2.1.3 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090516201332-czkobpu32w318i16
Tags: 1.4.4-2ubuntu1
* Merge from Debian unstable (LP: #364535), remaining changes:
  - Add libgcrypt11-udeb for use by cryptsetup-udeb.
  - Add clean-la.mk, and add a symlink for the .la
  - Install to /lib.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
From pkg-gnutls-maint-bounces+ametzler=debian.org@lists.alioth.debian.org Wed Nov  5 20:40:25 2008
2
 
From: Werner Koch <wk@gnupg.org>
3
 
To: pkg-gnutls-maint@lists.alioth.debian.org
4
 
Date: Wed, 05 Nov 2008 20:38:27 +0100
5
 
Message-ID: <87tzamq7yk.fsf@wheatstone.g10code.de>
6
 
MIME-Version: 1.0
7
 
Content-Type: multipart/mixed;
8
 
        boundary="=lynch-SHA-espionage-Comirex-asset-world-domination-tempest-M-14=Sund"
9
 
Subject: [Werner Koch] Important fix for HMAC-SHA-384/512
10
 
Status: RO
11
 
Content-Length: 2660
12
 
Lines: 89
13
 
 
14
 
--=lynch-SHA-espionage-Comirex-asset-world-domination-tempest-M-14=Sund
15
 
Content-Type: message/rfc822
16
 
Content-Disposition: inline
17
 
 
18
 
From: Werner Koch <wk@gnupg.org>
19
 
To: gcrypt-devel@gnupg.org
20
 
Subject: Important fix for HMAC-SHA-384/512
21
 
Organisation: g10 Code GmbH
22
 
OpenPGP: id=5B0358A2; url=finger:wk@g10code.com
23
 
Mail-Followup-To: gcrypt-devel@gnupg.org
24
 
Date: Wed, 05 Nov 2008 19:47:21 +0100
25
 
Gnus-Warning: This is a duplicate of message <87iqr2row6.fsf@wheatstone.g10code.de>
26
 
Message-ID: <87iqr2row6.fsf@wheatstone.g10code.de>
27
 
User-Agent: Gnus/5.110007 (No Gnus v0.7)
28
 
X-BeenThere: gcrypt-devel@gnupg.org
29
 
X-Sender-Host: lists.gnupg.org
30
 
 
31
 
Hi!
32
 
 
33
 
a bug has in found in the HMAC computation when using a key size of 64
34
 
to 128 bytes with SHA-384 or SHA-512.  The result is a wrong HMAC value.
35
 
Given that such key seizes are not very common, it should not give any
36
 
real world problems but it needs to be fixed anyway.
37
 
 
38
 
The fix below is for libgcrypt 1.4.3 but it should apply to all 1.4
39
 
versions.
40
 
 
41
 
 
42
 
Salam-Shalom,
43
 
 
44
 
   Werner
45
 
 
46
 
 
47
 
 
48
 
 * Fixed HMAC for SHA-384 and SHA-512 with keys longer than 64 bytes.
49
 
 
50
 
--- libgcrypt-1.4.1/cipher/md.c.orig    2007-08-13 18:46:51.000000000 +0200
51
 
+++ libgcrypt-1.4.1/cipher/md.c 2008-11-08 10:14:27.000000000 +0100
52
 
@@ -791,7 +791,7 @@
53
 
   if ( !algo )
54
 
     return GPG_ERR_DIGEST_ALGO; /* i.e. no algo enabled */
55
 
 
56
 
-  if ( keylen > 64 ) 
57
 
+  if ( keylen > hd->ctx->macpads_Bsize ) 
58
 
     {
59
 
       helpkey = gcry_malloc_secure ( md_digest_length( algo ) );
60
 
       if ( !helpkey )
61
 
@@ -799,7 +799,7 @@
62
 
       gcry_md_hash_buffer ( algo, helpkey, key, keylen );
63
 
       key = helpkey;
64
 
       keylen = md_digest_length( algo );
65
 
-      assert ( keylen <= 64 );
66
 
+      assert ( keylen <= hd->ctx->macpads_Bsize );
67
 
     }
68
 
 
69
 
   memset ( hd->ctx->macpads, 0, 2*(hd->ctx->macpads_Bsize) );
70
 
 
71
 
 
72
 
 
73
 
Die Gedanken sind frei.  Auschnahme regelt ein Bundeschgesetz.
74
 
 
75
 
 
76
 
_______________________________________________
77
 
Gcrypt-devel mailing list
78
 
Gcrypt-devel@gnupg.org
79
 
http://lists.gnupg.org/mailman/listinfo/gcrypt-devel
80
 
 
81
 
 
82
 
--=lynch-SHA-espionage-Comirex-asset-world-domination-tempest-M-14=Sund
83
 
 
84
 
 
85
 
 
86
 
Die Gedanken sind frei.  Auschnahme regelt ein Bundeschgesetz.
87
 
 
88
 
--=lynch-SHA-espionage-Comirex-asset-world-domination-tempest-M-14=Sund
89
 
Content-Type: text/plain; charset="us-ascii"
90
 
MIME-Version: 1.0
91
 
Content-Transfer-Encoding: 7bit
92
 
Content-Disposition: inline
93
 
 
94
 
Pkg-gnutls-maint mailing list
95
 
Pkg-gnutls-maint@lists.alioth.debian.org
96
 
http://lists.alioth.debian.org/mailman/listinfo/pkg-gnutls-maint
97
 
--=lynch-SHA-espionage-Comirex-asset-world-domination-tempest-M-14=Sund--
98
 
 
99
 
 
100