From: Brian Candler Date: 2002-11-06T08:49:36+09:00 Subject: Re: XML::RPC encryption On Wed, Nov 06, 2002 at 07:05:07AM +0900, Michael Neumann wrote: > > I'm thinking of a > > simple public/private key mechanism using openssl, where the server > > stores a list of public keys - one per authorized IP address. Clients > > would then pass their key as the first argument to any method call so > > that the server could authenticate them. Messages passed back and forth > > would be encrypted. > > Is this really secure? The clients' public keys are public, so how do > you authenticate them? Sounds like what you really want is certificates. Each client has a private key, and presents its certificate on connecting to the server. On the server you either keep the public key of the CA which signed the certificates, or allow the clients to present self-signed certificates (in which case you keep one certificate for each client, or just the fingerprints of those certificates). Either way, you have proved that the client has a trusted private key, without actually sending it over the wire. All that's standard TLS functionality from openssl, and is likely to be much more secure than rolling your own crypto authentication mechanism.