~peter-pearse/ubuntu/natty/libgcrypt11/prop001

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Scott James Remnant
  • Date: 2008-11-11 16:33:22 UTC
  • Revision ID: james.westby@ubuntu.com-20081111163322-g8brj9yjqrj6gkob
Tags: 1.4.1-2ubuntu1
* Merge from debian unstable, remaining changes:
  - Add libgcrypt11-udeb for use by cryptsetup-udeb.
  - Add clean-la.mk, and add a symlink for the .la
  - Install to /lib.  LP: #139635

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
-- 
 
74
Die Gedanken sind frei.  Auschnahme regelt ein Bundeschgesetz.
 
75
 
 
76
 
 
77
_______________________________________________
 
78
Gcrypt-devel mailing list
 
79
Gcrypt-devel@gnupg.org
 
80
http://lists.gnupg.org/mailman/listinfo/gcrypt-devel
 
81
 
 
82
 
 
83
--=lynch-SHA-espionage-Comirex-asset-world-domination-tempest-M-14=Sund
 
84
 
 
85
 
 
86
 
 
87
-- 
 
88
Die Gedanken sind frei.  Auschnahme regelt ein Bundeschgesetz.
 
89
 
 
90
--=lynch-SHA-espionage-Comirex-asset-world-domination-tempest-M-14=Sund
 
91
Content-Type: text/plain; charset="us-ascii"
 
92
MIME-Version: 1.0
 
93
Content-Transfer-Encoding: 7bit
 
94
Content-Disposition: inline
 
95
 
 
96
-- 
 
97
Pkg-gnutls-maint mailing list
 
98
Pkg-gnutls-maint@lists.alioth.debian.org
 
99
http://lists.alioth.debian.org/mailman/listinfo/pkg-gnutls-maint
 
100
--=lynch-SHA-espionage-Comirex-asset-world-domination-tempest-M-14=Sund--
 
101
 
 
102
 
 
103