Fixed computing of intermediate buffer size for maximum-size RSA keys.
This commit is contained in:
parent
6433cc2e9d
commit
87a796dd69
2 changed files with 2 additions and 2 deletions
|
|
@ -28,7 +28,7 @@
|
||||||
size_t
|
size_t
|
||||||
br_rsa_i15_compute_modulus(void *n, const br_rsa_private_key *sk)
|
br_rsa_i15_compute_modulus(void *n, const br_rsa_private_key *sk)
|
||||||
{
|
{
|
||||||
uint16_t tmp[2 * ((BR_MAX_RSA_SIZE + 14) / 15) + 5];
|
uint16_t tmp[4 * (((BR_MAX_RSA_SIZE / 2) + 14) / 15) + 5];
|
||||||
uint16_t *t, *p, *q;
|
uint16_t *t, *p, *q;
|
||||||
const unsigned char *pbuf, *qbuf;
|
const unsigned char *pbuf, *qbuf;
|
||||||
size_t nlen, plen, qlen, tlen;
|
size_t nlen, plen, qlen, tlen;
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@
|
||||||
size_t
|
size_t
|
||||||
br_rsa_i31_compute_modulus(void *n, const br_rsa_private_key *sk)
|
br_rsa_i31_compute_modulus(void *n, const br_rsa_private_key *sk)
|
||||||
{
|
{
|
||||||
uint32_t tmp[2 * ((BR_MAX_RSA_SIZE + 30) / 31) + 5];
|
uint32_t tmp[4 * (((BR_MAX_RSA_SIZE / 2) + 30) / 31) + 5];
|
||||||
uint32_t *t, *p, *q;
|
uint32_t *t, *p, *q;
|
||||||
const unsigned char *pbuf, *qbuf;
|
const unsigned char *pbuf, *qbuf;
|
||||||
size_t nlen, plen, qlen, tlen;
|
size_t nlen, plen, qlen, tlen;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue