On Thu, Jun 30, 2005, Peter Waltenberg wrote: > IBM has already done this in creating it's FIPS certified crypto. code > which is layered on top of OpenSSL. > > In our case we can guarantee that IBM code only uses our restricted subset > of the OpenSSL API. > Unfortunately you'll need to support the older API's to support legacy > applications and in won't be possible to ensure that everyone writing new > code restricts themselves to the sanitized API's. >
Well we could provide compilation options which would result in some applications using non-portable constructs producing warnings or errors. For example the problematical: EVP_CIPHER_CTX ctx; will produce a compilation error if the definition of EVP_CIPHER_CTX is not public. Wheareas: EVP_CIPHER_CTX *ctx; will be OK. Legacy applications are a problem because some behaviour doesn't even have an appropriate API at present. For example so set the public key components you currently have to do: rsa->n = n; rsa->e = e; which is a no-no. > If you can live with that then the only problem will be getting the > necessary changes made to provide a clean API. I'm not claiming that'll be > trivial, but we already know it is possible. > Its certainly possible. There is an added complication in that some thought has to be given to future directions of development. For example the current RSA API lacks any easy way to pass additional parameters to some padding types. OAEP and especially PSS really need a way to do that. That could be neatly solved (and some other parts made more efficient) if RSA had a per-thread context structure analagous to EVP_CIPHER_CTX but alas it doesn't. Steve. -- Dr Stephen N. Henson. Email, S/MIME and PGP keys: see homepage OpenSSL project core developer and freelance consultant. Funding needed! Details on homepage. Homepage: http://www.drh-consultancy.demon.co.uk ______________________________________________________________________ OpenSSL Project http://www.openssl.org Development Mailing List openssl-dev@openssl.org Automated List Manager [EMAIL PROTECTED]