1#ifndef ECDSA256_HPP_IOXLJFVZ
2#define ECDSA256_HPP_IOXLJFVZ
20constexpr unsigned digest_octets = 32;
24 std::array<uint8_t, digest_octets> x;
25 std::array<uint8_t, digest_octets> y;
34 std::array<uint8_t, digest_octets> key;
48
49
50
51
63struct hash<vanetza::security::ecdsa256::
PublicKey>
65 size_t operator()(
const vanetza::security::ecdsa256::
PublicKey&)
const;
69struct hash<vanetza::security::ecdsa256::
PrivateKey>
71 size_t operator()(
const vanetza::security::ecdsa256::
PrivateKey&)
const;
ChunckPacket is a packet consisting of several memory chunks.
ByteBufferConvertible & operator[](OsiLayer ol)
ChunkPacket & merge(ChunkPacket &packet, OsiLayer from, OsiLayer to)
const ByteBufferConvertible & layer(OsiLayer ol) const
const ByteBufferConvertible & operator[](OsiLayer ol) const
ByteBufferConvertible & layer(OsiLayer ol)
std::size_t size(OsiLayer from, OsiLayer to) const
ChunkPacket extract(OsiLayer from, OsiLayer to)
std::size_t size(OsiLayer from, OsiLayer to) const
buffer_const_range operator[](OsiLayer layer) const
void set_boundary(OsiLayer, unsigned bytes)
const ByteBuffer & buffer() const
CohesivePacket(const ByteBuffer &buffer, OsiLayer layer)
void trim(OsiLayer from, unsigned bytes)
std::size_t size(OsiLayer single_layer) const
Result create(const std::string &name, Args... args) const
bool configure_default(const std::string &name)
bool add(const std::string &name, Function f)
Result create(Args... args) const
value_type operator[](size_type) const
byte_view_range(ByteBuffer &&)
byte_view_range(const ByteBuffer::const_iterator &, const ByteBuffer::const_iterator &)
ByteBuffer::const_pointer data() const
void encode(units::Duration)
units::Duration decode() const
bool after(const Timestamp &other) const
bool before(const Timestamp &other) const
virtual ecdsa256::KeyPair generate_key_pair()=0
generate a private key and the corresponding public key
virtual boost::optional< Uncompressed > decompress_point(const EccPoint &ecc_point)=0
decompress a possibly compressed elliptic curve point
virtual Signature sign_digest(const PrivateKey &, const ByteBuffer &digest)=0
calculate signature for given digest and private key
virtual EcdsaSignature sign_data(const ecdsa256::PrivateKey &private_key, const ByteBuffer &data)=0
calculate signature for given data and private key
virtual bool verify_data(const ecdsa256::PublicKey &public_key, const ByteBuffer &data, const EcdsaSignature &sig)=0
try to verify data using public key and signature
virtual bool verify_digest(const PublicKey &public_key, const ByteBuffer &digest, const Signature &sig)=0
try to verify digest using public key and signature
virtual ByteBuffer calculate_hash(HashAlgorithm algo, const ByteBuffer &data)=0
calculate hash value of data
static CertificateValidity valid()
Create CertificateValidity signalling a valid certificate This method is equivalent to default constr...
CertificateValidity(CertificateInvalidReason reason)
CertificateInvalidReason reason() const
Get reason for certificate invalidity This call is only safe if reason is available,...
IntX specified in TS 103 097 v1.2.1, section 4.2.1.
static DecapConfirm from(VerifyConfirm &&verify_confirm, const SecuredMessageView &msg_view)
Input data for decapsulating a secured message.
EcdsaSignature specified in TS 103 097 v1.2.1, section 4.2.9.
Uncompressed specified in TS 103 097 v1.2.1 in section 4.2.5.
described in TS 103 097 v1.2.1 (2015-06), section 6.1
void add_permission(ItsAid aid, const ByteBuffer &ssp)
const ValidityRestriction * get_restriction(ValidityRestrictionType type) const
const SubjectAttribute * get_attribute(SubjectAttributeType type) const
void remove_attribute(SubjectAttributeType type)
const validity_restriction_type< T > * get_restriction() const
const subject_attribute_type< T > * get_attribute() const
void remove_restriction(ValidityRestrictionType type)
void add_permission(ItsAid aid)
Payload specified in TS 103 097 v1.2.1, section 5.2.
SecuredMessage as specified in TS 103 097 v1.2.1, section 5.1.
HeaderField * header_field(HeaderFieldType)
const TrailerField * trailer_field(TrailerFieldType type) const
const HeaderField * header_field(HeaderFieldType type) const
TrailerField * trailer_field(TrailerFieldType)
described in TS 103 097 v1.2.1, section 6.2
ThreeDLocation specified in TS 103 097 v1.2.1, section 4.2.19.
Time64WithStandardDeviation specified in TS 103 097 v1.2.1, section 4.2.16.
resolve type for matching TrailerFieldType