Software Design Document for an MDAS/NPACI/DOCT Authentication/Privacy Mechanism

Chaitanya Baru, Markus Jakobsson, Wayne Schroeder

Introduction

This document, combined with the Authentication Mechanisms paper, describes an Authentication/Privacy software system under development by SDSC/UCSD for MDAS/DOCT. This describes general requirements, and options and choices that have been made, and provides a general description of the software. The "Authentication Mechanisms" paper provides an intellectual framework for the project. A third paper, The SDSC Encryption/Authentication System (SEAS) describes the completed system in more detail.

Requirements

The following outlines the requirements of the software:

This system is intended to operate at the communications level. That is, it will provide encryption and authentication between two running computer programs that are communicating via TCP/IP sockets.

It should be noted that the SRB will have access to data stored in various storage systems (HPSS, UniTree, Unix, FTP, DB2, Illustra) as user 'SRB', not as any other user. That is, the SRB will not need to "forward authentication" or "su" to another user. It will act as a data gateway but not as an authentication gateway. If the storage system allows access to a particular file to user 'SRB' _and_ the MDAS ACL allows access for the user communicating to the SRB, then the SRB will provide the access. Thus the user must securely authenticate to the SRB, the SRB much securely access its ACL data, and access to the SRB login account must be controlled and restricted.

Component Choices

Although there are a number of higher-level software systems that meet some of these requirements, nothing exists that provides all the needed features/characteristics. Kerberos, PGP, SSH, and SSL each cover some of the requirements, but not all.

All of these higher-level systems utilize common lower-level components to implement their functions. These are the various standard encryption/signature/hash algorithms such as RSA, DES, Triple-DES, IDEA, MD5, RC5, etc.

To achieve what we need, we'll need to use existing software components and combine them, and write some software that uses them. The question is whether we should use components at the Kerberos/SSL level, or the lower-level building blocks such as RSA, RC5.

Kerberos provides user authentication and secure application-to-application communications, but does not have the Batch or Introduction features. Also, it is not easily deployable, especially to a large number hosts for people applying for patents (it is designed for use within a trusted realm). It is fairly large and difficult to work with and it would be difficult to add Kerberos encryption to many applications within the time constraints.

Similarly, SSL can encrypt socket communications but does not readily handle user authentication. (SSL (much like SSH) uses RSA to distribute session keys (for socket sessions)). The SSL protocol appears to provide for user authentication, but it is an external function, and is not part of the Netscape SSL 3.0 reference source. SSL has the following primary drawbacks:

Similarly, SSH and PGP, utilize encryption algorithms to provide services, but do not cover all the features we need.

While it may be possible to use SSL or other higher-level systems as part of this solution, the trade-offs are not favorable. They would would add significantly more complexity, while contributing only lesser degrees of functionality.

The GSSAPI (Generic Security Service API) is another possibility. The Globus team is doing some interesting work with GSSAPI and SPKM (Simple Public-Key GSS-API Mechanism). Both of these though are are fairly complex, provide more than we need, and would likely be quite difficult to work with. As is frequently the case, it is likely that we would have to port the software ourselves to the Crays, and that would be difficult (for a C90-type machine).

The purpose of implementing GSSAPI would be to make it easier to applications to interface to it. But since we are currently interested in only one, or a few, applications (primarily the SRB), there is little need to conform to an industry standard. In fact, the simple interface we envision will be easy to add to the SRB and much easier to implement than GSSAPI.

Over time, we may wish to migrate toward the GSSAPI, perhaps building on the work Globus is doing. But this would be a multi-year goal.

Case Larsen and William Johnston of LBNL have done some interesting work using SSH (the SSH-agent) to produce pluggable backends to GSSAPI incorporating SPKM. (The Globus team will be using some of this software as a foundation.) This, however, is partially written in C++ and would need to be ported to the Cray. Since GSSAPI is not a key requirement for us at this time, we are probably better off using other software, for now.

RSA Data Security, Inc. offers a BSAFE 3.0 package that includes DES, Triple DES, DESX, RC2, RC4, and RC5. However, it is unlikely that they support the Cray architecture and we already have ported a RC5 implementation to the Cray.

