Get LMS Signature Elements

Get LMS Signature Elements#

Syntax#

IppStatus ippsLMSGetSignatureElems (IppsLMSAlgoType* pLmsType,
                                    Ipp32u* pQ,
                                    Ipp8u* pC,
                                    Ipp8u* pY,
                                    Ipp8u* pAuthPath,
                                    const IppsLMSSignatureState* 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.

pQ

Pointer to the output index of the LMS tree leaf q, or NULL.

pC

Pointer to the output buffer for the random string C (n bytes), or NULL.

pY

Pointer to the output buffer for Y that is a part of the LM-OTS string (n * p bytes), or NULL.

pAuthPath

Pointer to the output buffer for the LMS authorization path (h * m bytes), or NULL.

pState

Pointer to the LMS signature state.

Description#

This function extracts the components of the LMS signature state that was previously set with ippsLMSSetSignatureState. See Set LMS Signature State for the scheme of the signature and the scheme of the LM-OTS signature.

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 ippsLMSSign or by ippsLMSSetSignatureState. A state that was only initialized with ippsLMSInitSignature contains the algorithm parameters but not yet valid signature values, so the extracted components (q, C, Y, AuthPath) 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 lmotsOIDAlgo or lmsOIDAlgo.