Get LMS Public Key Elements

Get LMS Public Key Elements#

Syntax#

IppStatus ippsLMSGetPublicKeyElems (IppsLMSAlgoType* pLmsType,
                                    Ipp8u* pI,
                                    Ipp8u* pT1,
                                    const IppsLMSPublicKeyState* pState);

Include Files#

ippcp.h

Parameters#

pLmsType

Pointer to the output LMS Algorithm ID (lmotsOIDAlgo and lmsOIDAlgo), or NULL. See Supported LMS Algorithms for more information.

pI

Pointer to the output buffer for the LMS 16-byte string I, or NULL.

pT1

Pointer to the output buffer for the LMS public key T1 (m bytes) value, or NULL.

pState

Pointer to the LMS public key state.

Description#

This function extracts the components of the LMS public key state that was previously set with ippsLMSSetPublicKeyState. See Set LMS Public Key State for the scheme of the public key.

Every output pointer except pState is optional: pass NULL for any component that is not needed and it will be skipped, leaving the caller’s buffer untouched. A single call can therefore return one, several, or all components at once. Each provided (non-NULL) buffer must be large enough for its component according to the algorithm parameter set stored in the state.

Note

Usage restriction

Call this function only on a state that has been fully populated by ippsLMSKeyGen or by ippsLMSSetPublicKeyState. A state that was only initialized with ippsLMSInitKeyPair contains the algorithm parameters but not yet valid key values, so the extracted components (I, T1) will be undefined.

Note

Important

This is a Preview Feature. You need to enable the IPPCP_PREVIEW_LMS 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

pState is a NULL pointer.

ippStsContextMatchErr

The pState context is invalid.

ippStsBadArgErr

The state holds an unsupported lmsOIDAlgo or lmotsOIDAlgo.