#include "quiche/oblivious_http/buffers/oblivious_http_request.h"
#include <stddef.h>
#include <cstdint>
#include <memory>
#include <string>
#include <utility>
#include "absl/status/status.h"
#include "absl/status/statusor.h"
#include "absl/strings/escaping.h"
#include "absl/strings/str_cat.h"
#include "absl/strings/string_view.h"
#include "openssl/hkdf.h"
#include "openssl/hpke.h"
#include "quiche/common/platform/api/quiche_test.h"
#include "quiche/common/quiche_data_reader.h"
#include "quiche/oblivious_http/common/oblivious_http_header_key_config.h"
namespace quiche {
namespace {
const uint32_t kHeaderLength = …;
std::string GetHpkePrivateKey() { … }
std::string GetHpkePublicKey() { … }
std::string GetAlternativeHpkePublicKey() { … }
std::string GetSeed() { … }
std::string GetSeededEncapsulatedKey() { … }
bssl::UniquePtr<EVP_HPKE_KEY> ConstructHpkeKey(
absl::string_view hpke_key,
const ObliviousHttpHeaderKeyConfig &ohttp_key_config) { … }
const ObliviousHttpHeaderKeyConfig GetOhttpKeyConfig(uint8_t key_id,
uint16_t kem_id,
uint16_t kdf_id,
uint16_t aead_id) { … }
}
TEST(ObliviousHttpRequest, TestDecapsulateWithSpecAppendixAExample) { … }
TEST(ObliviousHttpRequest, TestEncapsulatedRequestStructure) { … }
TEST(ObliviousHttpRequest, TestDeterministicSeededOhttpRequest) { … }
TEST(ObliviousHttpRequest,
TestSeededEncapsulatedKeySamePlaintextsSameCiphertexts) { … }
TEST(ObliviousHttpRequest,
TestSeededEncapsulatedKeyDifferentPlaintextsDifferentCiphertexts) { … }
TEST(ObliviousHttpRequest, TestInvalidInputsOnClientSide) { … }
TEST(ObliviousHttpRequest, TestInvalidInputsOnServerSide) { … }
TEST(ObliviousHttpRequest, EndToEndTestForRequest) { … }
TEST(ObliviousHttpRequest, EndToEndTestForRequestWithWrongKey) { … }
}