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

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
« no previous file with comments | « no previous file | content/child/webcrypto/platform_crypto_nss.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // * |wrapped_key_data| is at least 24 bytes and a multiple of 8 bytes
189 // * |algorithm.id()| is for a symmetric key algorithm. 190 // * |algorithm.id()| is for a symmetric key algorithm.
190 // * |wrapped_key_data| is at least 24 bytes and a multiple of 8 bytes
191 Status UnwrapSymKeyAesKw(const CryptoData& wrapped_key_data, 191 Status UnwrapSymKeyAesKw(const CryptoData& wrapped_key_data,
192 SymKey* wrapping_key, 192 SymKey* wrapping_key,
193 const blink::WebCryptoAlgorithm& algorithm, 193 const blink::WebCryptoAlgorithm& algorithm,
194 bool extractable, 194 bool extractable,
195 blink::WebCryptoKeyUsageMask usage_mask, 195 blink::WebCryptoKeyUsageMask usage_mask,
196 blink::WebCryptoKey* key); 196 blink::WebCryptoKey* key);
197 197
198 // Preconditions:
199 // * |wrapping_key| is non-null
200 // * |key| is non-null
201 Status WrapSymKeyRsaEs(PublicKey* wrapping_key,
202 SymKey* key,
203 blink::WebArrayBuffer* buffer);
204
205 // Preconditions:
206 // * |wrapping_key| is non-null
207 // * |key| is non-null
208 // * |algorithm.id()| is for a symmetric key algorithm.
209 Status UnwrapSymKeyRsaEs(const CryptoData& wrapped_key_data,
210 PrivateKey* wrapping_key,
211 const blink::WebCryptoAlgorithm& algorithm,
212 bool extractable,
213 blink::WebCryptoKeyUsageMask usage_mask,
214 blink::WebCryptoKey* key);
215
198 } // namespace platform 216 } // namespace platform
199 217
200 } // namespace webcrypto 218 } // namespace webcrypto
201 219
202 } // namespace content 220 } // namespace content
203 221
204 #endif // CONTENT_CHILD_WEBCRYPTO_PLATFORM_CRYPTO_H_ 222 #endif // CONTENT_CHILD_WEBCRYPTO_PLATFORM_CRYPTO_H_
OLDNEW
« 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