|
Botan 3.11.0
Crypto and TLS for C&
|
#include <stateful_key_index_registry.h>
Classes | |
| class | KeyId |
Public Member Functions | |
| uint64_t | current_index (const KeyId &key_id) |
| Stateful_Key_Index_Registry & | operator= (const Stateful_Key_Index_Registry &)=delete |
| Stateful_Key_Index_Registry & | operator= (Stateful_Key_Index_Registry &&)=delete |
| uint64_t | remaining_operations (const KeyId &key_id, uint64_t max) |
| uint64_t | reserve_next_index (const KeyId &key_id) |
| void | set_index_lower_bound (const KeyId &key_id, uint64_t min) |
| Stateful_Key_Index_Registry (const Stateful_Key_Index_Registry &)=delete | |
| Stateful_Key_Index_Registry (Stateful_Key_Index_Registry &&)=delete | |
| ~Stateful_Key_Index_Registry () | |
Static Public Member Functions | |
| static Stateful_Key_Index_Registry & | global () |
A process-wide registry mapping stateful key identity to a shared atomic counter. Ensures that independent copies of the same key material (e.g. deserialized separately) share a single leaf index, preventing catastrophic one-time signature reuse.
Used by XMSS and HSS-LMS.
Definition at line 28 of file stateful_key_index_registry.h.
|
delete |
References Stateful_Key_Index_Registry().
Referenced by global(), operator=(), operator=(), Stateful_Key_Index_Registry(), Stateful_Key_Index_Registry(), and ~Stateful_Key_Index_Registry().
|
delete |
References Stateful_Key_Index_Registry().
|
default |
References Stateful_Key_Index_Registry().
| uint64_t Botan::Stateful_Key_Index_Registry::current_index | ( | const KeyId & | key_id | ) |
Return the current counter
Definition at line 51 of file stateful_key_index_registry.cpp.
References Botan::lock().
Referenced by Botan::HSS_LMS_PrivateKeyInternal::to_bytes().
|
static |
Retrieve the process-wide instance
Definition at line 15 of file stateful_key_index_registry.cpp.
References Stateful_Key_Index_Registry().
Referenced by Botan::HSS_LMS_PrivateKeyInternal::remaining_operations(), Botan::HSS_LMS_PrivateKeyInternal::set_idx(), and Botan::HSS_LMS_PrivateKeyInternal::to_bytes().
|
delete |
References Stateful_Key_Index_Registry().
|
delete |
References Stateful_Key_Index_Registry().
| uint64_t Botan::Stateful_Key_Index_Registry::remaining_operations | ( | const KeyId & | key_id, |
| uint64_t | max ) |
If the current counter is >= max returns 0, otherwise max - counter
Definition at line 71 of file stateful_key_index_registry.cpp.
References Botan::lock().
| uint64_t Botan::Stateful_Key_Index_Registry::reserve_next_index | ( | const KeyId & | key_id | ) |
Return a new counter
Definition at line 57 of file stateful_key_index_registry.cpp.
References Botan::lock().
| void Botan::Stateful_Key_Index_Registry::set_index_lower_bound | ( | const KeyId & | key_id, |
| uint64_t | min ) |
Set the counter to at least min (but if already higher it will retain its current value)
Definition at line 65 of file stateful_key_index_registry.cpp.
References Botan::lock().
Referenced by Botan::HSS_LMS_PrivateKeyInternal::set_idx().