🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: alt.privacy.anon-server
26 messages
26 total messages Started by Mouse Sun, 05 Sep 1999 00:00
Uniqueness of Key ID
#7733
Author: Mouse
Date: Sun, 05 Sep 1999 00:00
37 lines
2861 bytes
I have just read Simon Singh's "The Code Book", which has started to make me
curious about cryptography and related issues, including PGP. I have no
mathematical expertise. I am thus a complete novice, so please forgive what
is no doubt a stupid series of questions, or perhaps direct me to a place
more suitable for them.

In PGP Help, the definition of "Key ID" is "A legible code that uniquely
identifies a key pair. Two key pairs may have the same user ID, but they
will have different Key IDs."

If have understood correctly, the public key is a function of the private
key, which in turn consists of two potentially massive primary numbers. In
PGP, the choice of primary numbers is in turn a function of certain random
data consisting, among other things, of mouse movements.

I can quite see the enormity of the computational task required to factor
the public key where the choice of private key is from among prime numbers
upto 4096 bits long, at least using a digital computer.

But my problem is this: if PGP's choice of  private key is truly (or
approximately) random, then is there not a CHANCE that PGP might calculate
an identical private key for two different individuals?  If it is right that
the choice of the private key is essentially random, or close to random,
then is it not in fact also right that there is the same chance of coming up
with private key "A", which has already been chosen by a different
individual, as with private key "B", which remains unused? Thus, by an
extraordinary fluke, might it not in fact be possible for all users of PGP
to end up with the same Key ID? Or, more plausibly, might it not be possible
for some users of PGP to end up with the same Key ID? If so, and most
importantly, what (if any) are the implications? Is security somehow
"salvaged" by the need for an association between the Key ID and the User
ID?

I am sorry to be so dim about this: again, if there is a better place to
find the answer, please re-direct me.

Thanks.
Re: Uniqueness of Key ID
#7718
Author: Asbestos Dust
Date: Sun, 05 Sep 1999 00:00
96 lines
5425 bytes
-----BEGIN PGP SIGNED MESSAGE-----

On Sun, 5 Sep 1999 13:13:16 +0100, "Mouse" <squeak@dial.pipex.com>
wrote:

>Or, more plausibly, might it not be possible
>for some users of PGP to end up with the same Key ID?

This is remotely possible, as is any probability-based attack.  The
trick is, what does "remotely" mean?  I haven't done the math, but
assuming a non-weak random seed during the random number production
part of the process, I suspect that two users coming up with the same
Key ID would be one of those "once in a hundred life-times of the
universe" kind of deals.  For my money, that's impossible, or close
enough to "zero" probability to rely on.  Bad guys trying for one of
your messages using this technique would be way ahead just picking
words at random out of a dictionary in the hopes that one of the
combinations will be the message you sent.

Which brings up a point I occasionally see missed in
security/encryption groups, discussions, and articles.  How much is
enough?  I'm a big fan of everyone using PGP, mostly to politically
short-circuit projects like MS's now infamous "NSA key," key escrow
schemes, and attempts to limit encryption export, whether by big
business or government.  People using (for all practical purposes)
unbreakable encryption is a statement in its own right.  

I've heard rumors that guerillas in Central America, students in
China, and dissident elements in certain Islamic "republics" are
using illegally exported PGP for a variety of purposes.  Now THESE
are people that have something to worry about.  I gotta tell you that
I wouldn't be uncomfortable using a 1048 key in any of these
situations, (although I'd prefer larger).  I've also heard that PGP
and variants are being used by a variety of terrorist organizations.
Now for my money, if NSA can figure out a way to hack those signals
and track and kill, oh, say, ben Lauden and everyone standing within
a couple of hundred yards of him, more power to them.  I note that
we're negotiating with a third-world piss-hole to get him extradited
and tried in a neutral country, so apparently his signals security is
holding up pretty well.

On the other hand, I can't tell you how many times I've seen articles
appear here and elsewhere in which someone alleges that they heard
that someone else has figured out how to hack their encryption scheme
in something less than 5000 years.  Well, that's interesting from a
technical standpoint, and something that should be watched.  On the
other hand, everyone rushing out to buy the latest system with the
biggest memory and enough speed to handle their new (pick a big
damned number)-bit encryption to combat the latest incursion by (pick
your favorite paranoid fantasy) strikes me as...odd.

It's like buying the latest German-steel bank vault with infrared
motion detectors, and 24-hour surveillance and surrounding it with an
armed-to-the-teeth Ranger unit to protect your favorite coffee cup.
I'm guessing that locking it in your desk drawer will probably do
it.

Now, I currently use PGP 2.6.2, with a 1048 key.  Personally, I'd bet
my next several paychecks that nothing I've ever encrypted using it
has ever been hacked, nor do I expect that any ever will.  I've used
higher versions, and will eventually move to a 4000+ key -- not
because I'm worried about the 1048, but because (a) it's going to be
standard shortly and (b) it's interesting from a technical
standpoint.  I just like messing with it, in other words.

Frankly, the concept that anyone is going to Echelon my pissant
little signals, spend a gadzillion dollars and untold time hacking
them, then send a black helecopter hunting for my narrow ass is
something that never occurred to me, but to listen to many here,
their 2048 encrypted shopping lists, love notes, and whatnot are even
now sitting on NSA desktops, awaiting further action.

I believe in privacy, and I believe in widely available strong
encryption as a means to that end.  I also believe that crossing the
line from a rational response to security and privacy issues into
near-clinical paranoia is increasingly common and, frankly, can be
more distressing than vaporous, X-File, "rogue elements in the
government".

Just my $0.02 worth.

AD
Public Key 0x8AD82E55
On A Keyserver Near You
http://pgp5.ai.mit.edu:11371/pks/lookup?op=get&search=0x8AD82E55


-----BEGIN PGP SIGNATURE-----
Version: 2.6.2

iQCVAwUBN9Ko1jk6v6WK2C5VAQHRuwQAvMnmPAgxOqMB7nscFYQM3gAXGi3p7Sux
NKRzWXZyflCg3Oo7UkHNL7wif+h698a47W4yJpApvC6CrHxx/y5pv51YYAg05fP0
bLCu6N55zj5E2D9aIbemAcPpoiXHGPKF0xLM5cwwDQb0VWd6soHIN9Ui3IyiGr10
7tbdcE+1SeI=
=4M9z
-----END PGP SIGNATURE-----
Re: Uniqueness of Key ID
#7731
Author: Eric Lee Green
Date: Sun, 05 Sep 1999 00:00
19 lines
1807 bytes
Mouse wrote:
> But my problem is this: if PGP's choice of  private key is truly (or
> approximately) random, then is there not a CHANCE that PGP might calculate
> an identical private key for two different individuals? 

It is as likely as someone guessing your private key. I.e., not very
likely.

The exception: If a weak random number generator is being used that
cycles in a short period of time or that has a known initial state and
sequence. A pseudo random number generator relies upon being first set
into an unknown (hopefully random) state. If it instead starts at a
known state, it will generate the same sequence of numbers for all
people who are using it. Very Bad News!

-- 
Eric Lee Green    http://members.tripod.com/e_l_green
  mail: e_l_green@hotmail.com
                    ^^^^^^^    Burdening Microsoft with SPAM!
Re: Uniqueness of Key ID
#7732
Author: Tony L. Svanstrom
Date: Sun, 05 Sep 1999 00:00
34 lines
3125 bytes
Mouse <squeak@dial.pipex.com> wrote:

> But my problem is this: if PGP's choice of  private key is truly (or
> approximately) random, then is there not a CHANCE that PGP might calculate
> an identical private key for two different individuals?  If it is right
> that the choice of the private key is essentially random, or close to
> random, then is it not in fact also right that there is the same chance of
> coming up with private key "A", which has already been chosen by a
> different individual, as with private key "B", which remains unused? Thus,
> by an extraordinary fluke, might it not in fact be possible for all users
> of PGP to end up with the same Key ID? Or, more plausibly, might it not be
> possible for some users of PGP to end up with the same Key ID? If so, and
> most importantly, what (if any) are the implications? Is security somehow
> "salvaged" by the need for an association between the Key ID and the User
> ID?

With enough close to identical planet Earths (ie a
multi-dimensional-thing where every possible earth exists in it's own
dimension) you will be able to find a planet where everyone that tries
to use PGP will end up with the same secret key no matter how many times
he tries to create one... It's possible, but it's darn near impossible
for it to happen. Even if it did happen it's not likely that that user
will ever come by the other key... and since we can't control this we
can't use it to attack someones key/security with.


     /Tony
-- 
     /\___/\ Who would you like to read your messages today? /\___/\
     \_@ @_/  Protect your privacy:  <http://www.pgpi.com/>  \_@ @_/
 --oOO-(_)-OOo---------------------------------------------oOO-(_)-OOo--
 DSS: 0x9363F1DB, Fp: 6EA2 618F 6D21 91D3 2D82  78A6 647F F247 9363 F1DB
 ---���---���-----------------------------------------------���---���---
    \O/   \O/       �1999 <http://www.svanstrom.com/>       \O/   \O/
Re: Uniqueness of Key ID
#7781
Author: Thomas J. Boschloo
Date: Mon, 06 Sep 1999 00:00
26 lines
1789 bytes
Mouse wrote:
> 
> In PGP Help, the definition of "Key ID" is "A legible code that uniquely
> identifies a key pair. Two key pairs may have the same user ID, but they
> will have different Key IDs."

It is possible to two keys to share the same keyID. This is called a
'DEADBEEF' attack (note that 0xDEADBEEF is  3735928559 in decimal). You
would only need to change the last 32 bits of the RSA modulus for this.

To make the pgp program as a completely identical key however, the last
64 bits of the RSA modulus should be changed. So you can have two
different keys with the same keyID on your keyring, but not two with the
same 64 last bits.

With DH keys it is different. Here the keyID seems to be the last 32
bits of the fingerprint. So here a 'DEADBEEF' attack might be harder to
mount. But the NSA could do it! If they wanted to. (32 bit 'signatures'
are considered very weak)

Thomas
--
AMD K7 Athlon 650 Mhz! <http://www.bigbrotherinside.com/#help>

PGP key: http://x11.dejanews.com/getdoc.xp?AN=453727376
Email: boschloo_at_multiweb_dot_nl
Re: Uniqueness of Key ID
#7821
Author: Dmitriy Morozov
Date: Tue, 07 Sep 1999 00:00
7 lines
881 bytes
> The key-id is 32 bits long.

Isn't it 64 bits?

--
Dmitriy Morozov
foxcub99@mail.ru
Re: Uniqueness of Key ID
#7834
Author: Peter Buzanits
Date: Tue, 07 Sep 1999 00:00
22 lines
1606 bytes
The key-id is 32 bits long.

So if I did not calculate wrong, the probability, that the ids of
approximately 1 million Keys are different (unique) is

p = ((2**32-1)/(2**32)) ** (2**20)

** means the pow-function  (i. e. 2**10 = 1024)

The probability, that two of the keys have the same id then is

1 - p

Can anyone calculate that? (I have no software, that can do that...)

Peter
--
-----------------------------------------------
DI Peter Buzanits
mailto:peter@icb.co.at      http://peter.icb.at
AOL-IM: Buzanits  Keys available on PGP-Servers
-----------------------------------------------
Re: Uniqueness of Key ID
#7836
Author: Martin Harvey
Date: Tue, 07 Sep 1999 00:00
141 lines
4982 bytes
Peter Buzanits wrote:
> 
> The key-id is 32 bits long.
> 
> So if I did not calculate wrong, the probability, that the ids of
> approximately 1 million Keys are different (unique) is
> 
> p = ((2**32-1)/(2**32)) ** (2**20)

Your answer is about right for small numbers of keys, say less than one
thousand. For larger numbers of keys it becomes very bad very fast. I
kid you not... for a million keys, the actual chance of one million
unique keys is a factor of 10 to the power of 100 less than your formula
would suggest!

> Can anyone calculate that? (I have no software, that can do that...)

Hmm... well if you want to calculate it, then you'll have to be careful
to avoid numerical inacuracies... Luckily, your first approximation is
sufficiently simple that an exact answer can be calculated for it, and
thus we can estimate the innacuracies. Basically, it's an exponential
decay curve. First, here's a practical solution:

Program used:

***********************************************
program Collisions;
uses
  SysUtils;
{$APPTYPE CONSOLE}
const
  KeyComb = 4294967296.0; //Ensure floating point constant.

var
  Product,Term:extended; // Maximum FPU precision possible.
  Iter,N:integer;

begin
  Product := 1;
  Write('How many keys? ');
  ReadLn(N);
  if N - 1 > 0 then
  begin
    for iter := 0 to N - 1 do
    begin
      Term := (KeyComb - 1) / KeyComb;
      Product := Product * Term;
    end;
  end;
  WriteLn('Probability of no collisions: ',Product);
end.
***********************************************

Results:

How many keys? 1
Probability of no collisions:  1
How many keys? 100
Probability of no collisions:  0.999999976716936
How many keys? 10000
Probability of no collisions:  0.999997671696274
How many keys? 1000000
Probability of no collisions:  0.999767196459270

Now what's the theoretical answer for your approximation for one million
keys? You can do this easily with a few logarithms:

it's Exp(ln(2^32 -1) - ln (2^32)) * 10^6)

= Exp ( -0.000000000233 * 10^6 ) = Exp( -0.000233 )

=  0.9997670271424

cf.0.999767196459270

So, our million multiplications agree to within one part in a million
with the logs. I'd call that a reasonable confidence.

[Don't you just love 80 bit floating point numbers? loadsa precision]

However, your approximation can be much improved on by calculating
things precisely, since it's very poor for large numbers of keys.

Statistical Model: 1 million keys of 32 bits with no collisions.

prob of no collision in first key is: P(0)= 1
prob of no collision in 2nd key, given no previous collisions is:

P(1) = (2^32 - 1) / (2^32)

Prob of 3rd key:

P(2) = (2^32 -2) / (2^32)

N+1 'th key:

P(N) = (2^32-N) / (2^32)

And you want to find:

Product (N:=0 to 10^6) { (2^32-N)/(2^32) }

Okay. One quick modification to the program. Change the line that read:

      Term := (KeyComb - 1) / KeyComb;

to say:

      Term := (KeyComb - N) / KeyComb;

And we get the following (very surprising) results:

How many keys? 10
Probability of no collisions:  0.999999976716936
How many keys? 1000
Probability of no collisions:  0.999767196432198
How many keys? 100000
Probability of no collisions:  0.0974580215385207
How many keys? 1000000
Probability of no collisions:  7.43297787552078 E-102

Yes... that is 0.0000 {102 zeros} 000743

It's actually fairly obvious why after about one hundred thousand keys
the probabilities become very small: when you add the one millionth key,
you have roughly a one in four thousand chance of duplicating by
mistake.

You don't have to multiply by 3999 / 4000 for very long to get a very
small answer, even after a few thousand multiplications by this factor,
the chances of no collisions become tiny.

Incidentally... just to remind you how darn fast modern processors are,
none of the calculations took more than a fraction of a second :-)

MH.

--
Martin Harvey.
mch24@harvey27.demon.co.uk
http://www.harvey27.demon.co.uk/mch24/
Re: Uniqueness of Key ID
#7847
Author: Imad R. Faiad
Date: Tue, 07 Sep 1999 00:00
65 lines
3905 bytes
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Greetings,

It is correct that the Key ID is a 64 bits value, however, the Key ID need
not be unique.  That is you may have 2 keys in your keyring sharing the same
64 bits Key ID and they will still be distinct keys.  The same applies for
fingerprints.  A PGP fingerprint need not be unique.  Having two keys with
the same Key ID and fingerprint does not necessarily mean that they are the
same key.

While it is easy to engineer a 32 bits PGP key ID (much much easier for DSS
keys), it is a lot harder to engineer a 64 bits PGP key ID.  I would venture
to say that on average, engineering a fingerprint is as hard as breaking the
hash or breaking the key.

The Key ID and Fingerprint are nothing but tags to help us mortal men to
identify a key.  A proper implementation of PGP should be able to handle Key
ID and fingerprint collisions.  What makes a key unique are all it's
components put together.  Thus, if I ever manage to spoof your Key ID and
it's fingerprint (highly unlikely), that does not mean that I will be able
to decrypt your messages or sign messages on your behalf with my phony key. 
Unless of course, I cracked your key :-), which is fortunately or
unfortunately impossible given the current state of the art. 

Best Regards

Imad R. Faiad

On Mon, 06 Sep 1999 21:29:31 +0200, in alt.security.pgp "Thomas J. Boschloo"
<nospam@multiweb.nl> wrote:

>Mouse wrote:
>> 
>> In PGP Help, the definition of "Key ID" is "A legible code that uniquely
>> identifies a key pair. Two key pairs may have the same user ID, but they
>> will have different Key IDs."
>
>It is possible to two keys to share the same keyID. This is called a
>'DEADBEEF' attack (note that 0xDEADBEEF is  3735928559 in decimal). You
>would only need to change the last 32 bits of the RSA modulus for this.
>
>To make the pgp program as a completely identical key however, the last
>64 bits of the RSA modulus should be changed. So you can have two
>different keys with the same keyID on your keyring, but not two with the
>same 64 last bits.
>
>With DH keys it is different. Here the keyID seems to be the last 32
>bits of the fingerprint. So here a 'DEADBEEF' attack might be harder to
>mount. But the NSA could do it! If they wanted to. (32 bit 'signatures'
>are considered very weak)
>
>Thomas

-----BEGIN PGP SIGNATURE-----
Version: 6.0.2ckt http://irfaiad.virtualave.net/
Comment: Assert your right to privacy, use PGP
Comment: KeyID: 0x001FA1AD
Comment: Fingerprint: D09D 1A66 A6C8 4FD6 E414  1E35 C9A0 B17F 001F A1AD

