#include "components/gcm_driver/crypto/p256_key_util.h"
#include <stddef.h>
#include <stdint.h>
#include <memory>
#include <string_view>
#include <vector>
#include "base/logging.h"
#include "base/strings/string_util.h"
#include "crypto/ec_private_key.h"
#include "third_party/boringssl/src/include/openssl/ec.h"
#include "third_party/boringssl/src/include/openssl/ecdh.h"
#include "third_party/boringssl/src/include/openssl/evp.h"
namespace gcm {
namespace {
const size_t kFieldBytes = …;
const size_t kUncompressedPointBytes = …;
}
bool GetRawPublicKey(const crypto::ECPrivateKey& key, std::string* public_key) { … }
bool GetRawPrivateKey(const crypto::ECPrivateKey& key,
std::string* private_key) { … }
bool ComputeSharedP256Secret(crypto::ECPrivateKey& key,
std::string_view peer_public_key,
std::string* out_shared_secret) { … }
}