helpGnuTLS - Support: sr #107518, GnuTLS: After DSA Key Generation,...

 
 

sr #107518: GnuTLS: After DSA Key Generation, 2 Integers were Encoded Incorrectly

Submitted by:  Jeffrey Walton <noloader>
Submitted on:  Tue 16 Nov 2010 09:12:56 AM UTC  
 
Category:  None Priority:  5 - Normal
Severity:  3 - Normal Status:  Done
Privacy:  Public Assigned to:  Nikos Mavrogiannopoulos <nmav>
Open/Closed:  Closed Operating System:  GNU/Linux

Add a New Comment (Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Tue 16 Nov 2010 02:47:48 PM UTC, comment #3: 

Hi, this must have been partially solved in 2.10.x and must have been completely solved at:
http://git.savannah.gnu.org/gitweb/?p=gnutls.git;a=commitdiff;h=4c96b274661d185b5a6d8197d9ea401772ed87e7

Thanks for bringing this to our attention. Please let me know if any issue remains.

regards,
Nikos

Nikos Mavrogiannopoulos <nmav>
Project AdministratorIn charge of this item.
Tue 16 Nov 2010 01:29:29 PM UTC, comment #2: 

After some more testing, all DSA private key integers (p, q, g, and x) have been encoded incorrectly.

Interestingly, certtool encodes an RSA private key correctly.

Jeffrey Walton <noloader>
Tue 16 Nov 2010 11:34:47 AM UTC, comment #1: 

Forgot to mention....

$ uname -a
Linux studio 2.6.32-25-generic #45-Ubuntu SMP Sat Oct 16 19:52:42 UTC 2010 x86_64 GNU/Linux
$ certtool --version
certtool (GnuTLS) 2.8.5
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Nikos Mavrogiannopoulos and Simon Josefsson.
$

Jeffrey Walton <noloader>
Tue 16 Nov 2010 09:12:56 AM UTC, original submission:  

Seems to be missing a couple of leading 00 octets...

===================================================

$ certtool --dsa --generate-privkey --pkcs8 --outder --bits 1024 --outfile dsa-gnutls.der
Generating a 1024 bit DSA private key...
Enter password:
Confirm password:
jeffrey@studio:~/Desktop/gnutls$ dumpasn1 dsa-gnutls.der
   0  328: SEQUENCE {
   4    1:   INTEGER 0
   7  297:   SEQUENCE {
  11    7:     OBJECT IDENTIFIER dsa (1 2 840 10040 4 1)
  20  284:     SEQUENCE {
  24  128:       INTEGER
         :         9B FE 7E 3B E8 09 8A 09 A4 4A E7 68 6B 88 BC 09
         :         EC 73 00 2A D8 56 03 B2 3A 1C 2C 04 26 DE 21 5C
         :         4E D6 A8 3B 3F DE 28 B2 F4 47 2C 7C 50 D2 5F A9
         :         B6 0E 69 05 48 39 E2 27 F5 9E 32 25 42 1C 99 EC
         :         18 D6 D0 A3 66 95 18 4B B0 CB 16 69 EE C4 C4 9B
         :         B6 A0 61 02 6A 39 77 BE 77 10 4F FF E9 3F 6D E3
         :         5F 6F 66 E9 B4 E2 C2 5E 8B C4 1E 7D 44 08 27 78
         :         74 CC A3 93 79 06 27 0D 71 F7 34 A7 58 C2 22 57
         :         Error: Integer has a negative value.
 155   20:       INTEGER
         :         E8 93 3C 19 61 B1 38 5B B7 43 0A DE CB 9A F3 3A
         :         38 AD 46 BD
         :         Error: Integer has a negative value.
 177  128:       INTEGER
         :         54 82 BF B9 49 8A B8 77 E2 35 EC BE 7F 8F 3E 4A
         :         AB 21 C0 62 6A A4 C5 8A D8 3B CA 4B 76 BE 50 5D
         :         13 8A AB 33 3D C5 01 9E 21 A1 FA 75 8F 4A 18 00
         :         9B 80 17 35 C0 17 74 BD 2E 2F FC 0A E1 FD AF 44
         :         36 84 66 D4 1C 78 C3 C6 08 4A 84 6D 96 CE 77 00
         :         66 8A 77 35 DC 30 BA 48 18 48 4C 1A 92 D5 52 F0
         :         E2 43 7A F5 16 27 77 FF F4 5D F2 17 5F B3 04 D0
         :         D1 1A 2C E8 36 5D 45 AC A5 68 F7 BB 84 DF 2C 31
         :       }
         :     }
 308   22:   OCTET STRING, encapsulates {
 310   20:     INTEGER
         :       4F A3 A5 92 92 86 FE 57 6A 73 AE 61 BC 46 0A 86
         :       BF 0E 14 BE
         :     }
         :   }

  1. warnings, 2 errors.
Jeffrey Walton <noloader>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #22033:  dsa-gnutls.der added by noloader (606B - application/octet-stream - Private key, Pivate Exponent X incorrect)
file #22031:  dsa-gnutls.der added by noloader (332B - application/octet-stream - Second time around, 3 were encoded incorrectly)
file #22030:  dsa-gnutls.der added by noloader (332B - application/octet-stream - Generated file)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by nmav (Posted a comment)
  • -email is unavailable- added by noloader (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

     

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2010-12-19 nmav Open/ClosedOpen => Closed
    2010-11-16 nmav StatusNone => Done
        Assigned toNone => nmav
    2010-11-16 noloader Attached File- => Added dsa-gnutls.der, #22033
    2010-11-16 noloader Attached File- => Added dsa-gnutls.der, #22031
    2010-11-16 noloader Attached File- => Added dsa-gnutls.der, #22030

    Back to the top


    Powered by Savane 3.7