forked from wolfSSL/wolfssl
fix code format, only spaces added, no code has been modified.
This commit is contained in:
@ -3065,7 +3065,8 @@ static int accel_fp_mul(int idx, mp_int* k, ecc_point *R, mp_int* modulus,
|
||||
|
||||
/* double if not first */
|
||||
if (!first) {
|
||||
if ((err = ecc_projective_dbl_point(R, R, modulus, mp)) != MP_OKAY) {
|
||||
if ((err = ecc_projective_dbl_point(R, R, modulus,
|
||||
mp)) != MP_OKAY) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -3285,7 +3286,8 @@ static int accel_fp_mul2add(int idx1, int idx2,
|
||||
|
||||
/* double if not first */
|
||||
if (!first) {
|
||||
if ((err = ecc_projective_dbl_point(R, R, modulus, mp)) != MP_OKAY) {
|
||||
if ((err = ecc_projective_dbl_point(R, R, modulus,
|
||||
mp)) != MP_OKAY) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -3316,8 +3318,8 @@ static int accel_fp_mul2add(int idx1, int idx2,
|
||||
}
|
||||
if (zB && first == 0) {
|
||||
if (zB) {
|
||||
if ((err = ecc_projective_add_point(R, fp_cache[idx2].LUT[zB],
|
||||
R, modulus, mp)) != MP_OKAY){
|
||||
if ((err = ecc_projective_add_point(R,
|
||||
fp_cache[idx2].LUT[zB], R, modulus, mp)) != MP_OKAY){
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -3904,7 +3906,8 @@ int ecc_encrypt(ecc_key* privKey, ecc_key* pubKey, const byte* msg,
|
||||
switch (ctx->kdfAlgo) {
|
||||
case ecHKDF_SHA256 :
|
||||
ret = HKDF(SHA256, sharedSecret, sharedSz, ctx->kdfSalt,
|
||||
ctx->kdfSaltSz, ctx->kdfInfo, ctx->kdfInfoSz, keys, keysLen);
|
||||
ctx->kdfSaltSz, ctx->kdfInfo, ctx->kdfInfoSz,
|
||||
keys, keysLen);
|
||||
break;
|
||||
|
||||
default:
|
||||
@ -3922,7 +3925,8 @@ int ecc_encrypt(ecc_key* privKey, ecc_key* pubKey, const byte* msg,
|
||||
case ecAES_128_CBC:
|
||||
{
|
||||
Aes aes;
|
||||
ret = AesSetKey(&aes, encKey,KEY_SIZE_128,encIv,AES_ENCRYPTION);
|
||||
ret = AesSetKey(&aes, encKey, KEY_SIZE_128, encIv,
|
||||
AES_ENCRYPTION);
|
||||
if (ret != 0)
|
||||
break;
|
||||
ret = AesCbcEncrypt(&aes, out, msg, msgSz);
|
||||
@ -4054,7 +4058,8 @@ int ecc_decrypt(ecc_key* privKey, ecc_key* pubKey, const byte* msg,
|
||||
switch (ctx->kdfAlgo) {
|
||||
case ecHKDF_SHA256 :
|
||||
ret = HKDF(SHA256, sharedSecret, sharedSz, ctx->kdfSalt,
|
||||
ctx->kdfSaltSz, ctx->kdfInfo, ctx->kdfInfoSz, keys, keysLen);
|
||||
ctx->kdfSaltSz, ctx->kdfInfo, ctx->kdfInfoSz,
|
||||
keys, keysLen);
|
||||
break;
|
||||
|
||||
default:
|
||||
@ -4101,7 +4106,8 @@ int ecc_decrypt(ecc_key* privKey, ecc_key* pubKey, const byte* msg,
|
||||
case ecAES_128_CBC:
|
||||
{
|
||||
Aes aes;
|
||||
ret = AesSetKey(&aes, encKey,KEY_SIZE_128,encIv,AES_DECRYPTION);
|
||||
ret = AesSetKey(&aes, encKey, KEY_SIZE_128, encIv,
|
||||
AES_DECRYPTION);
|
||||
if (ret != 0)
|
||||
break;
|
||||
ret = AesCbcDecrypt(&aes, out, msg, msgSz-digestSz);
|
||||
|
Reference in New Issue
Block a user