mirror of
https://github.com/wownero/wownero.git
synced 2026-11-22 08:34:03 +01:00
+3









j-berman
jeffro256
Luke Parker
Lee *!* Clagett
SyntheticBird45
jeetrex17
UkoeHB
MrCyjaneK
tobtoht
selsta
Thomas
navidR
Boog900
a9145f9d38
Co-authored-by: jeffro256 <jeffro256@tutanota.com> Co-authored-by: Luke Parker <lukeparker5132@gmail.com> Co-authored-by: Lee *!* Clagett <code@leeclagett.com> Co-authored-by: SyntheticBird45 <someoneelse.is_on.github.rio7x@simplelogin.com> Co-authored-by: jeetrex17 <jeetrex@tutamail.com> Co-authored-by: UkoeHB <ukoehb@users.noreply.github.com> Co-authored-by: MrCyjaneK Co-authored-by: tobtoht Co-authored-by: selsta Co-authored-by: Thomas <thomas.giudici@proton.me> Co-authored-by: navidR Co-authored-by: Boog900 <boog900@tutanota.com>
72 lines
2.9 KiB
C++
72 lines
2.9 KiB
C++
// Copyright (c) 2025-2026, The Monero Project
|
|
//
|
|
// All rights reserved.
|
|
//
|
|
// Redistribution and use in source and binary forms, with or without modification, are
|
|
// permitted provided that the following conditions are met:
|
|
//
|
|
// 1. Redistributions of source code must retain the above copyright notice, this list of
|
|
// conditions and the following disclaimer.
|
|
//
|
|
// 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
|
// of conditions and the following disclaimer in the documentation and/or other
|
|
// materials provided with the distribution.
|
|
//
|
|
// 3. Neither the name of the copyright holder nor the names of its contributors may be
|
|
// used to endorse or promote products derived from this software without specific
|
|
// prior written permission.
|
|
//
|
|
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
|
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
|
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
|
// THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
|
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
|
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
|
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
#pragma once
|
|
|
|
//local headers
|
|
#include "output_opening_types.h"
|
|
|
|
//third party headers
|
|
|
|
//standard headers
|
|
|
|
//forward declarations
|
|
|
|
namespace carrot
|
|
{
|
|
/**
|
|
* @brief Interface to request key images, given enote opening hints
|
|
*/
|
|
struct key_image_device
|
|
{
|
|
/**
|
|
* @brief Derive a key image for an enote, given its opening hint
|
|
* @param opening_hint -
|
|
* @return L = x Hp(O) given O and some x s.t. O = x G + y T
|
|
*
|
|
* The _implementor_ is expected to validate that this enote passes the burning bug check, Janus check, etc.
|
|
*/
|
|
virtual crypto::key_image derive_key_image(const OutputOpeningHintVariant &opening_hint) const = 0;
|
|
|
|
/**
|
|
* @brief Derive a key image for an enote, given it's sender opening and address index
|
|
* @param sender_extension_g k^g_o
|
|
* @param onetime_address K_o
|
|
* @param subaddr_index j
|
|
* @param use_biased true if should use biased hash-to-point function
|
|
* @return L = x Hp(K_o) given K_o and some x s.t. K_o = x G + y T
|
|
*
|
|
* The _caller_ is expected to validate that this enote passes the burning bug check, Janus check, etc.
|
|
*/
|
|
virtual crypto::key_image derive_key_image_prescanned(const crypto::secret_key &sender_extension_g,
|
|
const crypto::public_key &onetime_address,
|
|
const subaddress_index_extended &subaddr_index,
|
|
const bool use_biased) const = 0;
|
|
};
|
|
} //namespace carrot
|