Re: Confused by CryptoAPI
- From: "Alun Jones" <alun@xxxxxxxxxxxxx>
- Date: Tue, 23 May 2006 08:06:18 -0700
lelteto wrote:
First of all, the server should not sign the KEY itself. If it does,
ANYBODY (with the public key) would be able to decrypt it and recover
the negotiated secret session key. (I assume RSA where sign/verify is
the same mod-exp operation ans decrypt/encrypt) You should send a
random salt (encrypted by the session key) and get that signed. In
that case if the signature of the salt is OK you know that the server
was able to use the session key (to decrypt the salt).
I think the OP means that the shared secret key is signed by the server, and
then the server sends the signature back to the client. That allows the
client to verify that the server received the key intact, and does not
expose the key. Signing the key involves creating a cryptographic hash
(one-way function) of the key, and then encrypting that hash with the
private key, so any listener can only decrypt to a hash of the key, which
(if the hash function is valid) does not give any information about the key
itself to such an eavesdropper.
"nde_plume@xxxxxxxxxx" wrote:
I have been looking at the CryptoAPI for a while and remain a little
confused as to how it all plugs together. Basically, what I want to
do is:
1. Client asks in clear for a public key from server, and server
sends it
2. Client generates a symmetric key on a client, encrypts it with a
public key and send this to the server.
3. The server decrypts this, and signs the key with the private key,
and sends it back to the client.
4. The client verifies the signature.
5. Now client and server communicate over the symmetric key generated
in 2 above.
What I don't understand is why you don't simply use SSL. SSL will do
essentially the same overall process (use a key at the server to allow
secured communication with a negotiated shared secret key), and has added
protections on top of that. Designing your own cryptography is often the
cause of bad mistakes that lead to decryption of content you believed was
secure. Using something that has been tested by literally millions of
others, and has had significant cryptanalysis performed on it, should be
preferred to trying something new, that nobody has analysed.
Alun.
~~~~
[Please don't email posters, if a Usenet response is appropriate.]
--
Texas Imperial Software | Find us at http://www.wftpd.com or email
23921 57th Ave SE | alun@xxxxxxxxxx
Washington WA 98072-8661 | WFTPD, WFTPD Pro are Windows FTP servers.
Fax/Voice +1(425)807-1787 | Try our NEW client software, WFTPD Explorer.
.
- References:
- Confused by CryptoAPI
- From: nde_plume
- RE: Confused by CryptoAPI
- From: lelteto
- Confused by CryptoAPI
- Prev by Date: Re: AzMan Access Check
- Next by Date: .509 Certificate Policy Issuer Statement Configuration
- Previous by thread: RE: Confused by CryptoAPI
- Next by thread: Registered PKCS#11 drivers
- Index(es):
Relevant Pages
|