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

Side by Side 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_CHILD_WEBCRYPTO_PLATFORM_CRYPTO_H_ 5 #ifndef CONTENT_CHILD_WEBCRYPTO_PLATFORM_CRYPTO_H_
6 #define CONTENT_CHILD_WEBCRYPTO_PLATFORM_CRYPTO_H_ 6 #define CONTENT_CHILD_WEBCRYPTO_PLATFORM_CRYPTO_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "third_party/WebKit/public/platform/WebArrayBuffer.h" 10 #include "third_party/WebKit/public/platform/WebArrayBuffer.h"
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 // Preconditions: 179 // Preconditions:
180 // * |wrapping_key| is non-null 180 // * |wrapping_key| is non-null
181 // * |key| is non-null 181 // * |key| is non-null
182 Status WrapSymKeyAesKw(SymKey* wrapping_key, 182 Status WrapSymKeyAesKw(SymKey* wrapping_key,
183 SymKey* key, 183 SymKey* key,
184 blink::WebArrayBuffer* buffer); 184 blink::WebArrayBuffer* buffer);
185 185
186 // Preconditions: 186 // Preconditions:
187 // * |wrapping_key| is non-null 187 // * |wrapping_key| is non-null
188 // * |key| is non-null 188 // * |key| is non-null
189 // * |algorithm.id()| is for a symmetric key algorithm.
eroman 2014/03/10 21:35:57 Isn't this still the case?
padolph 2014/03/10 23:50:01 Yes, but I thought was implied. Replaced.
190 // * |wrapped_key_data| is at least 24 bytes and a multiple of 8 bytes 189 // * |wrapped_key_data| is at least 24 bytes and a multiple of 8 bytes
191 Status UnwrapSymKeyAesKw(const CryptoData& wrapped_key_data, 190 Status UnwrapSymKeyAesKw(const CryptoData& wrapped_key_data,
192 SymKey* wrapping_key, 191 SymKey* wrapping_key,
193 const blink::WebCryptoAlgorithm& algorithm, 192 const blink::WebCryptoAlgorithm& algorithm,
194 bool extractable, 193 bool extractable,
195 blink::WebCryptoKeyUsageMask usage_mask, 194 blink::WebCryptoKeyUsageMask usage_mask,
196 blink::WebCryptoKey* key); 195 blink::WebCryptoKey* key);
197 196
197 // Preconditions:
198 // * |wrapping_key| is non-null
199 // * |key| is non-null
200 Status WrapSymKeyRsaEs(PublicKey* wrapping_key,
201 SymKey* key,
202 blink::WebArrayBuffer* buffer);
203
204 // Preconditions:
205 // * |wrapping_key| is non-null
206 // * |key| is non-null
207 Status UnwrapSymKeyRsaEs(const CryptoData& wrapped_key_data,
208 PrivateKey* wrapping_key,
209 const blink::WebCryptoAlgorithm& algorithm,
210 bool extractable,
211 blink::WebCryptoKeyUsageMask usage_mask,
212 blink::WebCryptoKey* key);
213
198 } // namespace platform 214 } // namespace platform
199 215
200 } // namespace webcrypto 216 } // namespace webcrypto
201 217
202 } // namespace content 218 } // namespace content
203 219
204 #endif // CONTENT_CHILD_WEBCRYPTO_PLATFORM_CRYPTO_H_ 220 #endif // CONTENT_CHILD_WEBCRYPTO_PLATFORM_CRYPTO_H_
OLDNEW
« no previous file with comments | « no previous file | content/child/webcrypto/platform_crypto_nss.cc » ('j') | content/child/webcrypto/shared_crypto_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698