Vanetza
Loading...
Searching...
No Matches
security_entity.hpp
1#ifndef SECURITY_ENTITY_HPP
2#define SECURITY_ENTITY_HPP
3
4#include <vanetza/security/decap_service.hpp>
5#include <vanetza/security/encap_service.hpp>
6
7namespace vanetza
8{
9namespace security
10{
11
13{
14public:
15 /**
16 * \brief Creates a security envelope covering the given payload.
17 *
18 * The payload consists of the CommonHeader, ExtendedHeader and the payload of
19 * the layers above the network layer. The entire security envelope is used
20 * to calculate a signature which gets added to the resulting SecuredMessage.
21 *
22 * \param request containing payload to sign
23 * \return confirmation containing signed SecuredMessage
24 */
25 virtual EncapConfirm encapsulate_packet(EncapRequest&& request) = 0;
26
27 /**
28 * \brief Decapsulates the payload within a SecuredMessage
29 *
30 * Verifies the Signature and SignerInfo of a SecuredMessage.
31 *
32 * \param request containing a SecuredMessage
33 * \return decapsulation confirmation including plaintext payload
34 */
36
37 virtual ~SecurityEntity() = default;
38};
39
40} // namespace security
41} // namespace vanetza
42
43#endif // SECURITY_ENTITY_HPP
virtual EncapConfirm encapsulate_packet(EncapRequest &&request)=0
Creates a security envelope covering the given payload.
virtual DecapConfirm decapsulate_packet(DecapRequest &&request)=0
Decapsulates the payload within a SecuredMessage.
Input data for decapsulating a secured message.