Make CBC decoding constant time.
authorBen Laurie <ben@links.org>
Mon, 28 Jan 2013 17:31:49 +0000 (17:31 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Tue, 5 Feb 2013 16:46:16 +0000 (16:46 +0000)
commite5420be6cd09af2550b128575a675490cfba0483
tree9644929986afe97f94d37c02b2d77d7fad1335b4
parent9c00a950604aca819cee977f1dcb4b45f2af3aa6
Make CBC decoding constant time.

This patch makes the decoding of SSLv3 and TLS CBC records constant
time. Without this, a timing side-channel can be used to build a padding
oracle and mount Vaudenay's attack.

This patch also disables the stitched AESNI+SHA mode pending a similar
fix to that code.

In order to be easy to backport, this change is implemented in ssl/,
rather than as a generic AEAD mode. In the future this should be changed
around so that HMAC isn't in ssl/, but crypto/ as FIPS expects.
(cherry picked from commit e130841bccfc0bb9da254dc84e23bc6a1c78a64e)

Conflicts:
crypto/evp/c_allc.c
ssl/ssl_algs.c
ssl/ssl_locl.h
ssl/t1_enc.c
crypto/evp/c_allc.c
ssl/Makefile
ssl/d1_enc.c
ssl/s3_enc.c
ssl/s3_pkt.c
ssl/ssl3.h
ssl/ssl_algs.c
ssl/ssl_locl.h
ssl/t1_enc.c