瀏覽代碼

Set output coordinates' |neg| field in |ecp_nistz256_get_affine|.

The result would not be correct if, on input, |x->neg != 0| or
|y->neg != 0|.

Change-Id: I645566a78c2e18e42492fbfca1df17baa05240f7
Reviewed-on: https://boringssl-review.googlesource.com/7587
Reviewed-by: David Benjamin <davidben@google.com>
kris/onging/CECPQ3_patch15
Brian Smith 8 年之前
committed by David Benjamin
父節點
當前提交
d860b7b1cd
共有 1 個檔案被更改,包括 2 行新增0 行删除
  1. +2
    -0
      crypto/ec/p256-x86_64.c

+ 2
- 0
crypto/ec/p256-x86_64.c 查看文件

@@ -528,6 +528,7 @@ static int ecp_nistz256_get_affine(const EC_GROUP *group, const EC_POINT *point,
return 0;
}
x->top = P256_LIMBS;
x->neg = 0;
ecp_nistz256_from_mont(x->d, x_aff);
bn_correct_top(x);
}
@@ -540,6 +541,7 @@ static int ecp_nistz256_get_affine(const EC_GROUP *group, const EC_POINT *point,
return 0;
}
y->top = P256_LIMBS;
y->neg = 0;
ecp_nistz256_from_mont(y->d, y_aff);
bn_correct_top(y);
}


Loading…
取消
儲存