Thanks again for the detail explanation, Viktor.
We use OpenSSL only between our client and server, both use OpenSSL,
therefore interoperability with other SSL entity is not a concern.
Is there a 'sha2' flag for 'req' command so we can use SHA-2 as the
hash function?
In your previous response, you mentioned something about
====
If you enable "all" algorithms rather than "all ssl" algorithms, you
will be able to verify certificates signed with SHA-2 with the current
OpenSSL release but the SSL cipher-suite will still use a SHA-1 HMAC.
===
Does this means SHA-2 is only used in certificate verification, but
not in any other crypto suite used
for traffic?
And do we 'enable' the "all" algorithm? Any man page for more
information?
Thanks.
Alex
On May 8, 2009, at 11:40 AM, Victor Duchovni wrote:
On Fri, May 08, 2009 at 10:11:22AM -0700, Alex Chen wrote:
Thanks for the information, Viktor. I am not familiar with the
algorithms
used in SSL, but if I understand correctly, SHA-1/SHA-2 is only a
hash
function, right?
SHA-1 and the 3 members of the SHA-2 family are hash functions, they
are
building blocks for higher-level algorithms, HMAC, private key
signature
and public key verification of message digests, ...
In OpenSSL source code, I see references of SHA-256, SHA-512, etc.
that
belong to SHA-2 suites. If OpenSSL only supports SHA-1 HMAC,
where and how does the code get used?
The OpenSSL toolkit can use any of the digests it supports in any
context
where the standards support a variable digest algorithm with a
digest of
the indicated type.
In the context of SSL cipher-suites, SHA-2 is not an option for
message
integrity with SSLv2, SSLv3, TLS 1.0 and TLS 1.1. OpenSSL does not yet
implement TLS 1.2. In the context of X.509 certificates, SHA-2 support
can be enabled, but this is not inter-operable with most fielded
systems
that have no such support or have not enabled it.
I look at one of our self-signed certificate (.pem) file with the
following
entries:
Certificate:
Data:
Version: 3 (0x2)
Serial Number: 2 (0x2)
Signature Algorithm: md5WithRSAEncryption
It appears that this certificate was generated with MD5 hash
instead of SHA
hash, correct? How do we set the hash function to SHA instead of
MD5?
The man pages for req(1) and x509(1) cover this. Also, "sha1" is the
default
with OpenSSL 0.9.8 and later (0.9.7 and earlier default to md5). The
"-sha1",
"-md5", options are what you are looking for.
--
Viktor.
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openssl-users@openssl.org
Automated List Manager majord...@openssl.org
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openssl-users@openssl.org
Automated List Manager majord...@openssl.org