From 49972d1e07af42e2a89ec284921d22ace48ac6b1 Mon Sep 17 00:00:00 2001 From: Davide Galassi Date: Sat, 2 Nov 2024 18:54:49 +0100 Subject: [PATCH] Expose padding point from ring context --- src/ring.rs | 6 ++++++ src/suites/bandersnatch.rs | 1 + 2 files changed, 7 insertions(+) diff --git a/src/ring.rs b/src/ring.rs index f125bee..5fe33bb 100644 --- a/src/ring.rs +++ b/src/ring.rs @@ -258,6 +258,12 @@ where ring_proof::ArkTranscript::new(S::SUITE_ID), ) } + + /// Get the padding point. + #[inline(always)] + pub const fn padding_point(&self) -> AffinePoint { + S::PADDING + } } impl CanonicalSerialize for RingContext diff --git a/src/suites/bandersnatch.rs b/src/suites/bandersnatch.rs index 3faec0b..ded9d5f 100644 --- a/src/suites/bandersnatch.rs +++ b/src/suites/bandersnatch.rs @@ -232,6 +232,7 @@ pub mod edwards { #[cfg(test)] suite_tests!(BandersnatchSha512Ell2); + #[cfg(test)] fn check_point(p: AffinePoint) { assert!(p.is_on_curve()); assert!(p.is_in_correct_subgroup_assuming_on_curve());