Vanetza
 
Loading...
Searching...
No Matches
vanetza::security::BackendNull Class Reference

A backend doing nothing. More...

#include <backend_null.hpp>

Inheritance diagram for vanetza::security::BackendNull:

Public Member Functions

EcdsaSignature sign_data (const ecdsa256::PrivateKey &private_key, const ByteBuffer &data_buffer) override
 
bool verify_data (const ecdsa256::PublicKey &public_key, const ByteBuffer &data, const EcdsaSignature &sig) override
 
bool verify_digest (const PublicKey &, const ByteBuffer &digest, const Signature &) override
 
boost::optional< Uncompresseddecompress_point (const EccPoint &ecc_point) override
 
ByteBuffer calculate_hash (KeyType, const ByteBuffer &) override
 

Static Public Attributes

static constexpr auto backend_name = "Null"
 

Private Member Functions

EcdsaSignature fake_signature () const
 

Detailed Description

A backend doing nothing.

This backend is INSECURE quite obviously! It will return a faked signature and silently accept all data at verification.

Definition at line 17 of file backend_null.hpp.

Member Function Documentation

◆ calculate_hash()

ByteBuffer vanetza::security::BackendNull::calculate_hash ( KeyType  key,
const ByteBuffer &  buffer 
)
overridevirtual
See also
Backend::calculate_hash

Implements vanetza::security::Backend.

Definition at line 46 of file backend_null.cpp.

◆ decompress_point()

boost::optional< Uncompressed > vanetza::security::BackendNull::decompress_point ( const EccPoint &  ecc_point)
overridevirtual
See also
Backend::decompress_point

Implements vanetza::security::Backend.

Definition at line 29 of file backend_null.cpp.

◆ fake_signature()

EcdsaSignature vanetza::security::BackendNull::fake_signature ( ) const
private

Definition at line 34 of file backend_null.cpp.

◆ sign_data()

EcdsaSignature vanetza::security::BackendNull::sign_data ( const ecdsa256::PrivateKey private_key,
const ByteBuffer &  data_buffer 
)
overridevirtual
See also
Backend::sign_data

Implements vanetza::security::Backend.

Definition at line 11 of file backend_null.cpp.

◆ verify_data()

bool vanetza::security::BackendNull::verify_data ( const ecdsa256::PublicKey public_key,
const ByteBuffer &  data,
const EcdsaSignature sig 
)
overridevirtual
See also
Backend::verify_data

Implements vanetza::security::Backend.

Definition at line 17 of file backend_null.cpp.

◆ verify_digest()

bool vanetza::security::BackendNull::verify_digest ( const PublicKey ,
const ByteBuffer &  digest,
const Signature  
)
overridevirtual
See also
Backend::verify_digest

Implements vanetza::security::Backend.

Definition at line 23 of file backend_null.cpp.

Member Data Documentation

◆ backend_name

constexpr auto vanetza::security::BackendNull::backend_name = "Null"
staticconstexpr

Definition at line 20 of file backend_null.hpp.


The documentation for this class was generated from the following files: