From cc83158ccc1b9f204e6dd0b56a1bbb6155a99439 Mon Sep 17 00:00:00 2001 From: jeffro256 Date: Mon, 7 Apr 2025 14:50:08 -0500 Subject: [PATCH] unit tests/crypto: test genesis output for torsion --- tests/unit_tests/crypto.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/unit_tests/crypto.cpp b/tests/unit_tests/crypto.cpp index 3299924..c2c0276 100644 --- a/tests/unit_tests/crypto.cpp +++ b/tests/unit_tests/crypto.cpp @@ -312,3 +312,13 @@ TEST(Crypto, tree_branch) } } } + +TEST(Crypto, genesis_tx_output_torsion) +{ + rct::key k; + // see config::GENESIS_TX + epee::string_tools::hex_to_pod("9b2e4c0281c0b02e7c53291a94d1d0cbff8883f8024f5142ee494ffbbd088071", k); + ge_p3 x; + ASSERT_EQ(ge_frombytes_vartime(&x, k.bytes), 0); + EXPECT_FALSE(rct::isInMainSubgroup(k)); +}