iQA/AwUBN9TvZ8mgsX8AH6GtEQLw0gCfV9NA/N37blMIZlW707ip3ndZA68An1vt
2bvfHktILTYU7a+iTSxsvCSG
=lza5
-----END PGP SIGNATURE-----
Re: Uniqueness of Key ID
#7876
Author: Your Name
Date: Wed, 08 Sep 1999 00:00
38 lines
1745 bytes
In article <37D54124.3FE11FD6@icb.co.at>, peter@icb.co.at says...
>
>The key-id is 32 bits long.
>
>So if I did not calculate wrong, the probability, that the ids of
>approximately 1 million Keys are different (unique) is
>
>p = ((2**32-1)/(2**32)) ** (2**20)
>
>** means the pow-function  (i. e. 2**10 = 1024)
>
>The probability, that two of the keys have the same id then is
>
>1 - p
>
>Can anyone calculate that? (I have no software, that can do that...)

Hello Peter

Regarding your counting, I agree with your denominator.

Let k = 2**32,  m = 10**6 or 1,000,000

Then the total sample space t = k**m

But, I think that your numerator is wrong.

The number J of m tuples where all the elements of 
each tuple are distinct would be (I hope)

J = k*(k-1)*(k-2)....(k-m+1)

So, the probability P of having 2 or more ID collisions
with one million keys is

	P = 1 - J/(k**m)

--Rich Eramian aka freeman
Re: Uniqueness of Key ID
#7887
Author: Thomas J. Boschloo
Date: Wed, 08 Sep 1999 00:00
38 lines
2528 bytes
"Imad R. Faiad" wrote:
> 
> It is correct that the Key ID is a 64 bits value, however, the Key ID need
> not be unique.  That is you may have 2 keys in your keyring sharing the same
> 64 bits Key ID and they will still be distinct keys.  The same applies for

Not true. In PGP 553i I tried to add two keys with the same 64 bit KeyID
value, couldn't add it. The 64 bit value is how pgp distinquises two
keys, not by fingerprint.

> fingerprints.  A PGP fingerprint need not be unique.  Having two keys with
> the same Key ID and fingerprint does not necessarily mean that they are the
> same key.

Since the fingerprint is a 128 bit MD5 value, or a 160 bit SHA-1 value,
having two distinct keys with the same fingerprint is highly improbable.
If you did have them, you will be the first person on earth to have
found a collision in either MD5 or SHA-1! This would be world news and
make you famous!!!

> While it is easy to engineer a 32 bits PGP key ID (much much easier for DSS
> keys), it is a lot harder to engineer a 64 bits PGP key ID.  I would venture
> to say that on average, engineering a fingerprint is as hard as breaking the
> hash or breaking the key.

The last is true, but engineering a 64 bit key ID is not that hard (for
RSA). I once did it! It just means changing the last 64 bits of the key
modulus. Then you would need to factor the resulting number (haven't
done that) and calculate the new secret key from it. Factoring the
changed modulus won't be hard on average because it would have more then
two prime dividers.

Thomas
--
AMD K7 Athlon 650 Mhz! <http://www.bigbrotherinside.com/#help>

PGP key: http://x11.dejanews.com/getdoc.xp?AN=453727376
Email: boschloo_at_multiweb_dot_nl
Re: Uniqueness of Key ID
#7889
Author: Martin Harvey
Date: Wed, 08 Sep 1999 00:00
20 lines
1402 bytes
Your Name wrote:
> 
> So, the probability P of having 2 or more ID collisions
> with one million keys is
> 
>         P = 1 - J/(k**m)
> 

Oh darn. I knew there was an easy solution to the product, but I
couldn't for the life of me remember what it was, so ended up doing all
the calculation the hard way.

Where's my formula book gone?!

MH.

--
Martin Harvey.
mch24@harvey27.demon.co.uk
http://www.harvey27.demon.co.uk/mch24/
Re: Uniqueness of Key ID
#7911
Author: Your Name
Date: Thu, 09 Sep 1999 00:00
28 lines
1556 bytes
In article <37D6BB9A.663EB826@harvey27.demon.co.uk>, 
mch24@harvey27.demon.co.uk says...
>
>Your Name wrote:
>> 
>> So, the probability P of having 2 or more ID collisions
>> with one million keys is
>> 
>>         P = 1 - J/(k**m)
>> 
>
>Oh darn. I knew there was an easy solution to the product, but I
>couldn't for the life of me remember what it was, so ended up doing al
>l
>the calculation the hard way.


Hey MH

Are you able to calculate or approximate k! for large k
such as k = 2**32  and  k = 10**6 ?

If so, it will allow me to evaluate  J/k**m  
where  J = k*(k-1)*(k-2)*....*(k-m+1) 

And I am curious.

--Rich Eramian  aka  Your Name
Re: Uniqueness of Key ID
#7922
Author: Your Name
Date: Thu, 09 Sep 1999 00:00
18 lines
1424 bytes
In article <37D6A823.AD38FB7@multiweb.nl>, nospam@multiweb.nl says...
snip
>... engineering a 64 bit key ID is not that hard (fo
>r
>RSA). I once did it! It just means changing the last 64 bits of the ke
>y
>modulus. Then you would need to factor the resulting number (haven't
>done that) and calculate the new secret key from it. Factoring the
>changed modulus won't be hard on average because it would have more th
>en
>two prime dividers.
>
>Thomas

If the key modulus had more than two prime divisors, it
would not work.

--Rich
Re: Uniqueness of Key ID
#7923
Author: Imad R. Faiad
Date: Thu, 09 Sep 1999 00:00
158 lines
7948 bytes
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Greetings,

I am not sure whether you actually read my post before responding to it.

So as not to cloud the issue, here is the meat of what I was discussing in
question and answer form.:-

Q. Does a PGP Key ID need to be unique?
A. No, a PGP Key ID need not be unique.  If you search long enough you will
   find many PGP Keys sharing the same Key ID

