forked from wolfSSL/wolfssl
Merge pull request #5702 from haydenroche5/ecc_nb_shared_secret_fix
Fix output length bug in SP non-blocking ECC shared secret gen.
This commit is contained in:
@ -92096,7 +92096,7 @@ int sp_ecc_secret_gen_384_nb(sp_ecc_ctx_t* sp_ctx, const mp_int* priv,
|
||||
&ctx->point, &ctx->point, ctx->k, 1, 1, heap);
|
||||
if (err == MP_OKAY) {
|
||||
sp_384_to_bin_12(ctx->point.x, out);
|
||||
*outLen = 32;
|
||||
*outLen = 48;
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -119525,7 +119525,7 @@ int sp_ecc_secret_gen_521_nb(sp_ecc_ctx_t* sp_ctx, const mp_int* priv,
|
||||
&ctx->point, &ctx->point, ctx->k, 1, 1, heap);
|
||||
if (err == MP_OKAY) {
|
||||
sp_521_to_bin_17(ctx->point.x, out);
|
||||
*outLen = 32;
|
||||
*outLen = 66;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -65863,7 +65863,7 @@ int sp_ecc_secret_gen_384_nb(sp_ecc_ctx_t* sp_ctx, const mp_int* priv,
|
||||
&ctx->point, &ctx->point, ctx->k, 1, 1, heap);
|
||||
if (err == MP_OKAY) {
|
||||
sp_384_to_bin_6(ctx->point.x, out);
|
||||
*outLen = 32;
|
||||
*outLen = 48;
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -110869,7 +110869,7 @@ int sp_ecc_secret_gen_521_nb(sp_ecc_ctx_t* sp_ctx, const mp_int* priv,
|
||||
&ctx->point, &ctx->point, ctx->k, 1, 1, heap);
|
||||
if (err == MP_OKAY) {
|
||||
sp_521_to_bin_9(ctx->point.x, out);
|
||||
*outLen = 32;
|
||||
*outLen = 66;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -115081,7 +115081,7 @@ int sp_ecc_secret_gen_384_nb(sp_ecc_ctx_t* sp_ctx, const mp_int* priv,
|
||||
&ctx->point, &ctx->point, ctx->k, 1, 1, heap);
|
||||
if (err == MP_OKAY) {
|
||||
sp_384_to_bin_12(ctx->point.x, out);
|
||||
*outLen = 32;
|
||||
*outLen = 48;
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -129544,7 +129544,7 @@ int sp_ecc_secret_gen_521_nb(sp_ecc_ctx_t* sp_ctx, const mp_int* priv,
|
||||
&ctx->point, &ctx->point, ctx->k, 1, 1, heap);
|
||||
if (err == MP_OKAY) {
|
||||
sp_521_to_bin_17(ctx->point.x, out);
|
||||
*outLen = 32;
|
||||
*outLen = 66;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -33221,7 +33221,7 @@ int sp_ecc_secret_gen_384_nb(sp_ecc_ctx_t* sp_ctx, const mp_int* priv,
|
||||
&ctx->point, &ctx->point, ctx->k, 1, 1, heap);
|
||||
if (err == MP_OKAY) {
|
||||
sp_384_to_bin_15(ctx->point.x, out);
|
||||
*outLen = 32;
|
||||
*outLen = 48;
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -41321,7 +41321,7 @@ int sp_ecc_secret_gen_521_nb(sp_ecc_ctx_t* sp_ctx, const mp_int* priv,
|
||||
&ctx->point, &ctx->point, ctx->k, 1, 1, heap);
|
||||
if (err == MP_OKAY) {
|
||||
sp_521_to_bin_21(ctx->point.x, out);
|
||||
*outLen = 32;
|
||||
*outLen = 66;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -33569,7 +33569,7 @@ int sp_ecc_secret_gen_384_nb(sp_ecc_ctx_t* sp_ctx, const mp_int* priv,
|
||||
&ctx->point, &ctx->point, ctx->k, 1, 1, heap);
|
||||
if (err == MP_OKAY) {
|
||||
sp_384_to_bin_7(ctx->point.x, out);
|
||||
*outLen = 32;
|
||||
*outLen = 48;
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -40989,7 +40989,7 @@ int sp_ecc_secret_gen_521_nb(sp_ecc_ctx_t* sp_ctx, const mp_int* priv,
|
||||
&ctx->point, &ctx->point, ctx->k, 1, 1, heap);
|
||||
if (err == MP_OKAY) {
|
||||
sp_521_to_bin_9(ctx->point.x, out);
|
||||
*outLen = 32;
|
||||
*outLen = 66;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -30337,7 +30337,7 @@ int sp_ecc_secret_gen_384_nb(sp_ecc_ctx_t* sp_ctx, const mp_int* priv,
|
||||
&ctx->point, &ctx->point, ctx->k, 1, 1, heap);
|
||||
if (err == MP_OKAY) {
|
||||
sp_384_to_bin_12(ctx->point.x, out);
|
||||
*outLen = 32;
|
||||
*outLen = 48;
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -38801,7 +38801,7 @@ int sp_ecc_secret_gen_521_nb(sp_ecc_ctx_t* sp_ctx, const mp_int* priv,
|
||||
&ctx->point, &ctx->point, ctx->k, 1, 1, heap);
|
||||
if (err == MP_OKAY) {
|
||||
sp_521_to_bin_17(ctx->point.x, out);
|
||||
*outLen = 32;
|
||||
*outLen = 66;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -49849,7 +49849,7 @@ int sp_ecc_secret_gen_384_nb(sp_ecc_ctx_t* sp_ctx, const mp_int* priv,
|
||||
&ctx->point, &ctx->point, ctx->k, 1, 1, heap);
|
||||
if (err == MP_OKAY) {
|
||||
sp_384_to_bin_6(ctx->point.x, out);
|
||||
*outLen = 32;
|
||||
*outLen = 48;
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -90894,7 +90894,7 @@ int sp_ecc_secret_gen_521_nb(sp_ecc_ctx_t* sp_ctx, const mp_int* priv,
|
||||
&ctx->point, &ctx->point, ctx->k, 1, 1, heap);
|
||||
if (err == MP_OKAY) {
|
||||
sp_521_to_bin_9(ctx->point.x, out);
|
||||
*outLen = 32;
|
||||
*outLen = 66;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
Reference in New Issue
Block a user