chromium/net/third_party/quiche/src/quiche/quic/tools/simple_ticket_crypter.cc

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

#include "quiche/quic/tools/simple_ticket_crypter.h"

#include <memory>
#include <utility>
#include <vector>

#include "openssl/aead.h"
#include "openssl/rand.h"

namespace quic {

namespace {

constexpr QuicTime::Delta kTicketKeyLifetime =;

// The format of an encrypted ticket is 1 byte for the key epoch, followed by
// 16 bytes of IV, followed by the output from the AES-GCM Seal operation. The
// seal operation has an overhead of 16 bytes for its auth tag.
constexpr size_t kEpochSize =;
constexpr size_t kIVSize =;
constexpr size_t kAuthTagSize =;

// Offsets into the ciphertext to make message parsing easier.
constexpr size_t kIVOffset =;
constexpr size_t kMessageOffset =;

}  // namespace

SimpleTicketCrypter::SimpleTicketCrypter(QuicClock* clock) :{}

SimpleTicketCrypter::~SimpleTicketCrypter() = default;

size_t SimpleTicketCrypter::MaxOverhead() {}

std::vector<uint8_t> SimpleTicketCrypter::Encrypt(
    absl::string_view in, absl::string_view encryption_key) {}

std::vector<uint8_t> SimpleTicketCrypter::Decrypt(absl::string_view in) {}

void SimpleTicketCrypter::Decrypt(
    absl::string_view in,
    std::shared_ptr<quic::ProofSource::DecryptCallback> callback) {}

void SimpleTicketCrypter::MaybeRotateKeys() {}

std::unique_ptr<SimpleTicketCrypter::Key> SimpleTicketCrypter::NewKey() {}

}  // namespace quic