What Modifications to OpenSSL? Where can I get them?

You can download them right here:
openssl-0.9.7g-xpgp-0.1c.tgz - This contains the patch applied to openssl-0.9.7g ( Recommended version)

If you'd prefer patches:
(1) new files to add: openssl-0.9.7g-xpgp-0.1c-newfiles.tgz

and (2) the patchfile (diff -u): openssl-0.9.7g-xpgp-0.1c.patch

To Build


tar -xvzf openssl-0.9.7g-xpgp-0.1c.tgz

cd ./openssl-0.9.7g-xpgp-0.1c

./Configure

make depend

make

Notes on the Patch!

Notes on the Patch:
(1) Implements a simple Web of Trust certificate.

(2) Created SSL_method to allow TLS1/SSL connections with these new certificates. This required changing the certificate pointers inside ./ssl/ into a union which allows alternative certificate types.

(3) Implemented a very basic Web-of-trust Authenticator. This is fully functioning, but still not complete. In particular, the memory management is incorrect. and causes the xpgp version of the ssltest to fail with a memory leak.

How is OpenSSL used in the Program?

OpenSSL provides a secure communication layer, allowing approved clients to connnect and share using RetroShare. It allows one to identify your friends, and authenticate their identities through the use of certifiicates. These are digitially signed by a trusted person, or certificate authority.


OpenSSL uses the certificates to create a secure communication channel. An individual secure channel is created between yourself and each person you decide to share with.


In short, openssl ensures the "private" part of the filesharing network. Allowing the user to decide exactly who they share with, and encrypting any communication between peers.

Why are modifications required to OpenSSL?

Unfortunately OpenSSL only provides a hierarchical certificate system (X509 certificates). These are what are used commerically throughout the internet. You use them every time you perform any online banking or shopping. This system uses a hierarchy or (upside-down) tree to authenticate your peer. In other words your bank's certificate is signed by a certificate authority (CA). (Some random company out there, which you are expected to trust). And all authentication is derived from a master certificate. And your computer (or Web Browser) will implicitly trust that any certificate that is signed (directly or indirectly) by this master authority.


This is all very well for the commercial world, where a heirarchy has already been established for this exact purpose. It doesn't however fit very well with the real world. Here every individual person has a different set of friends, some more trustworthy than others. Wouldn't it be better if each person could be "introduced" by someone that you know and trust, and not some "Master Authority" that no-one really understands.


This concept is called a "Web of Trust", and has already been introduced by the PGP and OpenPGP, and is already successfully used by millions of people the world over to provide security for their email.


What is a Web of Trust?

A good description of a "Web of Trust" Authentication system is given by GnuTLS Decription of The OpenPGP Trust Model. More information is available at: http://www.openpgp.org/ , with the details of how OpenPGP should be implemented described in rfc2440.txt. The system relys on the RSA Public/Private Key pairs. Each person has a Certificate which contains a Public Key and their Name. This key allows anyone to send the certificate owner (the person with the corresponding private key) and encrypted message. The real problem is... how do I know that this Certificate that says its from Joe Bloggs, is actually from Joe Bloggs? It could just as easily been created by an Evil Kenevil.


Each certificate is signed by any number of people. These people are convinced that the certificate is owned by the named person. By signing the certificate they are helping you identify the person. If enough people (that you trust) sign a certificate, then the certificate is considered to be "authenticated".


The plan is to implement a "Web of Trust" style of authentication for RetroShare. This allows everyone complete control over who is allowed to connect to your computer. And each person can choose the people that they trust to sign certificates. This however, requires some significant modification to OpenSSL. As currently is doesn't support a suitable type of certificate or this style of authentication.

Why Use OpenSSL, if is doesn't provide Web of Trust style Authentication?

Actually I haven't found a single open source secure socket program which fully implements a Web of Trust Authentication system. They are some packages that claim too, but its not quite true.


OpenSSL provides an impressive set of security related utilities and functions, and it is the best kind of open-source. Really free. Free as in a bird, as well as speech and beer, with a much more liberal licence than the GPL.


OpenSSL therefore provides the perfect foundations to contruct this new authentication system.

How far has the development got?

The first implementation is complete, and working well within retroshare. A minial web of trust system has been designed and implemented:

2048 Bit RSA Keys for extra security.

Trusted signers and groups provide authentication for the masses.

Designed/implemented over UDP sockets for pure firewall busting goodness.



To implement this inside OpenSSL, the certificate needed to be modular. This required a union to be added which allows the new xPGP certificates to be exchanged instead of the standard x509 certificates.

Which Version of OpenSSL are you developing and why?

I'm working on OpenSSL.0.9.7g. This was used as it was the current stable version, at the point when I started this work. Once the basic development is complete ( and I have the time ). The work will be ported to both the head of the stable branch, and the development branch.

Actually my friend Kyle, helped me out and ported the changes to 0.9.8(?) but I haven't had time to test them out. Will probably start further development on this branch.