1
2
3
4
5
6
7
8
9typedef struct {
10 pstm_int e, d, N, qP, dP, dQ, p, q;
11 uint32 size;
12 int32 optimized;
13
14} psRsaKey_t;
15
16static ALWAYS_INLINE void psRsaKey_clear(psRsaKey_t *key)
17{
18 pstm_clear(&key->N);
19 pstm_clear(&key->e);
20 pstm_clear(&key->d);
21 pstm_clear(&key->p);
22 pstm_clear(&key->q);
23 pstm_clear(&key->dP);
24 pstm_clear(&key->dQ);
25 pstm_clear(&key->qP);
26}
27
28#define psRsaEncryptPub(pool, key, in, inlen, out, outlen, data) \
29 psRsaEncryptPub( key, in, inlen, out, outlen)
30int32 psRsaEncryptPub(psPool_t *pool, psRsaKey_t *key,
31 unsigned char *in, uint32 inlen,
32 unsigned char *out, uint32 outlen, void *data) FAST_FUNC;
33