mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-31 02:51:26 +00:00
CR50: point multiply should check point for curve membership
_cpri__EccPointMultiply should check whether the provided point is on the curve prior to doing a multiply. BRANCH=none BUG=chrome-os-partner:43025,chrome-os-partner:47524 TEST=TCG test CPCTPM_TC2_4_13_01_01 passes Change-Id: Ia92494070c62f7e03b395975138c0c8446a7284d Signed-off-by: nagendra modadugu <ngm@google.com> Reviewed-on: https://chromium-review.googlesource.com/341112 Commit-Ready: Nagendra Modadugu <ngm@google.com> Tested-by: Nagendra Modadugu <ngm@google.com> Reviewed-by: Marius Schilder <mschilder@chromium.org>
This commit is contained in:
committed by
chrome-bot
parent
61e0653261
commit
b2280c24b4
@@ -75,7 +75,9 @@ CRYPT_RESULT _cpri__EccPointMultiply(
|
||||
return CRYPT_PARAMETER;
|
||||
if (n1 != NULL && !check_p256_param(n1))
|
||||
return CRYPT_PARAMETER;
|
||||
if (in != NULL && !check_p256_point(in))
|
||||
if (in != NULL &&
|
||||
(!check_p256_point(in) ||
|
||||
!_cpri__EccIsPointOnCurve(curve_id, in)))
|
||||
return CRYPT_POINT;
|
||||
if (n2 != NULL && !check_p256_param(n2))
|
||||
return CRYPT_PARAMETER;
|
||||
|
||||
Reference in New Issue
Block a user