So we believe that the most effective approach will be to work with existing software components at the encryption level, at least for most of the functionality. We will develop software layers on top of these to provide the needed authentication and encryption infrastructure. The level of effort to develop this software is reasonable, and we expect that this approach is best alternative for enabling significant progress over the coming months.

Design

Encryption Library API

For the initial implementation, we're using RC5 for symetric key encryption and RSAREF 2.0 for the public/private key encryption.

SEA Library Encryption API

These routines are designed to be easily added to the SRB and other software packages. Layered on the encryption routines, these routines provide two functions: encryption of socket connections and authentication of users on those sockets.

We had considered slightly different API, but the current design is as follows:

The routines are currently called the 'sea' library, for SDSC Encryption and Authentication. These two routines establish an encrypted session on a TCP/IP socket:

The fd is a socket connecting a client and server. The client calls seaBeginEncryptionClient and the server calls seaBeginEncryptionServer. The routines perform a handshake, using RSA to exchange a random session key to begin encrypting data on the link.

These two routines are called instead of write and read to send and receive encrypted data on a socket:

The application can establish encryption at any point in the session. Both sides just need to know to call the seaBeginEncryption routine at the same time. Once encryption is established, the application calls seaRead and seaWrite just like read and write to exchange information that is encrypted. If data does not need to be encrypted, the application can use read and write instead of seaRead and seaWrite, even after encryption is established on the socket. Multiple sockets can be encrypted via multiple calls to seaBeginEncryptionServer/Client.

Normally, authentication (described below) will be performed on encrypted sockets but this is not necessary. The authentication exchange uses RSA to securely identify users without exchanging any plain-text passwords. However, first encrypting and then authenticating is the preferred method, as it does provide a little more security. Control information to the SRB should be encrypted.

seaWrite and seaRead will transfer data without encryption if the seaBeginEncryption{} routines have not been called. We may also add a seaEndEncryption routine at some point.

SEA Library Authentication API

There are multiple distinct authentication environments.

In the DOCT environment, we may wish to allow users to introduce themselves to the system and from then on it is sufficient that the system knows that the same person is communicating with the system (ie, they have the private key).

For the DOCT environment, we can simply have the software generate public/private keys, and send the public key to the key manager (see below). In effect, saying "here's my public key, from now on you can identify me with it".

In the NPACI/SDSC environment, a userid can have a higher level of trust if the SEA authentication system confirms that the user is actually running on one of our trusted hosts. Like passwordless access to HPSS from the C90, the MDAS system just needs to confirm that the user is logged onto the C90 as a particular user to acquire the access privileges of that user. So for the introduction function (when initial user public/private keys are established), the system has to confirm that the user is actually logged in on a trusted host (eg the c90) and running as that user. Once that is done, users can be confident that a user registered as user@SDSC actually is that SDSC user.

The planned solution is to run an agent on the trusted hosts. This agent would identify itself to the key manager via our normal public/private key mechanism (ie as some trusted object, eg "c90-agent"). The introduction utility will create the public/private key and tell this agent to access the public key in a publicly accessible file under the user's home directory. The agent will access this file, confirming that the file is owned by the user and is in the user's home directory, and with then pass the information on to the the key manager. Once this is complete, the introduction utility can remove the public key file.

In this case, the user will not be allowed to chose an SRB username. Instead, the SRB username will be the user's username on the host followed by the domainname, eg "schroede@SDSC".

These two routines are called to authenticate a user:

There are also two support funtions: See the "User private key files" section below for a related description.

Trust Models

For an initial "introduction", a SEA utility generates a pair of RSA keys, stores the private key locally (encrypted), and sends the public key to the key manager to be recorded for future use. Once this is done, the user can authenticate to the programs using SEA (the SEA library accesses these keys to securely authenticate).

The SEA system provides for three "Trust Models" for the initial introduction.

Higher-level functions

A set of utilities and deamons will be needed to provide the key generation and management: Originally, we were considering PGP or ssh-keygen for the first utility. However, PGP would have to be ported to the Cray, and we found that converting between PGP's or SSH's key file format to RSAREF's to be fairly involved. So instead, we have developed our own utility to generate and store keys.

Key Management

The user public keys have to be available to the authentication library on the Server side. These, being public keys, are not particularly confidential, but updates need to be controlled.

