Botan 2.1.0 Crypto and TLS for C++11

- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Static Public Member Functions | List of all members
Botan::XMSS_Index_Registry Class Reference

`#include <xmss_index_registry.h>`

## Public Member Functions
std::shared_ptr< Atomic< size_t > > | get (const secure_vector< uint8_t > &private_seed, const secure_vector< uint8_t > &prf)
XMSS_Index_Registry & | operator= (const XMSS_Index_Registry &)=delete
| XMSS_Index_Registry (const XMSS_Index_Registry &)=delete

## Static Public Member Functions
static XMSS_Index_Registry & | get_instance ()

## Detailed Description

A registry for XMSS private keys, keeps track of the leaf index for independend copies of the same key.

Definition at line 28 of file xmss_index_registry.h.

## Constructor & Destructor Documentation

Botan::XMSS_Index_Registry::XMSS_Index_Registry | ( | const XMSS_Index_Registry & |  | ) |
| delete

## Member Function Documentation

std::shared_ptr< Atomic< size_t > > Botan::XMSS_Index_Registry::get | ( | const secure_vector< uint8_t > & | private_seed,
|  | const secure_vector< uint8_t > & | prf
| ) |  |

Retrieves the last unused leaf index for the private key identified by private_seed and prf. The leaf index will be updated properly across independent copies of private_key.

Parameters

  private_seed | Part of the unique identifier for an XMSS_PrivateKey.
  prf | Part of the unique identifier for an XMSS_PrivateKey.

Returns
  last unused leaf index for private_key.

Definition at line 36 of file xmss_index_registry.cpp.

References Botan::CT::max().

38 {
39 size_t pos = get(make_key_id(private_seed, prf));
40
41 if(pos < std::numeric_limits<size_t>::max())
42 {
43 return m_leaf_indices[pos];
44 }
45 else
46 {
47 return m_leaf_indices[add(make_key_id(private_seed, prf))];
48 }
49 }
Botan::CT::max
T max(T a, T b)
Definition: ct_utils.h:173

static XMSS_Index_Registry& Botan::XMSS_Index_Registry::get_instance | ( |  | ) |
| inline static

Retrieves a handle to the process-wide unique XMSS index registry.

Returns
  Reference to unique XMSS index registry.

Definition at line 39 of file xmss_index_registry.h.

40 {
41 static XMSS_Index_Registry self;
42 return self;
43 }
Botan::XMSS_Index_Registry::XMSS_Index_Registry
XMSS_Index_Registry(const XMSS_Index_Registry &)=delete

XMSS_Index_Registry& Botan::XMSS_Index_Registry::operator= | ( | const XMSS_Index_Registry & |  | ) |
| delete

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

- src/lib/pubkey/xmss/xmss_index_registry.h
- src/lib/pubkey/xmss/xmss_index_registry.cpp