Discussion:
unable to use ECDHE_ECDSA_NULL_SHA ?
Nat Brown
2014-10-22 16:34:25 UTC
Permalink
i'm using "openssl 1.0.1j 15 Oct 2014" s_client and s_server to test out
TLS and DTLS with ECDHE, e.g.

s_server -dtls1 -accept 8000 -cert ecdsa_cert.pem -key ecdsa_key.pem
-cipher "ECDHE-ECDSA-AES256-SHA"

and

s_client -dtls1 -connect localhost:8000 -cipher "ECDHE-ECDSA-AES256-SHA"

this works great for authentication + encryption.

however if i substitute -cipher "ECDHE-ECDSA-NULL-SHA" to turn off the
encryption (keeping the initial authentication and the MAC message
integrity) i'm getting errors from s_server and s_client, shown below. i
get the same errors with or without -dtls1 (so using TCP instead of UDP).

openssl ciphers -V "NULL" shows it should be available if i understand the
command correctly (though it is listed as SSLv3 and not TLSv1.2 ?)

0xC0,0x06 - ECDHE-ECDSA-NULL-SHA SSLv3 Kx=ECDH Au=ECDSA
Enc=None Mac=SHA1

thanks for any assistance.
n@

------
OpenSSL> s_server -accept 8000 -cert ./ecdsa_cert.pem -key ecdsa_key.pem
-cipher ECDHE_ECDSA_NULL_SHA
Using default temp DH parameters
Using default temp ECDH parameters
error setting cipher list
140735236031328:error:1410D0B9:SSL routines:SSL_CTX_set_cipher_list:no
cipher match:ssl_lib.c:1314:
error in s_server

--------
OpenSSL> s_client -dtls1 -connect localhost:8000 -cipher
"ECDHE-ECDSA-NULL-SHA"
CONNECTED(00000003)
write:errno=61
---
no peer certificate available
---
No client certificate CA names sent
---
SSL handshake has read 0 bytes and written 0 bytes
---
New, (NONE), Cipher is (NONE)
Secure Renegotiation IS NOT supported
Compression: NONE
Expansion: NONE
SSL-Session:
Protocol : DTLSv1
Cipher : 0000
Session-ID:
Session-ID-ctx:
Master-Key:
Key-Arg : None
PSK identity: None
PSK identity hint: None
SRP username: None
Start Time: 1413995353
Timeout : 7200 (sec)
Verify return code: 0 (ok)
---
error in s_client
Viktor Dukhovni
2014-10-22 17:13:12 UTC
Permalink
Post by Nat Brown
OpenSSL> s_server -accept 8000 -cert ./ecdsa_cert.pem -key ecdsa_key.pem
-cipher ECDHE_ECDSA_NULL_SHA
Underscores are not hyphens. Try "-cipher ECDHE-ECDSA-NULL-SHA"
--
Viktor.
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openssl-users-MCmKBN63+***@public.gmane.org
Automated List Manager majordomo-MCmKBN63+***@public.gmane.org
Nat Brown
2014-10-22 18:20:24 UTC
Permalink
argh, right you are, even on my keyboard they are different - thanks.
for the record

s_server -dtls1 -accept 8000 -cert ./ecdsa_cert.pem -key
ecdsa_key.pem -cipher "ECDHE-ECDSA-NULL-SHA"

works just fine with

s_client -dtls1 -connect localhost:8000 -cipher "ECDHE-ECDSA-NULL-SHA"

worth noting that without the specified -cipher "ECDHE-ECDSA-NULL-SHA"
to s_client the handshake fails in s_server with

140735236031328:error:1408A0C1:SSL routines:SSL3_GET_CLIENT_HELLO:no
shared cipher:s3_srvr.c:1360:

and from s_client

140735236031328:error:14102410:SSL routines:DTLS1_READ_BYTES:sslv3
alert handshake failure:d1_pkt.c:1174:SSL alert number 40
140735236031328:error:1410C0E5:SSL
routines:DTLS1_WRITE_APP_DATA_BYTES:ssl handshake
failure:d1_pkt.c:1408:

both of which seem OK/normal given the default is to encrypt the communication.

On Wed, Oct 22, 2014 at 10:13 AM, Viktor Dukhovni
Post by Viktor Dukhovni
Post by Nat Brown
OpenSSL> s_server -accept 8000 -cert ./ecdsa_cert.pem -key ecdsa_key.pem
-cipher ECDHE_ECDSA_NULL_SHA
Underscores are not hyphens. Try "-cipher ECDHE-ECDSA-NULL-SHA"
--
Viktor.
______________________________________________________________________
OpenSSL Project http://www.openssl.org
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openssl-users-MCmKBN63+***@public.gmane.org
Automated List Manager majordomo-MCmKBN63+***@public.gmane.org
Loading...