We were considering two two implementations for key storage, one using the local Unix file system and one using the MDAS catalog (database). We decided that the former is all that is needed. Storing keys into the MDAS catalog would have some advantages but would be somewhat less secure.

The Key manager process will respond to requests to store new keys by first checking that the user does not already have a key. If not, the key is accepted and stored.

The SEA library will access the public key files directly, although eventually we may want this to go thru the key manager.

User private key files

User private key files have to be available to the authentication library on the Client side. For batch jobs, they can not be encrypted in a way such that passwords are needed to use them.

Currently, we plan to store user-password-encrypted private keys in the users' home directories (eg NFS mounted), and unencrypted private keys in a local file system (so they won't cross a network). Users will be able to create unencrypted private keys from their encrypted private keys. These can be used for batch jobs of interactive sessions (ie the library will be able to automatically authenticate them). The "unencrypted" private keys will actually be encrypted but only in a "semi-secure" manner. The SEA routines will encrypt and decrypt the user private key data as it is being written and read from the private key files. This algorithm will take constant information (such as UID and host), generate a key (via MD5), and use this key to encrypt. This will provide a little additional security, but only because the algorithm is not widely known.

We will make the private key storage location a configurable option. On the C90, for example, the home directories would be fine for the unencrypted private keys as they are not NFS mounted. On SDSC workstations, storing these keys in /tmp in an option, since that file system is local.

Server Identification

For the SRB, there is little need to confirm that an client is actually talking to the SDSC SRB. If they are not, they will not be able to access data.

For the USPTO, however, one does need to confirm that the client is indeed talking to the USPTO before divulging sensitive patent or trademark information. This can be accomplished via RSA, but a public key for the USPTO will have to be available from a trusted source. Then, library routines could confirm the identity of the USPTO by encrypting a random string with the public key, sending it to the server, and getting a decrypted response back. The server can only accomplish this if it has access to the USPTO private key.

This will not be implemented, at least initially.

SRB User Access Control

Once a user is identified, access will be controlled to data via that id. Access Control Lists will be maintained in the MDAS catalog specifying who has what type of access to each particular dataset.

Portions of this have been developed but substantial additional development is required. This will largely be developed by Raja, with assistance from Wayne.

MDAS Web Interface

Unfortunately, since Java can not access local files, we can not implement our authentication mechanism in Java Script for use with our web interface to the MDAS catalog.

Alternatively, we can use passwords. For demo purposes, we can send these passwords unencrypted but soon we'll need to encrypt them. Two alternatives exist:

1) Run a secure version Netscape/WWW server (with SSL). These perform automatic socket-level encryption by generating a random key and exchanging it via RSA (as is commonly done). I'm not sure if these can be supported in SDSC's environment, but possibly.

2) Develop Java Script code and CGI scripts to transfer the user password via RSA. The server-side CGI scripts to send a public key and the Java Script software could take the users password input and encrypt it via the public key, and send it. Implementations of this may already exist that we could use.

Demo

We need to develop an SRB authentication demo for DOCT by mid-September. Goals may include: This may not be a particularly exciting demo, but if we can pull it off I think it will demonstrate considerable capability.

Licensing Restrictions

Even without using PGP, the use of RSA and RC5 may eventually require some attention to licensing. However, the use of RSA by U.S. Universities for non-commercial purposes is allowed without a direct license from the patent holder (RSA Data Security). As we move into a more production mode, this may require more attention.

SRB to SRB authentication

The SRB to SRB authentication could be implemented by using the User to SRB authentication capabilities using the "SRB" objectname. This is very similar to user authentication, but the application can specify the name by which it is authenticating. A second (or later) SRB in a chain of SRBs (for a particular connection) could trust the information passed to it when that connection has been identified as from object "SRB". The user would need to authenticate to the first SRB, and the second SRB would know that the user has authenticated. Details for this implementation need to be examined.

Other web pages of interest

RSA
Kerberos Users' Frequently Asked Questions
International PGP Home Page
SSH Home Page
SSH at SDSC
International Cryptography Pages

Other important sources

We are using sample source code from "Applied Cryptography" by Bruce Schneier, via associated diskettes.