Subject | Re: [Firebird-Architect] PKCS and RSA keys |
---|---|
Author | Mark O'Donohue |
Post date | 2005-05-02T00:24:42Z |
Jim Starkey wrote:
and anyone with access to the public key can then verify it.
hash = calcsignature(data, privatekey)
bool result = verifysignature(data, hash, publickey);
no exposure, and no disapointment.
that only the person with the private key can decrypt.
encyptdata = encrypt(data, publickey)
data = decrypt(encryptdata, privatekey)
Again, no exposure, and no disappointment.
to it already, including the guy who has the private key. - so no loss
of security there.
I can see where your coming from, in your world, you are thinking in
terms of a plain RSA keypair, perhaps giving each key to two parties
where neither knows the others related key. But in terms of PKI (Public
Key Infrastructure), and PKCS (Public Key Cryptography Standard) one key
is definately designated *public* (ie everyone has access to it) and the
other key is designated *private* (ie only the recipient knows it's value).
And as long as you don't give the private key to anyone else, everything
else then follows as normal (and secure) PKI operating procedure.
Cheers
Mark
>Yes, and this seems to have been the format since about 1990.
> The key formats from RSA PKCS #1 are:
>
> My point is that the RSAPrivateKey format contains the public key.
> If you want to encrypt with a key you want to keepThis is fairly normal, person owning privatekey calculates a signature
> secret and decrypt with a corresponding public key, you are going to be
> disappointed, at best.
and anyone with access to the public key can then verify it.
hash = calcsignature(data, privatekey)
bool result = verifysignature(data, hash, publickey);
no exposure, and no disapointment.
> At worst, if you assume you can just use theAgain fairly normal, person having the public key encrypts a message
> public key to encrypt and expose the private key to decrypt, you are
> making a very serious mistake.
>
that only the person with the private key can decrypt.
encyptdata = encrypt(data, publickey)
data = decrypt(encryptdata, privatekey)
Again, no exposure, and no disappointment.
> This is completely insecure, because the privateWell, the public key is the *public* key, so everyone already had access
> key format contains all elements of the public key.
>
to it already, including the guy who has the private key. - so no loss
of security there.
I can see where your coming from, in your world, you are thinking in
terms of a plain RSA keypair, perhaps giving each key to two parties
where neither knows the others related key. But in terms of PKI (Public
Key Infrastructure), and PKCS (Public Key Cryptography Standard) one key
is definately designated *public* (ie everyone has access to it) and the
other key is designated *private* (ie only the recipient knows it's value).
And as long as you don't give the private key to anyone else, everything
else then follows as normal (and secure) PKI operating procedure.
Cheers
Mark