blob: 71265782fdce34f78abbbc2d633c96f9e09aa1af [file] [log] [blame]
QUICHE teama6ef0a62019-03-07 20:34:33 -05001// Copyright (c) 2017 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#include "net/third_party/quiche/src/quic/core/crypto/aes_128_gcm_encrypter.h"
6
7#include "third_party/boringssl/src/include/openssl/evp.h"
8
9namespace quic {
10
11namespace {
12
13const size_t kKeySize = 16;
14const size_t kNonceSize = 12;
15
16} // namespace
17
18Aes128GcmEncrypter::Aes128GcmEncrypter()
QUICHE team2d187972019-03-19 16:23:47 -070019 : AesBaseEncrypter(EVP_aead_aes_128_gcm,
20 kKeySize,
21 kAuthTagSize,
22 kNonceSize,
23 /* use_ietf_nonce_construction */ true) {
QUICHE teama6ef0a62019-03-07 20:34:33 -050024 static_assert(kKeySize <= kMaxKeySize, "key size too big");
25 static_assert(kNonceSize <= kMaxNonceSize, "nonce size too big");
26}
27
28Aes128GcmEncrypter::~Aes128GcmEncrypter() {}
29
30} // namespace quic