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

Unified Diff: content/renderer/webcrypto/webcrypto_util.h

Issue 118623002: [webcrypto] Add raw symmetric key AES-KW wrap/unwrap for NSS. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: changed ASSERTS from last change to EXPECTS, to match original code intent Created 6 years, 10 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 | « content/renderer/webcrypto/shared_crypto_unittest.cc ('k') | content/renderer/webcrypto/webcrypto_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/webcrypto/webcrypto_util.h
diff --git a/content/renderer/webcrypto/webcrypto_util.h b/content/renderer/webcrypto/webcrypto_util.h
index eaffc3639e4afce811a18defbe07daf3f3b09b4d..28eb8e0f64e9bcdedb8c54e81b4499f003cb25f3 100644
--- a/content/renderer/webcrypto/webcrypto_util.h
+++ b/content/renderer/webcrypto/webcrypto_util.h
@@ -135,6 +135,11 @@ class CONTENT_EXPORT Status {
// key's modulus).
static Status ErrorDataTooLarge();
+ // The data provided to an encrypt/decrypt/sign/verify operation was too
+ // small. This usually represents an algorithm restriction (for instance
+ // AES-KW requires a minimum of 24 bytes input data).
+ static Status ErrorDataTooSmall();
+
// Something was unsupported or unimplemented. This can mean the algorithm in
// question was unsupported, some parameter combination was unsupported, or
// something has not yet been implemented.
@@ -149,6 +154,10 @@ class CONTENT_EXPORT Status {
// not 32, 64, 96, 104, 112, 120, or 128.
static Status ErrorInvalidAesGcmTagLength();
+ // The input data given to an AES-KW encrypt/decrypt operation was not a
+ // multiple of 8 bytes, as required by RFC 3394.
+ static Status ErrorInvalidAesKwDataLength();
+
// The "publicExponent" used to generate a key was invalid: either no bytes
// were specified, or the number was too large to fit into an "unsigned long"
// (implemention limitation), or the exponent was zero.
@@ -158,6 +167,10 @@ class CONTENT_EXPORT Status {
// is required.
static Status ErrorMissingAlgorithmImportRawKey();
+ // The algorithm was null when unwrapping a raw-formatted key. In this case it
+ // is required.
+ static Status ErrorMissingAlgorithmUnwrapRawKey();
+
// The modulus bytes were empty when importing an RSA public key.
static Status ErrorImportRsaEmptyModulus();
« no previous file with comments | « content/renderer/webcrypto/shared_crypto_unittest.cc ('k') | content/renderer/webcrypto/webcrypto_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698