Source release 19.3.0

This commit is contained in:
John W. Bruce
2024-09-05 07:02:36 +00:00
parent cd8256726f
commit 11c108a8da
122 changed files with 2259 additions and 1082 deletions

View File

@@ -7,8 +7,8 @@
#ifndef WVOEC_UTIL_ECC_KEY_H_
#define WVOEC_UTIL_ECC_KEY_H_
#include <inttypes.h>
#include <stddef.h>
#include <stdint.h>
#include <memory>
#include <string>
@@ -17,6 +17,7 @@
#include <openssl/ec.h>
#include "OEMCryptoCENCCommon.h"
#include "wv_class_utils.h"
namespace wvoec {
namespace util {
@@ -35,6 +36,9 @@ class EccPrivateKey;
class EccPublicKey {
public:
~EccPublicKey();
WVCDM_DISALLOW_COPY_AND_MOVE(EccPublicKey);
// Creates a new public key equivalent of the provided private key.
static std::unique_ptr<EccPublicKey> New(const EccPrivateKey& private_key);
@@ -173,15 +177,8 @@ class EccPublicKey {
const std::vector<uint8_t>& message,
const std::vector<uint8_t>& signature) const;
~EccPublicKey();
EccPublicKey(const EccPublicKey&) = delete;
EccPublicKey(EccPublicKey&&) = delete;
const EccPublicKey& operator=(const EccPublicKey&) = delete;
EccPublicKey& operator=(EccPublicKey&&) = delete;
private:
EccPublicKey() {}
EccPublicKey() = default;
// Initializes the public key object using the provided |buffer|.
// In case of any failure, false is return and the key should be
@@ -207,6 +204,9 @@ class EccPublicKey {
class EccPrivateKey {
public:
~EccPrivateKey();
WVCDM_DISALLOW_COPY_AND_MOVE(EccPrivateKey);
// Creates a new, pseudorandom ECC private key belonging to the
// curve specified.
static std::unique_ptr<EccPrivateKey> New(EccCurve curve);
@@ -318,7 +318,7 @@ class EccPrivateKey {
size_t SignatureSize() const;
// Special test method used to generate a raw ECDSA signature.
// A raw ECDSA signature is a concatination of a same-width-big-endian
// A raw ECDSA signature is a concatenation of a same-width-big-endian
// encoding of the ECDSA signature point components r and s.
std::vector<uint8_t> GenerateRawSignature(
const std::vector<uint8_t>& message) const;
@@ -339,15 +339,8 @@ class EccPrivateKey {
// by DeriveSymmetricKey().
size_t SessionKeyLength() const;
~EccPrivateKey();
EccPrivateKey(const EccPrivateKey&) = delete;
EccPrivateKey(EccPrivateKey&&) = delete;
const EccPrivateKey& operator=(const EccPrivateKey&) = delete;
EccPrivateKey& operator=(EccPrivateKey&&) = delete;
private:
EccPrivateKey() {}
EccPrivateKey() = default;
// Initializes the public key object using the provided |buffer|.
// In case of any failure, false is return and the key should be