obu-firmware builds against the vanetza-idf C-ITS library, which until now came from the colleague's microbu-esp32c5 tree beside the repository and was not tracked here, so a clone of this repository could not build the firmware it ships. The library alone is now part of obu-firmware, as obu-firmware/external/vanetza-idf: their external/vanetza-idf at commit cf4b99f, unchanged (9775 files; see its PROVENANCE.md). CMake takes it from there by default; -DVANETZA_IDF_DIR still points the build elsewhere. The rest of the colleague's tree (their own VAM firmware, PKI tooling, station-link Python tools, the V2X2MAP bridge) stays out of this repository and gitignored; nothing is pushed to their repository. NOTES.md, docs/06, TODO.md and the pcap verifier's usage line point at the new location.
63 lines
1.5 KiB
C++
63 lines
1.5 KiB
C++
#ifndef ECC_POINT_HPP_XCESTUEB
|
|
#define ECC_POINT_HPP_XCESTUEB
|
|
|
|
#include <vanetza/common/byte_buffer.hpp>
|
|
#include <vanetza/security/ecc_point.hpp>
|
|
#include <vanetza/security/v2/serialization.hpp>
|
|
#include <cstdint>
|
|
|
|
namespace vanetza
|
|
{
|
|
namespace security
|
|
{
|
|
namespace v2
|
|
{
|
|
|
|
/// forward declaration, see public_key.hpp
|
|
enum class PublicKeyAlgorithm: uint8_t;
|
|
|
|
/// EccPointType specified in TS 103 097 v1.2.1 in section 4.2.6
|
|
enum class EccPointType : uint8_t
|
|
{
|
|
X_Coordinate_Only = 0,
|
|
Compressed_Lsb_Y_0 = 2,
|
|
Compressed_Lsb_Y_1 = 3,
|
|
Uncompressed = 4
|
|
};
|
|
|
|
/**
|
|
* \brief Determines EccPointType to a given EccPoint
|
|
* \param ecc_point
|
|
* \return type
|
|
*/
|
|
EccPointType get_type(const EccPoint&);
|
|
|
|
/**
|
|
* \brief Serializes an EccPoint into a binary archive
|
|
* \param ar to serialize in
|
|
* \param ecc_point to serialize
|
|
* \param pka Public key algorithm used for EccPoint
|
|
*/
|
|
void serialize(OutputArchive&, const EccPoint&, PublicKeyAlgorithm);
|
|
|
|
/**
|
|
* \brief Deserializes an EccPoint from a binary archive
|
|
* \param ar with a serialized EccPoint at the beginning,
|
|
* \param ecc_point to deserialize
|
|
* \param pka to get field size of the encoded coordinates
|
|
*/
|
|
void deserialize(InputArchive&, EccPoint&, PublicKeyAlgorithm);
|
|
|
|
/**
|
|
* \brief Calculates size of an EccPoint
|
|
* \param ecc_point
|
|
* \return size_t containing the number of octets needed to serialize the EccPoint
|
|
*/
|
|
size_t get_size(const EccPoint&);
|
|
|
|
} // namespace v2
|
|
} // namespace security
|
|
} // namespace vanetza
|
|
|
|
#endif /* ECC_POINT_HPP_XCESTUEB */
|