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

Side by Side Diff: content/renderer/webcrypto/platform_crypto.h

Issue 165373008: [webcrypto] Reject AES-GCM tag lengths other than 32, 64, 96, 104, 112, 120, 128. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 unified diff | Download patch | Annotate | Revision Log
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_RENDERER_WEBCRYPTO_PLATFORM_CRYPTO_H_ 5 #ifndef CONTENT_RENDERER_WEBCRYPTO_PLATFORM_CRYPTO_H_
6 #define CONTENT_RENDERER_WEBCRYPTO_PLATFORM_CRYPTO_H_ 6 #define CONTENT_RENDERER_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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 // * |key| is a non-null AES-CBC key. 48 // * |key| is a non-null AES-CBC key.
49 // * |iv| is exactly 16 bytes long 49 // * |iv| is exactly 16 bytes long
50 Status EncryptDecryptAesCbc(EncryptOrDecrypt mode, 50 Status EncryptDecryptAesCbc(EncryptOrDecrypt mode,
51 SymKey* key, 51 SymKey* key,
52 const CryptoData& data, 52 const CryptoData& data,
53 const CryptoData& iv, 53 const CryptoData& iv,
54 blink::WebArrayBuffer* buffer); 54 blink::WebArrayBuffer* buffer);
55 55
56 // Preconditions: 56 // Preconditions:
57 // * |key| is a non-null AES-GCM key. 57 // * |key| is a non-null AES-GCM key.
58 // * |tag_length_bits| is in the range [0, 128]. 58 // * |tag_length_bits| is one of {32, 64, 96, 104, 112, 120, 128}
59 Status EncryptDecryptAesGcm(EncryptOrDecrypt mode, 59 Status EncryptDecryptAesGcm(EncryptOrDecrypt mode,
60 SymKey* key, 60 SymKey* key,
61 const CryptoData& data, 61 const CryptoData& data,
62 const CryptoData& iv, 62 const CryptoData& iv,
63 const CryptoData& additional_data, 63 const CryptoData& additional_data,
64 unsigned int tag_length_bits, 64 unsigned int tag_length_bits,
65 blink::WebArrayBuffer* buffer); 65 blink::WebArrayBuffer* buffer);
66 66
67 // Preconditions: 67 // Preconditions:
68 // * |key| is non-null. 68 // * |key| is non-null.
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 // * |key| is non-null. 168 // * |key| is non-null.
169 Status ExportKeySpki(PublicKey* key, blink::WebArrayBuffer* buffer); 169 Status ExportKeySpki(PublicKey* key, blink::WebArrayBuffer* buffer);
170 170
171 } // namespace platform 171 } // namespace platform
172 172
173 } // namespace webcrypto 173 } // namespace webcrypto
174 174
175 } // namespace content 175 } // namespace content
176 176
177 #endif // CONTENT_RENDERER_WEBCRYPTO_PLATFORM_CRYPTO_H_ 177 #endif // CONTENT_RENDERER_WEBCRYPTO_PLATFORM_CRYPTO_H_
OLDNEW
« no previous file with comments | « no previous file | content/renderer/webcrypto/platform_crypto_nss.cc » ('j') | content/renderer/webcrypto/shared_crypto_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698