Q. Does a PGP Fingerprint need to be unique?
A. No, a PGP Fingerprint need not be unique.  If you search long enough you
   will find many PGP Keys sharing the same Fingerprint.

Q. Does a PGP Key ID / Fingerprint pair need be unique?
A. No, PGP Key ID / Fingerprint pair need not be unique.  If you search long
   enough you will find many PGP Keys sharing the same Key ID and
   Fingerprint.

Q. While doing a search on a key server, I found a PGP key other than mine
   having the same Key ID as my key.  Can the owner of the other key decrypt
  
   my messages or sign messages on my behalf?
A. No, he will not be able to decrypt your messages or sign messages on your
   behalf.  What makes a key unique are all it's components put together.

Q. While doing a search on a key server, I found a PGP key other than mine
   having the same Key ID as my key, I checked it's fingerprint, it was the
   same as my key.  Can the owner of the other key decrypt my messages or
   sign messages on my behalf?
A. No, he will not be able to decrypt your messages or sign messages on your
   behalf.  What makes a key unique are all it's components put together.

Q. What good are PGP Key ID's and Fingerprints for?
A. They are nothing but tags, to assist a PGP user to identify a key.
   
So, bearing in mind the above, in my view whether you can or cannot engineer
a PGP Key ID / PGP Key Fingerprint is inconsequential as far as the security
of a PGP Key is concerned.  This is always true, unless you have broken the
hash or the PK algorithm.

On Wed, 08 Sep 1999 20:17:07 +0200, in alt.security.pgp "Thomas J. Boschloo"
<nospam@multiweb.nl> wrote:

>"Imad R. Faiad" wrote:
>> 
>> It is correct that the Key ID is a 64 bits value, however, the Key ID
need
>> not be unique.  That is you may have 2 keys in your keyring sharing the
same
>> 64 bits Key ID and they will still be distinct keys.  The same applies
for
>
>Not true. In PGP 553i I tried to add two keys with the same 64 bit KeyID
>value, couldn't add it. The 64 bit value is how pgp distinquises two
>keys, not by fingerprint.

Could you please post those keys?  I suspect that the keys must be corrupt. 
This is why you could not add them to your keyring, at times when you try to
add corrupt keys PGP will crash too.

Here is a quote from the draft-ietf-openpgp-formats-06.txt, regarding the
uniqueness of PGP Key ID's and Fingerprints:-

***BEGIN QUOTE***
3.3. Key IDs
   A Key ID is an eight-octet scalar that identifies a key.
   Implementations SHOULD NOT assume that Key IDs are unique.

11.2. Key IDs and Fingerprints
....
   Note that it is possible for there to be collisions of key IDs --
   two different keys with the same key ID. Note that there is a much
   smaller, but still non-zero probability that two different keys have
   the same fingerprint.
***END QUOTE***
>
>> fingerprints.  A PGP fingerprint need not be unique.  Having two keys
with
>> the same Key ID and fingerprint does not necessarily mean that they are
the
>> same key.
>
>Since the fingerprint is a 128 bit MD5 value, or a 160 bit SHA-1 value,
>having two distinct keys with the same fingerprint is highly improbable.
>If you did have them, you will be the first person on earth to have
>found a collision in either MD5 or SHA-1! This would be world news and
>make you famous!!!

I made no such claims, however, your argument has inspired me to give it a
try (please see below).
A hash function maps an arbitrary finite length bit strings to a bit string
of fixed length, say n bits.  The function is a many to one, therefore it is
inherently prone to collisions.  Assuming that the hash function is not
flawed, the larger the bits of the hash, the less the likely hood of a
collision.  Even if I found a collison, I cannot see how this is going to
make me or anyone famous?  We already know that all many to one functions
produce collisions.  On the other hand if you ever manage to break the MD5
or the SHA1 hash, then this will sure be a ticket to fame and fortune. 
Unfortunately I have no such capability, and I have made no such claims.
>
>> While it is easy to engineer a 32 bits PGP key ID (much much easier for
DSS
>> keys), it is a lot harder to engineer a 64 bits PGP key ID.  I would
venture
>> to say that on average, engineering a fingerprint is as hard as breaking
the
>> hash or breaking the key.
>
>The last is true, but engineering a 64 bit key ID is not that hard (for
>RSA). I once did it! It just means changing the last 64 bits of the key
>modulus. Then you would need to factor the resulting number (haven't
>done that) and calculate the new secret key from it. Factoring the
>changed modulus won't be hard on average because it would have more then
>two prime dividers.

Yes it is possible to engineer a 64 bits Key ID.  However, to be honest with
you, in light of what you have stated above, I doubt very much whether you
ever did it.  FYI an RSA modulus n is the product of two primes p and q.  It
follows therefore, that all RSA modulus have two prime factors.  This does
not make them any easier to factor.  Unless of course you have come up with
a very efficient factoring algorithm  That, I very much doubt, unless of
course you will publish such algorithm so that we may ascertain whether it
actually works.

Here is a flawed algorithm for engineering PGP Key fingerprints, which was
inspired by your 64 bits PGP Key ID engineering algorithm:-

