chromium/components/encrypted_messages/message_encrypter.cc

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

#include "components/encrypted_messages/message_encrypter.h"

#include <string_view>

#include "base/logging.h"
#include "components/encrypted_messages/encrypted_message.pb.h"
#include "crypto/aead.h"
#include "crypto/hkdf.h"
#include "crypto/random.h"
#include "third_party/boringssl/src/include/openssl/curve25519.h"

namespace encrypted_messages {

namespace {

bool GetHkdfSubkeySecret(size_t subkey_length,
                         const uint8_t* private_key,
                         const uint8_t* public_key,
                         std::string_view hkdf_label,
                         std::string* secret) {}

}  // namespace

bool EncryptSerializedMessage(const uint8_t* server_public_key,
                              uint32_t server_public_key_version,
                              std::string_view hkdf_label,
                              const std::string& message,
                              EncryptedMessage* encrypted_message) {}

// Used only by tests.
bool DecryptMessageForTesting(const uint8_t server_private_key[32],
                              std::string_view hkdf_label,
                              const EncryptedMessage& encrypted_message,
                              std::string* decrypted_serialized_message) {}

}  // namespace encrypted_messages