Re: The OpenSSL API



On Thu, 16 Aug 2007 11:49:07 -0700, David Schwartz wrote:

On Aug 16, 3:27 am, Harold Weissman <Harold...@xxxxxxxxxxx> wrote:

Can anybody in this forum explain why the API exposed by
OpenSSL
is so complicated?

The short answer is that security is complicated.

I am thinking from the point of view of an application A that wishes to
exchange data securely with some remote application B using SSL. I
would naively thought that an API with four calls would be enough: One
for establishing the secure channel, another for sending data, another
for receiving data, and one for terminating the secure channel.

Perhaps a niche solution that supported only a single application and
security model could be made that simple.

In my view, the application developer only wants to use
security
afforded by the protocol, without having to know anything much (or at
all) about the protocol itself - after all, when doing sockets
programming, one does not have know much about TCP/IP, right? However,
the OpenSSL API forces application developers to do many of the
protocol chores by hand, so to speak.

I'm afraid that painful experience has proven that it is impossible to
produce a secure application without being an expert in computer
security. Even using a library like OpenSSL that tries as hard as it can
to make it easy, there are still so many ways that you can screw it up.
You need someone who has already made all those mistakes.

Since the designers of the OpenSSL are clearly not stupid, I
must
be missing something important here. What is it?

What you are missing is that computer security is so hard that secure
applications require a computer security expert to at least review their
design and guide their implementation.

I could give you a list of examples, but one should be enough. Diebold
screwed up RSA signatures in their voting machines by comparing only
160-bits of the signature since they used a 160-bit hash. (See section
3.5)
http://election.dos.state.fl.us/pdf/SAITbrowningLetter.pdf

Those examples are interesting, but they do not address the
question. First, if I have an application and want for it communicate
securely with a remote partner, I would like to have access to something
as close to a black box to do it for me. As you imply, that might not be
possible; but, between the black box approach and the gory-detail OpenSSL
approach there is a lot of room.

Second, could you point out what applications do not fit the
simple API mentioned above? The idea is, like I said, to send and receive
data securely, but having to deal as little as possible with the
underlying protocol (we don't have to know TCP/IP to send data reliably,
and we don't have to know assembler to program a computer, in general.)
Granted that there are a lot of choices in the SSL realm but, for the
most part, they do not have to do with the SSL protocols themselves.

Third, a more complicated API does not increase security. In
fact, the opposite is likely to be true. E.g., how does the fact that
there are two different interfaces within the OpenSSL API increase its
security?

Fourth, the Diebold example is interesting, because it
illustrates that using OpenSSL would not have prevented it - We are
talking sheer incompetence on Diebold's side. Indeed, this is the kind of
thing that I, as an application developer, would not even want to know
about - the API should do such chores without my intervention, so that I
can't make silly mistakes like that.

Security is difficult, but I remain unconvinced that a humongous,
complex API like OpenSSL's does anything to improve things. In fact, I
believe the opposite is true.








.



Relevant Pages

  • Re: The OpenSSL API
    ... if I have an application and want for it communicate ... between the black box approach and the gory-detail OpenSSL ... There is also no one best kind of security for all applications and users. ... OpenSSL is not the most secure facility, ...
    (comp.os.linux.networking)
  • Re: Windows Is Now More Secure Than Linux
    ... >OpenSSL is compiled into just about every 'secure' application in the Unix ... You know, a lot of people see me as a "Windows defender", mainly because I pop ... The solution, if there is one, to security problems, is to choose a supplier ...
    (comp.security.misc)
  • Re: The OpenSSL API
    ... | OpenSSL forces one to do all too often. ... application does not need to handle its own security contexts, ... such from the API? ... it is a "just right" level of complexity. ...
    (comp.os.linux.networking)
  • Re: Ten least secure programs
    ... it's probably better you leave the topic alone ... I said I do not have security issues with the programs I code. ... I didn't realize you were a Linux user, ... > the most widely used and secure UNIX flavors? ...
    (Security-Basics)
  • "An Asp.Net accident waiting to happen" - Draft article
    ... In a time where Security ... in shared hosting environments. ... technologies that allow the creation and deployment of secure ... IIS 6 web server and windows 2003 also provide some tools to deploy ...
    (microsoft.public.dotnet.framework.aspnet.security)