- - -----BEGIN 1 = 2 -----
It's not that hard really, all you need to do is hexedit the key and change
the 128 or 160 bits fingerprint.  Then take that fingerprint and reverse
engineer it so as to get all the components used to generate the hash
(haven't done that).
- - -----END 1 = 2 -----

Obviously my claim is flawed, to say the least...

>
>Thomas


Best Regards

Imad R. Faiad
-----BEGIN PGP SIGNATURE-----
Version: 6.0.2ckt http://irfaiad.virtualave.net/
Comment: Assert your right to privacy, use PGP
Comment: KeyID: 0x001FA1AD
Comment: Fingerprint: D09D 1A66 A6C8 4FD6 E414  1E35 C9A0 B17F 001F A1AD

iQA/AwUBN9gxHsmgsX8AH6GtEQKtAwCg00ekcipDtIMQlIdTEEGuQ4TS7mUAn0ML
GDr0/f6RmUlI//MNvMTCIJuY
=Mqgh
-----END PGP SIGNATURE-----
Re: Uniqueness of Key ID
#7940
Author: Thomas J. Boschloo
Date: Fri, 10 Sep 1999 00:00
84 lines
4226 bytes
"Imad R. Faiad" wrote:
> 
> So as not to cloud the issue, here is the meat of what I was discussing in
> question and answer form.:-
> 
> Q. Does a PGP Key ID need to be unique?
> A. No, a PGP Key ID need not be unique.  If you search long enough you will
>    find many PGP Keys sharing the same Key ID

These keys are most likely generated like I generated mine, but even
strong keys could be calculated with enough computing power. Just
calculate a lot of primes and see which multiply with the 64 least
significant bits as the Key ID you want. (2^31 tries?? NSA could do
that!)

> Q. Does a PGP Fingerprint need to be unique?
> A. No, a PGP Fingerprint need not be unique.  If you search long enough you
>    will find many PGP Keys sharing the same Fingerprint.

I don't agree on this. The PGP Fingerprint is not stored in any way
inside the public key packet, it is calculated from it and hashed with a
*strong* hash.

> Q. Does a PGP Key ID / Fingerprint pair need be unique?
> A. No, PGP Key ID / Fingerprint pair need not be unique.  If you search long
>    enough you will find many PGP Keys sharing the same Key ID and
>    Fingerprint.

Even less likely. You would first need to find a key with the same Key
ID and then check if it hashes the same!! (With DH keys it would be as
difficult because the Key ID *is* the last 32/64 bits of the
Fingerprint.)

> Q. While doing a search on a key server, I found a PGP key other than mine
>    having the same Key ID as my key.  Can the owner of the other key decrypt
>    my messages or sign messages on my behalf?
> A. No, he will not be able to decrypt your messages or sign messages on your
>    behalf.  What makes a key unique are all it's components put together.

True.

> Q. While doing a search on a key server, I found a PGP key other than mine
>    having the same Key ID as my key, I checked it's fingerprint, it was the
>    same as my key.  Can the owner of the other key decrypt my messages or
>    sign messages on my behalf?
> A. No, he will not be able to decrypt your messages or sign messages on your
>    behalf.  What makes a key unique are all it's components put together.

Contact that person and become famous for finding the first MD5
collision!

<snip>

> Here is a quote from the draft-ietf-openpgp-formats-06.txt, regarding the
> uniqueness of PGP Key ID's and Fingerprints:-
> 
> ***BEGIN QUOTE***
> 3.3. Key IDs
>    A Key ID is an eight-octet scalar that identifies a key.
>    Implementations SHOULD NOT assume that Key IDs are unique.

Very wise indeed.

> 11.2. Key IDs and Fingerprints
> ....
>    Note that it is possible for there to be collisions of key IDs --
>    two different keys with the same key ID. Note that there is a much
>    smaller, but still non-zero probability that two different keys have
>    the same fingerprint.

That possibility would be about 1 in 2^128 (assuming the MD5 hash is as
strong as it can be, which it isn't). This is indeed non zero, but as
STL137 put it: "The chances are like saying 'may a meteorite smash my
left finger now' and it actually did!". :-))

<snipped a lot>

Well, regards,
Thomas
-- 
AMD K7 Athlon 650 Mhz! <http://www.bigbrotherinside.com/#help>

PGP key: http://x11.dejanews.com/getdoc.xp?AN=453727376
Email: boschloo_at_multiweb_dot_nl
Re: Uniqueness of Key ID
#7941
Author: Anonymous
Date: Fri, 10 Sep 1999 00:00
23 lines
2172 bytes
Thomas J. Boschloo <user@multiweb.nl> wrote:

: These keys are most likely generated like I generated mine, but even
: strong keys could be calculated with enough computing power. Just
: calculate a lot of primes and see which multiply with the 64 least
: significant bits as the Key ID you want. (2^31 tries?? NSA could do
: that!)

Aren't the key ID's based on some kind of hash, like MD5, on the actual 
key?  Surely they are.   There'd be no way to figure out which key 
produced a specific ID short of trying keys till one worked, you'd have 
to try on the average 2**32 keys to find one with a specific ID.  Hash 
functions are designed to be non-reversible even though the hash 
algorithm is know (i.e. from inspecting the source code which is 
available).  You cannot calculate what input data will produce a known 
hash short of exhaustive tries.

Or even if the key ID was the lower 32 bits of p*q, these 32 bits will 
definitely not provide a clue to what p and q are.  If someone took two 
prime numbers less than 100 and multiplied them together, the last two 
digits of this 4-digit number would provide no useful clues as to what 
the prime factors were, short of exhaustively trying different 
combinations of prime factors.
Re: Uniqueness of Key ID
#7942
Author: Thomas J. Boschloo
Date: Fri, 10 Sep 1999 00:00
24 lines
1583 bytes
Your Name wrote:

> If the key modulus had more than two prime divisors, it
> would not work.
> 
> --Rich

Why not?? Won't ed=1[mod (p-1)(q-1)] work for any two factors?

I'm no mathematician, so I can't tell. Perhaps I could try to calculate
the secret component to my 'bogus' key. But I will need to download the
PGP source first, factor the public modulus (which shouldn't be to hard
for my computer) and recompile it with some hardwired p and q. Then I
could check if decryption works.

A bit over my head maybe. You could be right..

Bye,
Thomas
-- 
AMD K7 Athlon 650 Mhz! <http://www.bigbrotherinside.com/#help>

PGP key: http://x11.dejanews.com/getdoc.xp?AN=453727376
Email: boschloo_at_multiweb_dot_nl
Re: Uniqueness of Key ID
#7943
Author: Dmitriy Morozov
Date: Fri, 10 Sep 1999 00:00
31 lines
2069 bytes
> Aren't the key ID's based on some kind of hash, like MD5, on the actual
> key?  Surely they are.   There'd be no way to figure out which key

No they are not it's just 64 last bits of a key (32 bits of which are
displayed).

> produced a specific ID short of trying keys till one worked, you'd have
> to try on the average 2**32 keys to find one with a specific ID.  Hash

That's really not much.

> functions are designed to be non-reversible even though the hash
> algorithm is know (i.e. from inspecting the source code which is
> available).  You cannot calculate what input data will produce a known
> hash short of exhaustive tries.

Plus if you wanted to find just any two key IDs that are the same (as
opposed to a key ID that is the same as a particular key ID) you would need
just 2**32 (well in case of talking about only 32 displayed bits 2**16)
tries.

> Or even if the key ID was the lower 32 bits of p*q, these 32 bits will
> definitely not provide a clue to what p and q are.  If someone took two

That's exactly true. Even p*q (which you are provided with, it's a part of
public key) don't help you much, their lower n bits won't too useful
either....

