chromium/components/webcrypto/algorithms/aes_kw_unittest.cc

// Copyright 2014 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include <stddef.h>
#include <stdint.h>

#include <memory>

#include "base/values.h"
#include "components/webcrypto/algorithm_dispatch.h"
#include "components/webcrypto/algorithms/test_helpers.h"
#include "components/webcrypto/status.h"
#include "third_party/blink/public/platform/web_crypto_algorithm_params.h"
#include "third_party/blink/public/platform/web_crypto_key_algorithm.h"

namespace webcrypto {

namespace {

blink::WebCryptoAlgorithm CreateAesKwKeyGenAlgorithm(uint16_t key_length_bits) {}

class WebCryptoAesKwTest : public WebCryptoTestBase {};

struct AesKwKnownAnswer {};

const AesKwKnownAnswer kAesKwKnownAnswers[] =;

TEST_F(WebCryptoAesKwTest, GenerateKeyBadLength) {}

TEST_F(WebCryptoAesKwTest, GenerateKeyEmptyUsage) {}

TEST_F(WebCryptoAesKwTest, ImportKeyEmptyUsage) {}

TEST_F(WebCryptoAesKwTest, ImportKeyJwkKeyOpsWrapUnwrap) {}

TEST_F(WebCryptoAesKwTest, ImportExportJwk) {}

TEST_F(WebCryptoAesKwTest, AesKwKeyImport) {}

TEST_F(WebCryptoAesKwTest, UnwrapFailures) {}

TEST_F(WebCryptoAesKwTest, AesKwRawSymkeyWrapUnwrapKnownAnswer) {}

// Unwrap a HMAC key using AES-KW, and then try doing a sign/verify with the
// unwrapped key
TEST_F(WebCryptoAesKwTest, AesKwRawSymkeyUnwrapSignVerifyHmac) {}

TEST_F(WebCryptoAesKwTest, AesKwRawSymkeyWrapUnwrapErrors) {}

TEST_F(WebCryptoAesKwTest, AesKwRawSymkeyUnwrapCorruptData) {}

TEST_F(WebCryptoAesKwTest, AesKwJwkSymkeyUnwrapKnownData) {}

// Try importing an AES-KW key with unsupported key usages using raw
// format. AES-KW keys support the following usages:
//   'wrapKey', 'unwrapKey'
TEST_F(WebCryptoAesKwTest, ImportKeyBadUsage_Raw) {}

// Try unwrapping an HMAC key with unsupported usages using JWK format and
// AES-KW. HMAC keys support the following usages:
//   'sign', 'verify'
TEST_F(WebCryptoAesKwTest, UnwrapHmacKeyBadUsage_JWK) {}

// Try unwrapping an RSA-SSA public key with unsupported usages using JWK format
// and AES-KW. RSA-SSA public keys support the following usages:
//   'verify'
TEST_F(WebCryptoAesKwTest, UnwrapRsaSsaPublicKeyBadUsage_JWK) {}

}  // namespace

}  // namespace webcrypto