chromium/components/reporting/encryption/primitives.cc

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

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/40285824): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

#include "components/reporting/encryption/primitives.h"

#include <cstddef>
#include <cstdint>
#include <memory>
#include <string>
#include <string_view>

#include "base/check_op.h"
#include "crypto/aead.h"
#include "third_party/boringssl/src/include/openssl/curve25519.h"
#include "third_party/boringssl/src/include/openssl/digest.h"
#include "third_party/boringssl/src/include/openssl/hkdf.h"


namespace reporting {

static_assert;
static_assert;
static_assert;
static_assert;
static_assert;
static_assert;

bool ComputeSharedSecret(const uint8_t peer_public_value[kKeySize],
                         uint8_t shared_secret[kKeySize],
                         uint8_t generated_public_value[kKeySize]) {}

bool ProduceSymmetricKey(const uint8_t shared_secret[kKeySize],
                         uint8_t symmetric_key[kKeySize]) {}

bool PerformSymmetricEncryption(const uint8_t symmetric_key[kKeySize],
                                std::string_view input_data,
                                std::string* output_data) {}

bool VerifySignature(const uint8_t verification_key[kKeySize],
                     std::string_view message,
                     const uint8_t signature[kSignatureSize]) {}

}  // namespace reporting