Vanetza
 
Loading...
Searching...
No Matches
ecc_point.hpp
1#ifndef CFE4DC34_AD31_47E8_9EB2_1B98C6FB0887
2#define CFE4DC34_AD31_47E8_9EB2_1B98C6FB0887
3
4#include <vanetza/common/byte_buffer.hpp>
5#include <boost/variant/variant.hpp>
6
7namespace vanetza
8{
9namespace security
10{
11
12/// X_Coordinate_Only specified in TS 103 097 v1.2.1 in section 4.2.5
14{
15 ByteBuffer x;
16};
17
18/// Compressed_Lsb_Y_0 specified in TS 103 097 v1.2.1 in section 4.2.5
20{
21 ByteBuffer x;
22};
23
24/// Compressed_Lsb_Y_1 specified in TS 103 097 v1.2.1 in section 4.2.5
26{
27 ByteBuffer x;
28};
29
30/// Uncompressed specified in TS 103 097 v1.2.1 in section 4.2.5
32{
33 ByteBuffer x;
34 ByteBuffer y;
35};
36
37/// EccPoint specified in TS 103 097 v1.2.1 in section 4.2.5
38using EccPoint = boost::variant<
43>;
44
45/**
46 * \brief calculate byte length of ECC point structure
47 * \param ecc_point
48 * \return length in bytes
49 */
50std::size_t get_length(const EccPoint& ecc_point);
51
52/**
53 * \brief Convert EccPoint for signature calculation
54 * Uses ecc_point.x as relevant field for signatures.
55 *
56 * \param ecc_point
57 * \return binary representation of ECC point
58 */
59ByteBuffer convert_for_signing(const EccPoint& ecc_point);
60
61} // namespace security
62} // namespace vanetza
63
64#endif /* CFE4DC34_AD31_47E8_9EB2_1B98C6FB0887 */
Compressed_Lsb_Y_0 specified in TS 103 097 v1.2.1 in section 4.2.5.
Definition: ecc_point.hpp:20
Compressed_Lsb_Y_1 specified in TS 103 097 v1.2.1 in section 4.2.5.
Definition: ecc_point.hpp:26
Uncompressed specified in TS 103 097 v1.2.1 in section 4.2.5.
Definition: ecc_point.hpp:32
X_Coordinate_Only specified in TS 103 097 v1.2.1 in section 4.2.5.
Definition: ecc_point.hpp:14