--
You received this message because you are subscribed to the Google Groups "tunnelblick-discuss" group.
To post to this group, send email to tunnelbli...@googlegroups.com.
To unsubscribe from this group, send email to tunnelblick-dis...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/tunnelblick-discuss?hl=en.
Just to clarify this and for the entertainment of the list subscribers
- I think Daniel might get bored :-) - the use of csr (certificate
signing requests) is to keep the key of the user private.
CSRs work the following way:
1. The user (client) generates a key & and a csr on his machine. The
key should be stored in a safe place, and there will be no necessity
anymore to transfer the key between machines. This is the ideal
configuration one can reach.
2. The user sends the csr via any channel, even my email, to the
authority (ca or similar).
3. The CA signs the csr, this means, it creates a certificate out of
it using its private key.
4. The CA cert will have to be transmitted somewhen now. This can
happen, as for all certs, via insecure channels.
5. The CA sends back also the Cert newly created for the client (user).
6. Now the client has a key and a cert (for use with the asymmetric
en/decryption) and noone came in contact with its key.
The same procedure usually happens for the server (which is distinct
from a CA); ideally the CA is a non-networked machine to prevent any
attacks except physical ones.
So now:
- The server has a key, generated by random, and can publish a cert,
wich is generated out of the server's csr using the CA's key. The
server also has access (as anybody has) to the CA's cert.
- The client has a key, generated by random, and can publish a cert,
... and so on (same as for the server).
Now, for the following, I'm not completely sure, I'm just using
logical reasoning.
Any instance can check if any cert is signed by the CA. For this only
the CA's cert is necessary (otherwise it wouldn't make sense).
When the client connects to the server, it's transmitting its cert,
and the server will check if this is signed by CA or not. If it is
so, it'll accept the connection, and I guess he's sending back the
server's cert. Note that certs are always public, so it might send
the cert back also without restriction, I guess it wouldn't matter
much.
Guess the client is checking the same regarding the server's cert
using his own copy of the CA's cert.
Now as the server trusts the client, it'll start sending encrypted
data and will start to decrypt data from the client. Now it's merely
a matter of choice IMO if one uses the cert for crypting and the key
for decrypting or vice versa, but I strongly guess, it's more
important to not be able to listen to the communication, so the key
will be used for deciphering and the cert for enciphering. Thus
anybody might send data into the channel, using the certs exchanged,
but the intruder doesn't possess the key, so he can't decrypt
anything. That's the reason why the key is of such prime importance
and should not be even transmitted between different machines.
Same happens of course for the client. He'll use the server's cert to
send data to the server, data which he cannot even encrypt himself
:-), and will use its key to decrypt the data sent by the server.
I will not go into details of my understanding of establishing trust,
that's a matter of CA, and who's reading the technical explanation on
MS Windows 7 Updates, will have noticed, that recently (according to
the message), there was an update to the cert db in Windows because
some CA-delegate has signed some certificates which better would not
have been signed ...
So now, this was a nice exercise to think it through once more. Hope
you enjoyed (or: could enjoy it :-)
Correct me if there is any wrong in the section lead in by "For the
following I'm not completely sure". For the section how the procedure
is I am sure, because I did it several times. But I'm not an expert
on the algorithms used to implement PKIs (public key infrastructures).
> But they may not be implemented
> on OS X -- I really know very little about it.
openssl, afaict, came bundled with my OS X 10.6. At least when I
needed it, let it be before or after installing Tunnelblick, $openssl
opened a nice and shiny ``OpenSSL> `` prompt. openssl (or any
equivalent) is anything needed for doing the csr/crt/key stuff. There
goes some work into designing the openssl.cnf, though. There is some
"easyrsa" around coming with openvpn, but I regard this not as useful
as it seems. It prevents the user from understanding what he's doing.
cul,
Friedrich
2011/5/19 jkbull...gmail.com <jkbu...@gmail.com>:
openssl, afaict, came bundled with my OS X 10.6. At least when I
needed it, let it be before or after installing Tunnelblick, $openssl
opened a nice and shiny ``OpenSSL> `` prompt. openssl (or any
equivalent) is anything needed for doing the csr/crt/key stuff
No, AISI, certs are always meant to be public. You can transmit them
via any channel, including insecure ones like email. AFAIK, there's
no more use to a cert alone than verifying another cert if that other
cert has been signed by the first cert we're checking against (aside
of using it for communication). For signing of course you need the
key (this follows for me because of pure logic, since otherwise
anybody could sign). I don't see from the openssl commands how the ca
key goes in, since it's not mentioned on e.g. this line:
> ca -days 3650 -out "VPN-Server.crt" -in "VPN-Server.csr" -extensions server -config openssl.cnf
But from my local openssl.cnf I see that the CA section refers to the
private_key. So that's the point where the ca key goes in. You see,
you have to dive a bit to understand what's going on.
In fact, if you're going to build up a PKI, you'll have to transmit
the ca's cert to your clients (by some means), so that they're able to
verify the cert promoted by the server of the vpn they're connecting
to. Since communication can only happen when the server has the key
too, the communication channel is called secured by this. (The
verification happens mutually.) Otherwise, without verification, the
server could be any internet host. In fact, anybody could use the
cert of your server to promote it on connection, but he'll be unable
to take fully part in the communication (AFAIR, the certs are used for
enciphering and the keys for deciphering). A signed cert just say's
"the owner of this cert has a key we allow to take part in
communication". "The owner" is defined by the fact that this thing or
person has the key. Since you never publish keys (that's the purpose
of creating them on the machines where we need them), we can secure
the channel by verification of certs, although anybody can propose the
certs. But only the owners have the key too.
So far to that, I hope I'm not boring you all.
So in summary, just publish the ca's key to your clients. But the
transmission is a crucial thing, since if it is modified, it could be
exchanged by a cert of another company. To my needs, I've been using
phone-verified instantaeous emails, or physical tranmission by an
administration (which is me). But my network is really tiny. Just
keep in mind that the clients will establish trust to your VPN
server's cert through the ca cert *only*. At some point we have to
establish trust without a secured channel active, so we have to use
some other definition of "secure" before the vpn is up. Using two
channels simultaneously (email and phone, email & skype, etc.) in
general secures the transmission better.
One more note, just for completeness: It's of course self-understood
that the CA and the VPN server are distinct entities. If you want to
be very secure, the CA is (as you probably are doing) a non-networked
machine.
And finally, unless you want to establish sub-CAs, make sure the
cert/key pairs you create by signing the csr are not suitable for
sub-signing other certs. I've never worked with sub-CAs so far, but
AISI, the certs signed by the sub-CA will be automatically signed by
you too (since you shared the power). I.e., users can enable other
machines to connect to your vpn server. But here, I'm close to the
border of my solid ground, and maybe already beyond. It's to be
understood as a pure warning.
One of the things I don't like about easy-rsa is that it's, to my
understanding, way to easy to just issue the commands and not
understanding what's happening and why it's working. (And why it's
done this way.)
For the OS X thingy, you might want to use .tblk directories, they're
easier to handle from the user's perspective.
Correct me if I'm wrong.
So far, hth,
Friedrich
I will prepare a script good for users of all Unix
flavors and they may pick it or read openssl manual if they want :)