nrfxlib API 0.1.0
Loading...
Searching...
No Matches

◆ ocrypto_rsa_pkcs1_v15_padding()

int ocrypto_rsa_pkcs1_v15_padding ( uint8_t *  em,
size_t  em_len,
const uint8_t *  m,
size_t  m_len,
const uint8_t *  seed,
size_t  s_len 
)

#include <crypto/nrf_oberon/include/ocrypto_rsa_padding.h>

RSA PKCS1 V1.5 padding.

Parameters
[out]emThe padded message.
em_lenLength of em.
mThe message to be padded.
m_lenLength of m. 0 <= m_len <= em_len - 11.
seedThe random seed to be used for the padding.
s_lenLength of seed. s_len >= em_len - 3 - m_len
Return values
-1If the message is too long (m_len > em_len - 11).
-2If the seed is too short (s_len < em_len - 3 - m_len).
0On success.
Remarks
The seed should consist of non-zero random bytes.