You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
trivial math attacks, and not super slow. The \textit{key} parameter is where the constructed key is placed. All keys must be at
4327
4327
least 128 bytes, and no more than 512 bytes in size (\textit{that is from 1024 to 4096 bits}).
4328
4328
4329
+
\index{rsa\_make\_key\_ubin\_e()}
4330
+
\begin{verbatim}
4331
+
int rsa_make_key_ubin_e(
4332
+
prng_state *prng,
4333
+
int wprng,
4334
+
int size,
4335
+
const unsigned char *e,
4336
+
unsigned long elen,
4337
+
rsa_key *key);
4338
+
\end{verbatim}
4339
+
4340
+
Where \textit{wprng} is the index into the PRNG descriptor array. The \textit{size} parameter is the size in bytes of the RSA modulus desired.
4341
+
The \textit{e} parameter is the hexadecimal buffer of the encryption exponent desired, from 3 upto 255 bits value. Stick with 65537 since it is big enough
4342
+
to prevent trivial math attacks, and not super slow. The \textit{elen} parameter is the size in bytes of the encryption exponent \textit{e}.
4343
+
The \textit{key} parameter is where the constructed key is placed. All keys must be at
4344
+
least 128 bytes, and no more than 512 bytes in size (\textit{that is from 1024 to 4096 bits}).
4345
+
4329
4346
\index{rsa\_free()}
4330
-
Note: the \textit{rsa\_make\_key()} function allocates memory at run--time when you make the key. Make sure to call
4331
-
\textit{rsa\_free()} (see below) when you are finished with the key. If \textit{rsa\_make\_key()} fails it will automatically
4332
-
free the memory allocated.
4347
+
Note: the \textit{rsa\_make\_key()} and \textit{rsa\_make\_key\_ubin\_e()} functions allocates memory at run--time when you make the key.
4348
+
Make sure to call \textit{rsa\_free()} (see below) when you are finished with the key. If \textit{rsa\_make\_key()} or \textit{rsa\_make\_key\_ubin\_e()}
4349
+
fails it will automatically free the memory allocated.
4333
4350
4334
4351
\index{PK\_PRIVATE} \index{PK\_PUBLIC}
4335
4352
There are two types of RSA keys. The types are {\bf PK\_PRIVATE} and {\bf PK\_PUBLIC}. The first type is a private
0 commit comments