mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
crypto/...: changes to address some of bug 2841.
This change addresses a subset of the issues raised in bug 2841. R=rsc CC=golang-dev https://golang.org/cl/5629044
This commit is contained in:
parent
1f565e7d20
commit
005686ff97
9 changed files with 34 additions and 215 deletions
|
|
@ -412,7 +412,7 @@ func decrypt(random io.Reader, priv *PrivateKey, c *big.Int) (m *big.Int, err er
|
|||
}
|
||||
|
||||
// DecryptOAEP decrypts ciphertext using RSA-OAEP.
|
||||
// If rand != nil, DecryptOAEP uses RSA blinding to avoid timing side-channel attacks.
|
||||
// If random != nil, DecryptOAEP uses RSA blinding to avoid timing side-channel attacks.
|
||||
func DecryptOAEP(hash hash.Hash, random io.Reader, priv *PrivateKey, ciphertext []byte, label []byte) (msg []byte, err error) {
|
||||
k := (priv.N.BitLen() + 7) / 8
|
||||
if len(ciphertext) > k ||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue