Introduce the complete point addition formulas to short-weierstrass

This commit is contained in:
Luke Parker
2025-08-28 23:16:16 -04:00
parent 62bb75e09a
commit beac35c119
4 changed files with 79 additions and 14 deletions

View File

@@ -37,6 +37,7 @@ impl ShortWeierstrass for Embedwards25519 {
const B: FieldElement = FieldElement(DalekScalar::from_bits(hex_literal::hex!(
"5f07603a853f20370b682036210d463e64903a23ea669d07ca26cfc13f594209"
)));
const PRIME_ORDER: bool = true;
const GENERATOR: Affine<Self> = Affine::from_xy_unchecked(
FieldElement::ONE,
FieldElement(DalekScalar::from_bits(hex_literal::hex!(

View File

@@ -47,6 +47,7 @@ impl ShortWeierstrass for Secq256k1 {
let six = four.add(&two);
six.add(&FieldElement::ONE)
};
const PRIME_ORDER: bool = true;
const GENERATOR: Affine<Self> = Affine::from_xy_unchecked(FieldElement::ONE, {
let y_be =
hex_literal::hex!("0c7c97045a2074634909abdf82c9bd0248916189041f2af0c1b800d1ffc278c0");