Decrypts a message using ECPVS.
#include "huecpvs.h"
int hu_ECPVSRecoverDecrypt(sb_Context ecpvsContext, size_t rLen, const unsigned char *rValue, size_t *recoverableMessageLen, unsigned char *recoverableMessage, sb_GlobalCtx sbCtx)
ECPVS context object pointer.
The length (in bytes) of rValue.
The r component from the signature computation.
The length (in bytes) of recoverableMessage.
The recoverable part of the message.
A global context.
This is the third API function to be called during the ECPVS recovery process. It can be called multiple times to decrypt parts of the message; this is useful if the message is particularly large.
The first call to this function must have an rValue whose length (i.e. rLen) is at least that of the length of the padding. If the entire padding is not passed in the initial call to this function, i.e. rLen is less than the length of the padding, then the error SB_ERR_BAD_INPUT_BUF_LEN will be returned as the expected padding was not found.
If the length of the recoverable part of the message is known, a pointer to a buffer large enough to hold this part should be passed in recoverableMessage and its length in recoverableMessageLen. This function will copy the recovered data into recoverableMessage and set the actual length of it in recoverableMessageLen.
If there is no recoverable data - or you just want to check the padding - set both recoverableMessage and recoverableMessageLen to NULL.
The total recoverable message is a concatenation of all output recoverableMessage, in order, by this function.
Context object is NULL.
Context object is invalid.
The recoverable message length is NULL.
Global context is NULL.
rValue does not contain the entire padding on the initial call to this function.
The recoverable message length is invalid.
The recoverable message length is invalid.
Redundancy check failed. The padding value did not match the expected result.
Memory allocation failure.
Success.