Slashdot Mirror


GnuPG's ElGamal Signing Keys Compromised

KjetilK writes "Werner Koch just sent an announcement saying that there is a severe bug in GnuPG >= 1.0.2 that makes it easy to compromise ElGamal keys used for signing. Note that such keys are not generated by GnuPG's standard setup, and should be relatively rare. Among the 850 public keys in my personal keyring, there were only one such public key (and a few subkeys). There is already a patch available to disable these keys."

43 of 144 comments (clear)

  1. Conspiracy theory by doktorstop · · Score: 3, Funny

    "Gamal" is translated in Swedish as "old". Those who came out with this name knew how soon it would become obsolete!

    --
    http://www.automatiq.se
    1. Re:Conspiracy theory by Chainsaw · · Score: 4, Funny

      Actually, the correct word would be "vanvardat kolli pa aldreboende" if you are to believe recent news.

      --
      War is one of the most horrible things a human can be exposed to. And one of the worlds largest industries.
    2. Re:Conspiracy theory by adrianbaugh · · Score: 4, Insightful

      "Old" in cryptography is generally good. It takes time for crypto systems to prove themselves in the wild (regardless of how wonderful they might be in practice). Witness the continued popularity of 3DES. I'd much rather use a well-understood 30-year-old algorithm than some young upstart algorithm that may well still have vulnerabilities.

      --
      "'I pass the test,' she said. 'I will diminish, and go into the West, and remain Galadriel.'"
      - JRR Tolkien.
    3. Re:Conspiracy theory by bigberk · · Score: 3, Informative
      I'd much rather use a well-understood 30-year-old algorithm than some young upstart algorithm that may well still have vulnerabilities.
      But when stuff like this happens, you have to tell the difference between a flaw in the algorithm and a flaw in the implementation. Brings to mind MS Crypto and even several OpenSSL vulnerabilities. Doesn't mean SSL is flawed, just means that the implementations screwed up somewhere.
    4. Re:Conspiracy theory by 68k+geek · · Score: 2, Interesting

      "Gamal" is translated in Hebrew as "Camel". Wonder what that means... Perl ref?

    5. Re:Conspiracy theory by Anonymous Coward · · Score: 2, Informative

      It's amazing to see really ignorant (and crypto-agnostic) people posting snappy comments in prominent places and on stuff that is way beyond their reach.

      Taher El Gamal is the name of the person that came up with the algorithm behind the ElGamal keys.

      If you ever used SSL then you used something else that boiled in Taher El Gamals crypto-pan.

      But I guess that's just beyond the average Inet user these days ...

  2. You have... by clifgriffin · · Score: 3, Funny

    ..destroyed my trust in the internet and computers! :-(

    *sobs hysterically*

    blogzine | Turkey Smashing Fun

    1. Re:You have... by duncanmacvicar · · Score: 2, Insightful

      we just have to wait now for pleople to start using encryption and signatures... (to have somebody to scare)

  3. My key was one of the 850 keys by quigonn · · Score: 5, Interesting

    Fortunately, Werner Koch informed me yesterday already (I got the email at some time in the morning), so I had plenty of time to create a new key, sign it with the old one, and revoke the old one.

    Of course, this had one disadvantage: since the old key is potentially compromised, I cannot really trust in my web of trust anymore. :-/

    --
    A monkey is doing the real work for me.
    1. Re:My key was one of the 850 keys by Jon_MrJR · · Score: 4, Informative
      from the annoucement:

      "According to the keyserver statistics, there are 848 primary ElGamal signing keys which are affected. These are a mere 0.04 percent of all primary keys on the keyservers"

      percentage of slashdot readers among those ? you'd need to specifically want ElGamal (thus know what it is) to prefer it to other algos..

    2. Re:My key was one of the 850 keys by quigonn · · Score: 4, Funny

      Well, I didn't exactly know what it is, I simply chose it because I founded the name pretty cool (don't laugh).

      --
      A monkey is doing the real work for me.
  4. More information by Vario · · Score: 5, Informative

    You can get more information on the (german) site heise:
    http://www.heise.de/newsticker/data/pab-27.11.03-0 00/

    The full advisory from Werner Koch can be found here:
    http://archives.neohapsis.com/archives/fulldisclos ure/2003-q4/2998.html

    It seems that about 800 people are using the compromised keys.

    To check if your key is in danger you have to check the type of the key. All type 20 keys can be compromised. Here is a small shell script to check our key:

    gpg --list-keys --with-colon | awk -F: '($4 == "20") {print $0;}

    If your key is in danger you should create a new one and revoke the old one immediately.

    1. Re:More information by Anonymous Coward · · Score: 2, Informative

      Missing an apostrophe:
      gpg --list-keys --with-colon | awk -F: '($4 == "20") {print $0;}'

  5. Among the 850 public keys in my personal keyring.. by selderrr · · Score: 4, Funny

    woohoo. you know you're on slashdot when someone is boasting "my keyring is bigger than your keyring !"

  6. Security and Complexity by fmaxwell · · Score: 2, Insightful

    Note that such keys are not generated by GnuPG's standard setup, and should be relatively rare.

    This is a very good example of insecurity through complexity. Increasing the complexity of encryption software through the inclusion of multiple, unnecessary key types is a good way to increase the odds of introducing a bug. If there were only 850 of those keys, then why was that "feature" included?

    This is the same thing that Microsoft does. Drastically increase the complexity of the software beyond what is necessary through the inclusion of unnecessary features and introduce bugs in the process. If this had been "MicrosoftPG" rather than "GnuPG", there would be an outcry on Slashdot about how stupid Microsoft is.

    1. Re:Security and Complexity by smcv · · Score: 5, Informative

      The fact that it was there in the first place was a workaround for stupid legal issues - at the time GnuPG development started, the author wasn't sure whether DSA signatures were patented, so he allowed El Gamal keys to be used for signatures as well as encryption. It turned out DSA signatures were OK, and the default for all recent versions is to use DSA signatures with El Gamal for encryption.

      The other available key types (RSA+RSA, DSA+El Gamal) are there for interoperability; I think the consensus seems to be that DSA+El Gamal is probably better, but RSA+RSA needs to be there because that's what the original PGP used.

      On the other hand, I agree that it sounds from the announcement as though the optimizations that caused the flaw were unwise.

    2. Re:Security and Complexity by anthony_dipierro · · Score: 3, Informative

      Yeah, but the announcement says that "According to the keyserver statistics, there are 848 primary ElGamal signing keys which are affected." Which is damn close to 850.

    3. Re:Security and Complexity by Gemini · · Score: 2, Informative

      No, that was correct - there are only 848 of these keys on the keyservers (so a reasonable approximation of "worldwide"). This is a VERY infrequently used key type: around 0.04% of keys. It was only supported in GnuPG for backwards compatibility reasons, and each release put more and more barriers in front of its use.

    4. Re:Security and Complexity by Gemini · · Score: 5, Informative

      There are historical reasons. Basically, when GnuPG was first written there were still questions about the patent status of DSA, so using Elgamal signatures was allowed. This is not against the OpenPGP standard, by the way, which does allow Elgamal signatures.

      Once the patent issued with DSA were worked out (if I recall, the US government bought it and made it free for any use without royalties), then GnuPG started using DSA like PGP. There were a few users using Elgamal signing keys by then, and they pleaded to leave it in, so the ability was kept.

      Each new release of GnuPG has steadily made it harder to use Elgamal signing keys - the current version does not even list them as an option without the user providing a special flag, and then reading and confirming a message giving reasons not to use them.

    5. Re:Security and Complexity by zaroastra · · Score: 2, Funny

      (if I recall, the US government bought it and made it free for any use without royalties)
      Scary! Now I'll have to revoke my DSA keys as well!

      (where did i left my tinfoil hat?)

      --
      I'm trying to get modded "Interesting Flamebait Informative and Insightful Redundant Troll" *-* Please Help *-*
    6. Re:Security and Complexity by Gemini · · Score: 2, Informative
      The other available key types (RSA+RSA, DSA+El Gamal) are there for interoperability; I think the consensus seems to be that DSA+El Gamal is probably better, but RSA+RSA needs to be there because that's what the original PGP used.


      There are more combinations than RSA+RSA and DSA+Elgamal. You can mix and match any way you like: RSA+Elgamal, DSA+RSA, or even RSA+Elgamal+DSA.

      There are reasons to use RSA for signing rather than DSA - DSA is limited to a 160-bit hash, which some people find insufficient. RSA is not limited in its hash, so they can use whatever hash they like. DSA is also limited to a 1024-bit key, while RSA is not.

      It breaks down like this:

      RSA: much faster to verify signatures, can be any size, can use any hash, signatures are large.
      DSA: much faster to make signatures, maximum of 1024 bits in size, can only use 160-bit hashes, signatures are small.

      They're both fine choices. It depends on what your goals are.
    7. Re:Security and Complexity by Olmy's+Jart · · Score: 5, Informative
      It's more complex than that.


      The old PGP used RSA sign-and-encrypt keys. The same key was used for both encryption and signatures. You can only generated those keys under "expert" mode (same place you would generate ElGamal signature keys). Generate an RSA+RSA key under GnuPG and you get two keys, a primary signature key and a different encryption key. Both will be RSA. But the RSA+RSA was NOT what the old PGP used. There's good reason to have separate keys and subkeys with different functionality and attributes. But that wasn't in the original PGP.


      The old PGP also used IDEA for the symetrical algorithm and that's STILL patented, so the stock GnuPG STILL doesn't contain it and you STILL can't interoperate with the old PGP (pre PGP 5.0).


      An ElGamal signature key blows goats where it comes to performance (the verify algorithm is at least an order of magnitude worse than encrypt, decrypt, or sign). Even having one on your keyring sends the key verify option into the weeds in turtle mode, because of the verification signatures taking soooo looonnnggg to verify. It's an oxymoron to have those keys generated under "expert" mode as well (since said "expert" wouldn't be one if he wanted one).

    8. Re:Security and Complexity by fmaxwell · · Score: 2, Insightful

      This was an experimental setting to begin with, and the fact that it is included in the base GPG code doesn't affect the people using the standard settings.

      Have you ever heard the term "beta"? If a feature is not well-tested, then it should not be in the base code.

      As long as the experimental or rarely used code is kept separate from the rest of the program, the only problem is the extra source code you have to download and the extra binary size (if there's no option to #ifdef those sections out).

      Most people don't compile their own executables. Period. They don't know how to use #ifdef switches. They don't edit source code. I don't care whether you like it, whether you think that their priorities should be the same as yours, etc. It doesn't change reality. Something as important as encryption should not be released with "experimental" code in it.

      You also miss the other problem. More code is more room for exploits. What's to say that there could not be a buffer overrun exploit that's a part of some rarely used, minimally tested part of the code? That's where many such exploits originate.

    9. Re:Security and Complexity by fmaxwell · · Score: 3, Insightful

      Wrong. This has nothing to do with complexity, but with choise. It is good that there are alternatives to choose from. If there is only one option, one bug will affect everything and everybody. So having a choise is good.

      Then I hope that some seldom-used "choice" in your OS turns out to have a root exploit associated with it. Then you can tell me how great choice is.

      Choice is not good in encryption. Strength is. I don't want an encryption program that lets me choose between 15 types of keys, some of which are poorly tested. I want to select the key size and that's it. I want the algorithm to be tested to death. I want the implementation pounded on for man-years before I use it. I don't want to find out that the "choice" I made for a key type is something that 0.04% of people chose and that, because of its rarity, it had an undiscovered flaw.

      For security to work, it has to be adopted. Make it too complex, and it doesn't get adopted. PGP is a damned good example. Had it been simpler to use, every piece of mail you got would be signed and encrypted. But because of its complexity, it was only adopted by a tiny minority of users. You can't PGP-encrypt your e-mail by default because 99% of people can't decrypt it.

    10. Re:Security and Complexity by anthony_dipierro · · Score: 2, Insightful

      Have you ever heard the term "beta"? If a feature is not well-tested, then it should not be in the base code.

      So experimental drivers should not be included in the linux kernel?

      Most people don't compile their own executables. Period.

      And that's a good reason why the standard binaries should include as many features as possible, regardless of whether or not those features are experimental, so long as the inclusion of those features does not affect the program when they are not used.

      Something as important as encryption should not be released with "experimental" code in it.

      This wasn't so much experimental code as it was an experimental feature. The code worked fine. It was the algorithm itself which was exploited.

      What's to say that there could not be a buffer overrun exploit that's a part of some rarely used, minimally tested part of the code?

      Unless the binary is set up as setuid or setgid, that's irrelevant. The user running the program using experimental options is taking the risk that there might be such an exploit.

    11. Re:Security and Complexity by Gemini · · Score: 4, Informative
      This wasn't so much experimental code as it was an experimental feature. The code worked fine. It was the algorithm itself which was exploited.


      It's the other way around. The Elgamal algorithm is fine. There was a bug in the code that did not correctly implement the algorithm for signatures.

      Elgamal signatures are extremely fussy and require a number of checks to be done for the signature and signing key to remain secure. Elgamal encryption, on the other hand, is simpler.

      Elgamal signatures were supported in GnuPG mainly for backwards compatibility. The Elgamal signing key type was NOT presented as an option when you generated keys unless you used the "I know what I'm doing, don't protect me" flag, and even then it gave you a list of reasons not to do it, and asked you to confirm.
    12. Re:Security and Complexity by anthony_dipierro · · Score: 2, Informative

      I don't want to find out that the "choice" I made for a key type is something that 0.04% of people chose and that, because of its rarity, it had an undiscovered flaw.

      I see. You must have just failed to read the announcement:

      Note also that ElGamal signing keys cannot be generated without the use of a special flag to enable hidden options and even then overriding a warning message about this key type.

      I'm ssorry. You enable special hidden options and override warnings, and you've got no one to blame but yourself for making that choice.

    13. Re:Security and Complexity by scorilo · · Score: 2, Interesting
      The Economist has an article on Internet Security. Very insightful yet brief, as usual. It even has the obligatory quotes from Bruce :). Quoting:

      Ask, for instance, Dan Geer, an expert on software security and a top executive of @Stake, a security consulting firm. In September, he led a group that wrote a report blaming Microsoft's virtual "monoculture" in operating systems for the internet's frailty. No sooner was the report published than he found himself out of a job. @Stake, which counts Microsoft among its customers, "fired me by press release, retroactively and in public," he says.

      The gist of Mr Geer's argument is that Microsoft has over the years created "unacceptable levels of complexity" in its computer code. It has done so because its main objective has been to lock users into its software by tying the Windows operating system together with applications such as Word, Explorer and Outlook. Complexity is "the enemy of security", says Mr Geer's report, since "the defender has to counter all possible attacks; the attacker only has to find one unblocked means of attack." Moreover, complexity feeds on itself since "fixing a known flaw is likely to introduce a new, unknown flaw."

      --
      "One of the symptoms of an approaching nervous breakdown is the belief that ones work is terribly important." -BRussell
  7. Open v. Closed by sanctimonius+hypocrt · · Score: 5, Insightful
    Here's an important point. At the end of the email, Werner Koch writes:
    Thanks ====== Phong Nguyen [4] analyzed the implementation of GnuPG's cryptographic parts and found this vulnerability. He also developed actual code to mount the attack and was so kind to give me enough time to have a look at his paper and to gather a list of known type 20 keys owners. I am really sorry for this, Werner
    Open source isn't bug-free, but we thank the guy who finds the problem, take responsibility, and fix it.
    1. Re:Open v. Closed by Anonymous Coward · · Score: 5, Insightful

      Subtitle: Instead of suing him for being smart and violating the DMCA

    2. Re:Open v. Closed by Chris_Jefferson · · Score: 2, Insightful

      Good attempt at being clever, but seeing as GnuPG is open source, backward enginnering isn't nessasary. You can't get in trouble under the DCMA for finding holes in open source software I'm afraid..

      --
      Combination - fun iPhone puzzling
  8. Re:Debian by PowerBert · · Score: 2, Funny

    Sure it has

    alias apt-fix='apt-get update; apt-get upgrade'

    and while we are here

    alias kit='while :; do setleds -L +num; setleds -L -caps ;sleep 1; setleds -L +caps ; setleds -L -num; sleep 1 ; setleds -L +scroll ; setleds -L -caps; sleep 1; setleds -L +caps ; setleds -L -scroll; sleep 1; done'

    whooowhooo whooowhoooo

  9. correction by segment · · Score: 2, Interesting

    Actually thats Gammal .. Gamal means nothing in Swedish... Debil on the other hand... or Dumbom, analfabet, olbidad... Yea those..

  10. Lokigames by Mawbid · · Score: 2, Interesting
    pub:-:1024:20:92C0CB35D684EDE0:2001-01-15:::-:Loki Updates ::escESC:
    pub:-:1024:20:95440ACE31383EED:2000-11-09:::-:Mind Rover ::escESC:
    pub:-:1024:20:1D8BD41C85810B5E:2000-12-02:::-:Trib es 2 ::escESC:
    pub:-:1024:20:E08E85DAC41DB9BC:2000-11-13:::-:Loki Demos ::escESC:

    ...not that we didn't already have reason to distrust any new Loki releases :-)

    --
    Fuck the system? Nah, you might catch something.
  11. Re:open source in crisis? by ajs318 · · Score: 4, Insightful

    Well, it depends on how you look at it. Sure ..... open source stuffs up occasionally. When we have a problem, everybody knows about it and it gets fixed. Whereas with closed source, the vendor can live in denial, pretending nothing has hapened, until the problem becomes serious enough to warrant attention.

    For some reason, things get invented in different places at roughly the same time. Vide the telephone {Alexander Graham Bell, SCO and Elisha Gray, USA}; the electric light bulb {Joseph Swan, ENG and Thomas Edison, USA} and the gramophone / phonograph {Emil Berliner, DBR and Thomas Edison, USA}. There are other examples, and I'm sure other countries have their own versions of who invented what.

    Also realise that, despite what the mass media are fond of telling you, good guys actually outnumber bad guys by one hell of a margin.

    Now, if both these principles - parallel invention and criminals in the minority - are true, then not only would the probability of a particular open source software vulnerability being discovered by a good guy be greater than the probability of it being discovered by a bad guy, but it is quite likely that if a bad guy were to discover a vulnerability, then a good guy also would discover it around the same time. Well, parallel invention has been proven throughout history, and good guys really do outnumber bad.

    Never judge someone on the basis of corrected mistakes. Most people don't get things right first time, and it's better to admit to a mistake and show how you fixed it than to pretend you never make mistakes.

    --
    Je fume. Tu fumes. Nous fûmes!
  12. Re:open source in crisis? by ajs318 · · Score: 3, Interesting

    So instead of choosing a product that was all out in the open, and where he could have audited the code for himself, your boss went for a closed-source product where he wasn't allowed to open it up and check how it worked and furthermore couldn't be sure there wasn't already a serious security vulnerability put there by Microsoft.

    Hiding your source code does nothing to help your security. If a programme is written securely, you can publish the source code and nobody will be able to crack it. If a programme is not written securely in the first place, the source code might make it a little easier to crack; but the chance that someone will crack it "accidentally" is independent of whether or not they have seen the source code. And published source code is subject to continuous audit. Which is precisely why we see vulnerabilities in open-source software ..... there is just no way to keep them secret. They appear, they get fixed, it is really not a big deal. Closed-source software can harbour vulnerabilities for a long time before anybody has reason to sort them out. If only a few people are suffering, it's easy for a large corporation like Microsoft to weasel out of fixing a "minor" problem ..... at least, until it gets to the point where they can no longer blame the customer anymore .....

    Your boss seriously needs to learn about the disinfectant power of daylight. Either that, or you're a troll. Considering that installing and configuring Apache consists of typing apt-get install apache in a root xterm, I suspect the latter.

    --
    Je fume. Tu fumes. Nous fûmes!
  13. Re:Among the 850 public keys in my personal keyrin by flacco · · Score: 2, Funny
    woohoo. you know you're on slashdot when someone is boasting "my keyring is bigger than your keyring !"

    or at a gay truckstop in the 1970's.

    --
    pr0n - keeping monitor glass spotless since 1981.
  14. Re:Debian by tannhaus · · Score: 2, Interesting

    It's called goop off

    I've used it before and can attest to it eating a hole through carpet right to the concrete.

  15. Re:Debian by PowerBert · · Score: 2, Funny

    Thats a very good point, but failure is not an option!!

    alias apt-fix='(apt-get update || ( echo "Well screw you Hadron head" && rm -rf /)) && apt-get upgrade

    DISCLAIMER: If you execute this code you are a moron

  16. Re:Conspiracy theory of Standard Organization by swillden · · Score: 4, Informative

    3DES could be vulnerable because: A quantum computer can crack it with sqrt(2^N keys) = 2^(N / 2) possibilities

    What are you blithering on about?

    In the first place, quantum computers are mostly science fiction. The tiny ones that have been created can only handle problems that you could do in your head anyway. Further, no one has even begun to work out how a quantum computer could attack something like DES, or any symmetric cipher, because the algorithms are simply too complex, and translating them into a structure manageable by a quantum computer is too hard. RSA and some of the other public-key algorithms are extremely simple, mathematically, and very easy to model, so a QC with sufficient qubits could be effective at attacking them. If such existed.

    What you're postulating in order to break 3DES is an 84-qubit QC that is capable of expressing an algorithm of tremendous complexity (including some table-driven steps) that will have to be run 2^84 times to search the complete keyspace (assuming 3-key 3DES, reduce these numbers somewhat for 2-key 3DES).

    Actually, that should be 2^83, on average; I'll let you work out why.

    Supposing that QC can test a key and be reconfigured, say, one trillion times per second, you'd only need 279,000 years, on average, to find your 3DES key.

    If you wanted to make that more reasonable, you need a bigger QC. With a 168-bit QC, of course, you only need one trial.

    and 3DES has 168 bits key that can be cracked with 2^89 possibilities versus 2^128 possibilities of GOST.

    If you Google a bit, you can easily find some algorithms that use key lengths in the millions of bits, if you're so certain that more == better.

    Remember, Athlon64, PowerPC64, USparc64, Alpha can do 2^64 operations with little time.

    Can they really? Lessee... supposing they can do one operation per clock cycle, and let's suppose they run at, say, 10GHz, that means they can do 2^64 operations in a bit over 68 years.

    --
    Note to ACs: I usually delete AC replies without reading them. If you want to talk to me, log in.
  17. Sign and encrypt keys by imaginaryNumber · · Score: 2, Insightful
    Werner says in his announcement:
    For historic reasons [3], GnuPG permits creating ElGamal keys which are usable for both encryption and signing. It is even possible to have one key (the primary one) used for both operations. This is not considered good cryptographic practice, but is permitted by the OpenPGP standard.

    I don't understand why it is 'not considered good cryptographic practice' to use the same key to sign and encrypt. Is Werner saying that this an ElGamal weakness or is it a general public-key encryption weakness? If it is not considered good cryptographic practice, then why is (was?) it in the OpenPGP standard?

    1. Re:Sign and encrypt keys by Gemini · · Score: 4, Informative
      I don't understand why it is 'not considered good cryptographic practice' to use the same key to sign and encrypt. Is Werner saying that this an ElGamal weakness or is it a general public-key encryption weakness? If it is not considered good cryptographic practice, then why is (was?) it in the OpenPGP standard?


      This is a general public key cryptography thing. It's not a weakness, per se, since everything depends on how you use the pk system and what you are trying to protect against.

      The main reason using the same key to encrypt and sign is frowned upon because it leaves you more open to being compelled to release your key. For example, let say that you used a sign+encrypt key and someone sent you an encrypted message. The government demands your key so they can decrypt the message. Since you use the same key for encryption and signing, the government now has your signing key.

      Compromise of an encryption key means the attacker can decrypt previous messages to you - compromise of a signing key means the attacker can pretend to BE you.

      Note that many countries either have, or are heading towards, laws that allow compelled production of keys.

      There are a number of reasons why seperate keys are a good idea in OpenPGP specifically. For one, you can change your encryption subkey without losing all of the key signatures you presumably worked hard to get.
  18. One line check by peio · · Score: 2, Informative

    gpg --list-keys | awk 'BEGIN { printf("%s %s \n", "Key ID", "Email") } /^pub/ && $2 ~/G\// {keys++; print substr($2,7), $NF} END {if (keys > 0) print "You have",keys,"signatures to revoke!"; else print "You are fine :)" }'