Re: openssl

1999-02-18 Thread Ulf Möller

Maybe if you want to be really Open, you should also
care about
- Java (world-wide used, almost a defacto standard)

You'd probably better look at Cryptix if you neeed Java.

- Win NT  95 (90% of the OS in the world).

What is your problem with the Windows support?
__
OpenSSL Project http://www.openssl.org
Development Mailing List   [EMAIL PROTECTED]
Automated List Manager   [EMAIL PROTECTED]



Re: Optimal Asymmetric Encryption Padding

1999-02-18 Thread Ulf Möller

 Shouldn't this also get added to private_encrypt?

PKCS #1 doesn't define an OAEP signature mode yet.  You can't
simply use the same function for signing.

There is an algorithm named PSS (which may be patent pending by the
University of Califoria) and other methods, but none is standardized
yet.

  diff -u orig/rsa_enc.c ./rsa_enc.c
  --- orig/rsa_enc.c  Fri Feb  5 22:08:26 1999
  +++ ./rsa_enc.c Fri Feb  5 22:14:20 1999
 
 Errr ... this file no longer exists...

Yup. I didn't check whether the file actually is being used until
after I sent the patch...

 We probably also need to do something about the license. For now,
 though, I've committed my somewhat doctored version...

As far as I'm concerned, do about the license whatever you want. I
don't place any restrictions on how the code is used.

The test vectors are from
http://www.rsa.com/rsalabs/pubs/PKCS/html/pkcs-1.html


Did you intentionally change the ERR_PACK arguments to all upper case?
__
OpenSSL Project http://www.openssl.org
Development Mailing List   [EMAIL PROTECTED]
Automated List Manager   [EMAIL PROTECTED]



RSA_NO_PADDING

1999-02-18 Thread Seidl, Roland A

From: Holger Reif
To:  [EMAIL PROTECTED]
Subject:  rsa_none.c not working...
Date: 1999-02-17 00:07

I guess the purpose of the flag RSA_NO_PADDING is to

Please NOTE:RSA_NO_PADDING is required in the SET protocols!!

Roland SEIDL
Telstra Research
__
OpenSSL Project http://www.openssl.org
Development Mailing List   [EMAIL PROTECTED]
Automated List Manager   [EMAIL PROTECTED]



Re: Alternative Padding in s2_client.c and s2_server.c

1999-02-18 Thread Ulf Möller

What is the purpose of this special padding format? Looking at the
rsa a source it looks like an evil hack anyway.

The 0x03 bytes are used to signal that the SSL v3 is supported.

It might be useful, however, to implement the SSL padding as an option
to the PKCS1 padding function rather than a separate funciton.
__
OpenSSL Project http://www.openssl.org
Development Mailing List   [EMAIL PROTECTED]
Automated List Manager   [EMAIL PROTECTED]



Re: RSA_NO_PADDING

1999-02-18 Thread Richard Levitte - VMS Whacker

RSeidl Please NOTE:RSA_NO_PADDING is required in the SET protocols!!

As well as in some applications that use the crypto routines, like
anything that implements SSH.

-- 
Richard Levitte   \ Spannvägen 38, II \ [EMAIL PROTECTED]
Vice Chairman and  \ S-161 43  BROMMA  \ T: +46-8-26 52 47
Redakteur @ Stacken \  SWEDEN   \ or +46-708-26 53 44
Procurator Odiosus Ex Infernis -- [EMAIL PROTECTED]

Unsolicited commercial email is subject to an archival fee of $400.
See http://www.stacken.kth.se/~levitte/mail/ for more info.
__
OpenSSL Project http://www.openssl.org
Development Mailing List   [EMAIL PROTECTED]
Automated List Manager   [EMAIL PROTECTED]



Re: New EVP, first helping

1999-02-18 Thread Dr Stephen Henson

I'm not clear on a number of points. I think the easiest way to
handle this is to give some of the requirements of the EVP interface
(not all of which work properly at present) and you can see if that fits
in with your proposal.

Heres the first requirement...

The symmetric cipher code must have some cipher independency in fact it
should have a lot. The reason for this is so the EVP_Seal/EVP_Open stuff
can work properly. It doesn't currently work properly and can't work
properly under the current system which is one reason the EVP interface
needs an overhaul.

EVP_Open will typically decrypt an RSA block using a private key. Its
output will be a key and a key length. The key length is the current
sticking point.

