From c4660fe5e687155d9b98f07d1f212a61280b55e5 Mon Sep 17 00:00:00 2001 From: "Abdel @ StarkWare" Date: Mon, 5 Aug 2024 12:56:19 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=A7=20step1=5Falice?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core.cairo | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/core.cairo b/src/core.cairo index 2d10b34..f848e58 100644 --- a/src/core.cairo +++ b/src/core.cairo @@ -28,12 +28,8 @@ fn domain_separator() -> ByteArray { /// # Returns /// - The blinded message. pub fn step1_alice(secret_msg: ByteArray, blinding_factor: Secp256k1Point) -> Secp256k1Point { - let maybe_Y = hash_to_curve(secret_msg); - if maybe_Y.is_none() { - panic!("Failed to hash to curve"); - } - let B_ = Secp256Trait::::get_generator_point(); - B_ + let Y = hash_to_curve(secret_msg).expect('ERR_HASH_TO_CURVE'); + Y.add(blinding_factor).unwrap() }