Initialize XMSS Key Pair State

Initialize XMSS Key Pair State#

Syntax#

IppStatus ippsXMSSInitKeyPair (IppsXMSSAlgo OIDAlgo,
                               IppsXMSSPrivateKeyState* pPrvKey,
                               IppsXMSSPublicKeyState* pPubKey);

Include Files#

ippcp.h

Parameters#

OIDAlgo

XMSS Algorithm ID. It defines a set of XMSS parameters. See Supported XMSS Algorithms for more information.

pPrvKey

Pointer to the IppsXMSSPrivateKeyState context. Size is greater or equal to the value returned by ippsXMSSPrivateKeyStateGetSize.

pPubKey

Pointer to the IppsXMSSPublicKeyState context. Size is greater or equal to the value returned by ippsXMSSPublicKeyStateGetSize. The pointer can be a NULL pointer. In this case only pPrvKey is initialized.

Description#

This function initializes states for private and public keys. The scheme of the private key is shown below:

+---------------------------------+
|          algorithm OID          |
+---------------------------------+
|        private key index        | 4 bytes
+---------------------------------+
|                                 |
|        private key seed         | n bytes
|                                 |
+---------------------------------+
|                                 |
|           SK_PRF key            | n bytes
|                                 |
+---------------------------------+
|                                 |
|           root node             | n bytes
|                                 |
+---------------------------------+
|                                 |
|        public key seed          | n bytes
|                                 |
+---------------------------------+

The scheme of the public key is shown below:

+---------------------------------+
|          algorithm OID          |
+---------------------------------+
|                                 |
|            root node            | n bytes
|                                 |
+---------------------------------+
|                                 |
|              SEED               | n bytes
|                                 |
+---------------------------------+

n is a WOTS+ parameter.

Note

Important

This is a Preview Feature. You need to enable the IPPCP_PREVIEW_XMSS macro to use the feature.

Return Values#

ippStsNoErr

Indicates no error. All single operations executed without errors. Any other value indicates an error or warning.

ippStsNullPtrErr

pPrvKey is a NULL pointer.

ippStsBadArgErr

OIDAlgo < 1 or OIDAlgo > the maximum value for IppsXMSSAlgo.