]> Cypherpunks repositories - gostls13.git/commit
crypto/rsa: check for minimal PKCS#1 v1.5 padding.
authorAdam Langley <agl@golang.org>
Wed, 15 May 2013 14:27:34 +0000 (10:27 -0400)
committerAdam Langley <agl@golang.org>
Wed, 15 May 2013 14:27:34 +0000 (10:27 -0400)
commite85e67889931e10908e912622a6954943fb28ed5
treec6f641e12f6268c8f5e85180f978762562350d80
parenta1dbfee15b7283a41ae01c482a3862d2148798b8
crypto/rsa: check for minimal PKCS#1 v1.5 padding.

The PKCS#1 spec requires that the PS padding in an RSA message be at
least 8 bytes long. We were not previously checking this. This isn't
important in the most common situation (session key encryption), but
the impact is unclear in other cases.

This change enforces the specified minimum size.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/9222045
src/pkg/crypto/rsa/pkcs1v15.go
src/pkg/crypto/rsa/pkcs1v15_test.go
src/pkg/crypto/subtle/constant_time.go
src/pkg/crypto/subtle/constant_time_test.go