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.
59 lines
1.5 KiB
C++
59 lines
1.5 KiB
C++
#ifndef ENCRYPTION_PARAMETER_HPP_EIAWNAWY
|
|
#define ENCRYPTION_PARAMETER_HPP_EIAWNAWY
|
|
|
|
#include <vanetza/security/v2/serialization.hpp>
|
|
#include <boost/variant/variant.hpp>
|
|
#include <array>
|
|
#include <cstdint>
|
|
|
|
namespace vanetza
|
|
{
|
|
namespace security
|
|
{
|
|
namespace v2
|
|
{
|
|
|
|
/// forward declaration, see public_key.hpp
|
|
enum class SymmetricAlgorithm : uint8_t;
|
|
|
|
/// Nonce specified in TS 103 097 v1.2.1, section 4.2.7
|
|
using Nonce = std::array<uint8_t, 12>;
|
|
|
|
/// EncryptionParameter specified in TS 103 097 v1.2.1, section 4.2.7
|
|
using EncryptionParameter = boost::variant<Nonce>;
|
|
|
|
/**
|
|
* \brief Determines SymmetricAlgorithm for an EncryptionParameter
|
|
* \param param
|
|
* \return SymmetricAlgorithm
|
|
*/
|
|
SymmetricAlgorithm get_type(const EncryptionParameter&);
|
|
|
|
/**
|
|
* \brief Serializes an EncryptionParameter into a binary archive
|
|
* \param ar to serialize in
|
|
* \param param to serialize
|
|
*/
|
|
void serialize(OutputArchive&, const EncryptionParameter&);
|
|
|
|
/**
|
|
* \brief Calculates size of an EncryptionParameter
|
|
* \param param
|
|
* \return number of octets needed to serialize the EncryptionParameter
|
|
*/
|
|
size_t get_size(const EncryptionParameter&);
|
|
|
|
/**
|
|
* \brief Deserializes an EncryptionParameter from a binary archive
|
|
* \param ar Input expected to start with an EncryptionParameter
|
|
* \param enc Deserialized encryption parameter
|
|
* \return size of deserialized EncryptionParameter
|
|
*/
|
|
size_t deserialize(InputArchive&, EncryptionParameter&);
|
|
|
|
} // namespace v2
|
|
} // namespace security
|
|
} // namespace vanetzta
|
|
|
|
#endif /* ENCRYPTION_PARAMETER_HPP_EIAWNAWY */
|