From ebd8774d90b6021080e7c67e6fcb158944fc9383 Mon Sep 17 00:00:00 2001 From: Weikeng Chen Date: Thu, 12 Nov 2020 01:20:16 -0800 Subject: [PATCH] Include infinity bit in ToConstraintField for SW curves Related to https://github.com/scipr-lab/zexe/pull/284 --- ec/src/models/short_weierstrass_jacobian.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ec/src/models/short_weierstrass_jacobian.rs b/ec/src/models/short_weierstrass_jacobian.rs index f507e13b8..25cd0e31b 100644 --- a/ec/src/models/short_weierstrass_jacobian.rs +++ b/ec/src/models/short_weierstrass_jacobian.rs @@ -807,7 +807,9 @@ where fn to_field_elements(&self) -> Option> { let mut x_fe = self.x.to_field_elements()?; let y_fe = self.y.to_field_elements()?; + let infinity_fe = self.infinity.to_field_elements()?; x_fe.extend_from_slice(&y_fe); + x_fe.extend_from_slice(&infinity_fe); Some(x_fe) } }