From e48fc2665e2e95eddea612fa315403d50c7beb2b Mon Sep 17 00:00:00 2001 From: Aleks Rudzitis Date: Thu, 21 Jul 2022 11:19:42 -0700 Subject: crypto: allow hash.Hash for OAEP and MGF1 to be specified independently crypto/rsa assumes RSA OAEP uses the same hash to be used for both the label and the mask generation function. However, implementations in other languages, such as Java and Python, allow these parameters to be specified independently. This change allows the MGF hash to be specified independently for decrypt operations in order to allow decrypting ciphertexts generated in other environments. Fixes: #19974 Change-Id: If453d628f0da354ceb3b52863f30087471670f7b Reviewed-on: https://go-review.googlesource.com/c/go/+/418874 Auto-Submit: Andrew Bonventre TryBot-Result: Gopher Robot Reviewed-by: Russ Cox Reviewed-by: Robert Griesemer Reviewed-by: Andrew Bonventre Run-TryBot: Andrew Bonventre --- api/next/19974.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 api/next/19974.txt (limited to 'api') diff --git a/api/next/19974.txt b/api/next/19974.txt new file mode 100644 index 0000000000..22893facba --- /dev/null +++ b/api/next/19974.txt @@ -0,0 +1 @@ +pkg crypto/rsa, type OAEPOptions struct, MGFHash crypto.Hash #19974 -- cgit v1.3