Skip to content

ProofSystem/include/ProofSystem/ext_private_key.hpp

Extented private key class header file. More...

Namespaces

Name
nil
nil::crypto3
nil::crypto3::pubkey

Classes

Name
struct nil::crypto3::pubkey::ext_private_key< ecdsa< CurveType, Padding, GeneratorType, DistributionType >, typename std::enable_if< std::is_same< GeneratorType, random::rfc6979< typename CurveType::scalar_field_type::value_type, typename ecdsa< CurveType, Padding, GeneratorType, DistributionType >::hash_type > >::value >::type >
Extended private key class with deterministic generator and operator modifications.

Detailed Description

Extented private key class header file.

Date: 2023-12-16 Super Genius ([email protected]) Henrique A. Klein ([email protected])

Source code

#ifndef PROOFSYSTEM_EXT_PRIVATE_KEY_HPP
#define PROOFSYSTEM_EXT_PRIVATE_KEY_HPP

#include <nil/crypto3/pubkey/ecdsa.hpp>

namespace nil
{
    namespace crypto3
    {
        namespace pubkey
        {
            template <typename Scheme, typename = void>
            struct ext_private_key;

            template <typename CurveType, typename Padding, typename GeneratorType, typename DistributionType>
            struct ext_private_key<
                ecdsa<CurveType, Padding, GeneratorType, DistributionType>,
                typename std::enable_if<std::is_same<
                    GeneratorType, random::rfc6979<typename CurveType::scalar_field_type::value_type,
                                                   typename ecdsa<CurveType, Padding, GeneratorType, DistributionType>::hash_type>>::value>::type> :
                public private_key<ecdsa<CurveType, Padding, GeneratorType, DistributionType>>
            {
                using private_key<ecdsa<CurveType, Padding, GeneratorType, DistributionType>>::private_key;


                public_key<ecdsa<CurveType, Padding, GeneratorType, DistributionType>>
                operator*( const public_key<ecdsa<CurveType, Padding, GeneratorType, DistributionType>> &lhs ) const
                {
                    return lhs.pubkey_data() * this->privkey;
                }
            };
        }
    }
}
#endif //PROOFSYSTEM_EXT_PRIVATE_KEY_HPP

Updated on 2026-03-04 at 13:10:44 -0800