Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7)

Unified Diff: content/child/webcrypto/platform_crypto.h

Issue 188363002: [webcrypto] Add raw symmetric key RSAES-PKCS1-v1_5 wrap/unwrap for NSS. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@wcAesKw_nss1
Patch Set: rebase Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/child/webcrypto/platform_crypto_nss.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/webcrypto/platform_crypto.h
diff --git a/content/child/webcrypto/platform_crypto.h b/content/child/webcrypto/platform_crypto.h
index 1af616681996551e70a0dd2ca6e0545ac1f36f6e..340c258ee8dc9328ffec683ff0509c5d4897511d 100644
--- a/content/child/webcrypto/platform_crypto.h
+++ b/content/child/webcrypto/platform_crypto.h
@@ -186,8 +186,8 @@ Status WrapSymKeyAesKw(SymKey* wrapping_key,
// Preconditions:
// * |wrapping_key| is non-null
// * |key| is non-null
-// * |algorithm.id()| is for a symmetric key algorithm.
// * |wrapped_key_data| is at least 24 bytes and a multiple of 8 bytes
+// * |algorithm.id()| is for a symmetric key algorithm.
Status UnwrapSymKeyAesKw(const CryptoData& wrapped_key_data,
SymKey* wrapping_key,
const blink::WebCryptoAlgorithm& algorithm,
@@ -195,6 +195,24 @@ Status UnwrapSymKeyAesKw(const CryptoData& wrapped_key_data,
blink::WebCryptoKeyUsageMask usage_mask,
blink::WebCryptoKey* key);
+// Preconditions:
+// * |wrapping_key| is non-null
+// * |key| is non-null
+Status WrapSymKeyRsaEs(PublicKey* wrapping_key,
+ SymKey* key,
+ blink::WebArrayBuffer* buffer);
+
+// Preconditions:
+// * |wrapping_key| is non-null
+// * |key| is non-null
+// * |algorithm.id()| is for a symmetric key algorithm.
+Status UnwrapSymKeyRsaEs(const CryptoData& wrapped_key_data,
+ PrivateKey* wrapping_key,
+ const blink::WebCryptoAlgorithm& algorithm,
+ bool extractable,
+ blink::WebCryptoKeyUsageMask usage_mask,
+ blink::WebCryptoKey* key);
+
} // namespace platform
} // namespace webcrypto
« no previous file with comments | « no previous file | content/child/webcrypto/platform_crypto_nss.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698