--
Dmitriy Morozov
foxcub99@mail.ru
An example conflicting Key IDs (Was: Uniqueness of Key ID)
#7948
Author: Thomas J. Boschloo
Date: Fri, 10 Sep 1999 00:00
92 lines
4170 bytes
"Imad R. Faiad" wrote:

> On Wed, 08 Sep 1999 20:17:07 +0200, in alt.security.pgp "Thomas J. Boschloo"
> <nospam@multiweb.nl> wrote:
> 
> >"Imad R. Faiad" wrote:
> >>
> >> It is correct that the Key ID is a 64 bits value, however, the Key ID need
> >> not be unique.  That is you may have 2 keys in your keyring sharing the same
> >> 64 bits Key ID and they will still be distinct keys.  The same applies for
> >
> >Not true. In PGP 553i I tried to add two keys with the same 64 bit KeyID
> >value, couldn't add it. The 64 bit value is how pgp distinquises two
> >keys, not by fingerprint.
> 
> Could you please post those keys?  I suspect that the keys must be corrupt.
> This is why you could not add them to your keyring, at times when you try to
> add corrupt keys PGP will crash too.

This is a key a made with the same Key ID as PZ's key. It will not add
to your keyring:
 
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQA9AzfZq9QAAAEBgN12TtG8T3MWzXxBD4YTGxkZ7H1fxFTK3446FqdjWlPSPDcX
dzSMSbNleYS4x6lm3QAFEbQFQm9ndXM=
=Xc7F
-----END PGP PUBLIC KEY BLOCK-----

But if you (temporarily) delete Phil's key (or the whole keyring), you
can add it like this:

> C:\WINDOWS\Desktop\x>type bogus.txt
> -----BEGIN PGP PUBLIC KEY BLOCK-----
> mQA9AzfZq9QAAAEBgN12TtG8T3MWzXxBD4YTGxkZ7H1fxFTK3446FqdjWlPSPDcX
> dzSMSbNleYS4x6lm3QAFEbQFQm9ndXM=
> =Xc7F
> -----END PGP PUBLIC KEY BLOCK-----
> 
> C:\WINDOWS\Desktop\x>pgp -ka bogus.txt
> Pretty Good Privacy(tm) 2.6.3ia - Public-key encryption for the masses.
> (c) 1990-96 Philip Zimmermann, Phil's Pretty Good Software. 1996-03-04
> International version - not for use in the USA. Does not use RSAREF.
> Current time: 1999/09/10 20:43 GMT
> 
> Looking for new keys...
> pub   384/C7A966DD 1999/09/11  Bogus
> 
> Checking signatures...
> 
> 
> Keyfile contains:
>    1 new key(s)
> 
> One or more of the new keys are not fully certified.
> Do you want to certify any of these keys yourself (y/N)? n
> 
> C:\WINDOWS\Desktop\x>pgp -kvv bogus
> Pretty Good Privacy(tm) 2.6.3ia - Public-key encryption for the masses.
> (c) 1990-96 Philip Zimmermann, Phil's Pretty Good Software. 1996-03-04
> International version - not for use in the USA. Does not use RSAREF.
> Current time: 1999/09/10 20:43 GMT
> 
> Key ring: 'pubring.pgp', looking for user ID "bogus".
> Type Bits/KeyID    Date       User ID
> pub   384/C7A966DD 1999/09/11 Bogus
> 1 matching key found.
> 
> C:\WINDOWS\Desktop\x>

And here is a message encrypted to the 'bogus' key:

-----BEGIN PGP MESSAGE-----
Version: PGPfreeware 5.5.3i for non-commercial use <http://www.pgpi.com>

hQA8A2V5hLjHqWbdAQF+OOQs7UgAeCZTteyYGUb65VQ/4uINJSIedit54W0E9wa4
4cUBIy7uDiTFI5dQzKKPpD55Z4gFAdtAy46E1VRdQ5HTCY3ohXtnFqageU+61or9
lDdcw0J7gB+cKPBmjqfVZ+VovxxEcUCife9lbLZUBg==
=wJdI
-----END PGP MESSAGE-----

It will show up as if it was encrypted to Phil's key, but that is
because of the 64 bit Key ID that is the same. It was really encrypted
to the 'bogus' key (of which I haven't got the secret key, seems like
PITA to calculate that).

Regards,
Thomas
-- 
AMD K7 Athlon 650 Mhz! <http://www.bigbrotherinside.com/#help>

PGP key: http://x11.dejanews.com/getdoc.xp?AN=453727376
Email: boschloo_at_multiweb_dot_nl
Re: Uniqueness of Key ID
#7960
Author: Your Name
Date: Sat, 11 Sep 1999 00:00
28 lines
1715 bytes
In article <4vlC3.71$n82.15074@news.shore.net>, username@shore.net says...

Whoops.  I see a mistake.

e = 4 won't work as an encryption key because
it is not prime to j = 48   So, let e = 5

>It would be much easier to try a test useing small
>numbers.  Let n = p*q*r = 3*5*7 = 105
>
>let encryption key e = 4 
>
>Calculate the decryption key d = the multiplicative
>inverse of e mod j     ed = 1 mod j
>
>Just try all the numbers less than 105 untill you 
>find it.  You won't have to code an algorithm
>
>Then encrypt and decrypt some numbers m
>You could do all the numbers from 2 to 105 
> 
>Calculate k = m**e mod n , and k**d mod n
>then observe if k**d mod n = m
>
>--Rich Eramian aka Your Name 
> 
>
>
Re: Uniqueness of Key ID
#7964
Author: Your Name
Date: Sat, 11 Sep 1999 00:00
52 lines
2508 bytes
In article <37D93FB5.8EB6D92A@multiweb.nl>, user@multiweb.nl says...
>
>Your Name wrote:
>
>> If the key modulus had more than two prime divisors, it
>> would not work.
>> 
>> --Rich
>
>Why not?? Won't ed=1[mod (p-1)(q-1)] work for any two factors?

If the number n created by changeing some bits in a 
PK modulus had three divisors p, q, r

Then you would want e*d = 1 mod (p-1)*(q-1)*(r-1)=j

This might work if p,q,r were distinct primes but 
would not work otherwise because the number of 
positive integers less than n and relativly prime to 
n would not = j which is a necessary condition for
Euler's equation or Fermat's Theorem. 

>I'm no mathematician, so I can't tell. Perhaps I could try to calculat
>e
>the secret component to my 'bogus' key. But I will need to download th
>e
>PGP source first, factor the public modulus (which shouldn't be to har
>d
>for my computer) and recompile it with some hardwired p and q. Then I
>could check if decryption works.
>
>A bit over my head maybe. You could be right..

It would be much easier to try a test useing small
numbers.  Let n = p*q*r = 3*5*7 = 105

let encryption key e = 4 

Calculate the decryption key d = the multiplicative
inverse of e mod j     ed = 1 mod j

Just try all the numbers less than 105 untill you 
find it.  You won't have to code an algorithm

Then encrypt and decrypt some numbers m
You could do all the numbers from 2 to 105 
 
Calculate k = m**e mod n , and k**d mod n
then observe if k**d mod n = m

--Rich Eramian aka Your Name 
 
Re: Uniqueness of Key ID
#8238
Author: Dmitriy Morozov
Date: Tue, 05 Oct 1999 00:00
11 lines
1238 bytes
Greetings, <Stray_Cat@alt.anonymous.messages>! You wrote:

> Anyone can hack into a public key, change the hex ID, then post the
> key to the server.

Hm, interesting idea, I'm curious does PGP [application] check against this
kind of fraud the keys that it has on the key ring?

--
Dmitriy Morozov
foxcub99@mail.ru
Re: Uniqueness of Key ID
#8239
Author: whgiii
Date: Tue, 05 Oct 1999 00:00
50 lines
2316 bytes
In <37fa26d4.16517062@news.ox.ac.uk>, on 10/05/99 
   at 04:29 PM, nicholas.cole@university-college.ox.ac.uk (Nicholas Cole)
said:

>On Thu, 09 Sep 1999 23:44:08 GMT, mayo.n.rikel@anagrams.r.us (Mayo N.
>Rikel) wrote:


>>Try a search for "0xDEADBEEF" on a keyserver:
>>
>>http://pgp5.ai.mit.edu:11371/pks/lookup?op=index&search=0xDEADBEEF
>>
>>Public Key Server -- Index ``0xdeadbeef ''
>>
>>Type bits/keyID    Date       User ID
>>pub  1024/DEADBEEF 1995/09/28 Prime Rib Lovers
>>pub  2048/DEADBEEF 1999/08/03 Imad R. Faiad
>>

>That's interesting:

>when I do that I get two keys belonging to Imad R. Faiad, one RSA and one
>DH/DSS.

>How did that happen?


Actually there are 3 keys:

pub  1024/DEADBEEF 1999/04/28 Imad R. Faiad
pub  1024/DEADBEEF 1995/09/28 Prime Rib Lovers
pub  2048/DEADBEEF 1999/08/03 Imad R. Faiad


The PGP KeyID has never been guaranteed to be unique, only the
fingerprint. When verifying keys one should *always* use the fingerprint,
size, and keyID.

-- 
---------------------------------------------------------------
William H. Geiger III  http://www.openpgp.net
Geiger Consulting    Cooking With Warp 4.0

Author of E-Secure - PGP Front End for MR/2 Ice
PGP & MR/2 the only way for secure e-mail.
OS/2 PGP 5.0 at: http://www.openpgp.net/pgp.html
Talk About PGP on IRC EFNet Channel: #pgp Nick: whgiii

Hi Jeff!! :)
---------------------------------------------------------------
Re: Uniqueness of Key ID
#8244
Author: Dmitriy Morozov
Date: Tue, 05 Oct 1999 00:00
10 lines
1274 bytes
Greetings, <whgiii@NO.openpgp.net.SPAM.PLEASE>! You wrote:
> The PGP KeyID has never been guaranteed to be unique, only the
> fingerprint.

Fingerprint is not guaranteed to be unique, even though the probability that
two figerprints would be unique is much smaller than for two key IDs, it's
still non-zero.
--
Dmitriy Morozov
foxcub99@mail.ru
Re: Uniqueness of Key ID
#8245
Author: Nicholas Cole
Date: Tue, 05 Oct 1999 00:00
23 lines
1457 bytes
On Thu, 09 Sep 1999 23:44:08 GMT, mayo.n.rikel@anagrams.r.us (Mayo N.
Rikel) wrote:


>Try a search for "0xDEADBEEF" on a keyserver:
>
>http://pgp5.ai.mit.edu:11371/pks/lookup?op=index&search=0xDEADBEEF
>
>Public Key Server -- Index ``0xdeadbeef ''
>
>Type bits/keyID    Date       User ID
>pub  1024/DEADBEEF 1995/09/28 Prime Rib Lovers
>pub  2048/DEADBEEF 1999/08/03 Imad R. Faiad
>

That's interesting:

when I do that I get two keys belonging to Imad R. Faiad, one RSA and
one DH/DSS.

How did that happen?

Nick
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads