Skip to content

Commit

Permalink
Regression fix: Projective constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
volhovm committed Sep 11, 2024
1 parent 91750cd commit f8e2e1a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/lib/crypto/kimchi_bindings/stubs/src/projective.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ macro_rules! impl_projective {
#[ocaml_gen::func]
#[ocaml::func]
pub fn [<caml_ $name:snake _of_affine_coordinates>](x: $CamlBaseField, y: $CamlBaseField) -> $GroupProjective {
let res = $Projective::new(x.into(), y.into(), <$BaseField as ark_ff::One>::one());
let res = $Projective::new_unchecked(x.into(), y.into(), <$BaseField as ark_ff::One>::one());
res.into()
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ pub fn caml_pasta_pallas_of_affine(x: &WasmPallasGAffine) -> WasmPallasGProjecti
#[wasm_bindgen]
pub fn caml_pasta_pallas_of_affine_coordinates(x: WasmPastaFp, y: WasmPastaFp) -> WasmPallasGProjective {
GProjective::new(x.0, y.0, Fp::one()).into()
GProjective::new_unchecked(x.0, y.0, Fp::one()).into()
}
#[wasm_bindgen]
Expand Down
2 changes: 1 addition & 1 deletion src/lib/crypto/kimchi_bindings/wasm/src/projective.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ macro_rules! impl_projective {

#[wasm_bindgen]
pub fn [<caml_ $name:snake _of_affine_coordinates>](x: $CamlBaseField, y: $CamlBaseField) -> $GroupProjective {
let res = $Projective::new(x.into(), y.into(), <$BaseField as ark_ff::One>::one());
let res = $Projective::new_unchecked(x.into(), y.into(), <$BaseField as ark_ff::One>::one());
res.into()
}

Expand Down

0 comments on commit f8e2e1a

Please sign in to comment.