Vanetza
Loading...
Searching...
No Matches
fndsa512.hpp
1
#
pragma
once
2
3
#
include
<
vanetza
/
common
/
byte_buffer
.
hpp
>
4
#
include
<
cstddef
>
5
#
include
<
memory
>
6
7
namespace
vanetza
8
{
9
namespace
security
10
{
11
namespace
pqc
12
{
13
14
constexpr
std::size_t fndsa512_public_key_size = 897;
15
constexpr
std::size_t fndsa512_private_key_size = 1281;
16
constexpr
std::size_t fndsa512_signature_size = 666;
17
18
struct
PublicKey
19
{
20
ByteBuffer bytes;
21
};
22
23
struct
PrivateKey
24
{
25
ByteBuffer bytes;
26
};
27
28
struct
Signature
29
{
30
ByteBuffer bytes;
31
};
32
33
struct
KeyPair
34
{
35
PublicKey
public_key;
36
PrivateKey
private_key;
37
};
38
39
/**
40
* Cryptographic operations for the experimental FN-DSA-512 profile.
41
*
42
* The interface is intentionally separate from security::Backend. Enabling
43
* the experimental profile therefore does not alter the established ECC
44
* backend contract or its key types.
45
*/
46
class
Backend
47
{
48
public
:
49
virtual
KeyPair
generate_key_pair() = 0;
50
virtual
Signature
sign(
const
PrivateKey
&,
const
ByteBuffer& data) = 0;
51
virtual
bool
verify(
const
PublicKey
&,
const
ByteBuffer& data,
const
Signature
&) = 0;
52
virtual
~Backend() =
default
;
53
};
54
55
/**
56
* Create the liboqs-backed implementation used by the experimental profile.
57
*/
58
std::unique_ptr<Backend> create_fndsa512_backend();
59
60
}
// namespace pqc
61
}
// namespace security
62
}
// namespace vanetza
vanetza::security::pqc::Backend
Definition
fndsa512.hpp:47
vanetza::security::pqc::KeyPair
Definition
fndsa512.hpp:34
vanetza::security::pqc::PrivateKey
Definition
fndsa512.hpp:24
vanetza::security::pqc::PublicKey
Definition
fndsa512.hpp:19
vanetza::security::pqc::Signature
Definition
fndsa512.hpp:29
vanetza
security
pqc
fndsa512.hpp
Generated on
for Vanetza by
1.18.0