The actual cipher to use will be determined by other means. One such
method is via an ASN.1 AlgorithmIdentifier defined as follows:

   AlgorithmIdentifier  ::=  SEQUENCE  {
algorithm   OBJECT IDENTIFIER,
parameters  ANY DEFINED BY algorithm OPTIONAL  }

The "algorithm" object defines the cipher type and the "parameters"
define any cipher specific info.

The "algorithm" object is the NID part of the cipher. In the examples
I'm aware of there is only one NID per cipher type. That is there is
only one RC2 and RC4 object. This immediately shows how the current code
is broken.

So what you have is this: a key, a key length, a NID giving the cipher
type and some ASN.1 parameters which give cipher specific info.

Now in the cases of some ciphers like DES-CBC and 3DES-CBC the
'parameters' only contain the IV. In the case of RC4 it doesn't contain
anything at all. In the case of RC2 it contains an indication of the
effective key length and the IV.

For ciphers with a fixed key length (DES, 3DES) if the key length is
anything other than that fixed value it is an error. 

For variable key length ciphers this determines the actual key length,
for example RC2, RC4: this is not handled at present. In fact it can't
be handled at present because the current EVP stuff only provides a
small number of ciphers with fixed key lengths: if your key length isn't
one of the list your are out of luck.

Now what you should be able to do is have an interface where EVP_Open
contains no symmetric cipher specific code (it doesn't at present but it
doesn't work properly either).

The reverse side of things is that you should be able to generate
this ASN.1 stuff. EVP_Seal shouldn't have any cipher specific code
either but the user will obviously need to call some cipher specific
code with the relevant parameters and get the ASN.1 stuff out.

This is all much easier if you do allow EVP_Open to contain cipher
specific code.

However if you don't have EVP_Open contain cipher specific code then you
get some algorithm independency.

Suppose someone writes a brand new cipher, this cipher might be
implemented in hardware for example.

If the EVP_Open/EVP_Seal interface works properly this wont matter. As
soon as the new algorithm is added it will automatically be supported:
it would register a NID and contain some ASN.1 code. 

What EVP_Open should be able to do is look up the new cipher by its NID
and then use its various functions to decode the ASN.1 stuff and set the
key and key length. It should then be able to give an error or a
properly initialised cipher context structure.

Now *every* cipher doesn't need to fit in this model, some might not
want anything to do with this ASN.1 stuff some might not have any ASN1
stuff registered.

How this fits in with PKCS#11 is a bit more ambiguous. 

It can be handled directly where the key and key length come from
EVP_Open and the other object attributes come from the NID and algorithm
identifier: you'd need an "ASN.1 wrapper" round a PKCS#11 algorithm for
this to work. You'd typically decrypt the key block and then build up a
PKCS#11 object with all the bits.

Alternatively you could have a PKCS#11 mechanism partially override the
EVP_Open interface and call C_Unwrap. This has the advantage that the
unwrapped key never leaves the PKCS#11 library and is never directly
visible to the user, or more importantly an attacker. EVP_Seal could be
handled similarly.

Steve.
-- 
Dr Stephen N. Henson. UK based freelance Cryptographic Consultant. 
For info see homepage at http://www.drh-consultancy.demon.co.uk/
Email: [EMAIL PROTECTED]
NOTE NEW (13/12/98) PGP key: via homepage.

__
OpenSSL Project http://www.openssl.org
Development Mailing List   [EMAIL PROTECTED]
Automated List Manager   [EMAIL PROTECTED]



Re: Optimal Asymmetric Encryption Padding

1999-02-18 Thread Ben Laurie

Ulf Möller wrote:
 
  Shouldn't this also get added to private_encrypt?
 
 PKCS #1 doesn't define an OAEP signature mode yet.  You can't
 simply use the same function for signing.

OK.

 The test vectors are from
 http://www.rsa.com/rsalabs/pubs/PKCS/html/pkcs-1.html
 
 Did you intentionally change the ERR_PACK arguments to all upper case?

That's a function of the way the error-generating scripts work! I can
fix some (they require the non-prototyped function declarations. Grr).
The static functions can't be fixed without major surgery...

Fix on its way...

Cheers,

Ben.

--
http://www.apache-ssl.org/ben.html

"My grandfather once told me that there are two kinds of people: those
who work and those who take the credit. He told me to try to be in the
first group; there was less competition there."
 - Indira Gandhi
__
OpenSSL Project http://www.openssl.org
Development Mailing List   [EMAIL PROTECTED]
Automated List Manager   [EMAIL PROTECTED]