├── CMakeLists.txt ├── CMakeLists_IOS.txt ├── CONTRIBUTING.md ├── Dockerfile ├── Doxyfile ├── LICENSE ├── Makefile ├── README.i18n.md ├── README.md ├── cmake ├── 32-bit-toolchain.cmake ├── 64-bit-toolchain.cmake ├── CheckLinkerFlag.c ├── CheckLinkerFlag.cmake ├── Doxyfile.in ├── Doxygen.extra.css.in ├── FindBerkeleyDB.cmake ├── FindHIDAPI.cmake ├── FindLibunwind.cmake ├── FindMiniupnpc.cmake ├── FindReadline.cmake ├── FindUnbound.cmake ├── GitVersion.cmake ├── Version.cmake ├── test-static-assert.c └── test-static-assert.cpp ├── contrib ├── CMakeLists.txt ├── codefresh │ └── codefresh.yml ├── depends │ ├── Makefile │ ├── README.md │ ├── builders │ │ ├── darwin.mk │ │ ├── default.mk │ │ └── linux.mk │ ├── config.guess │ ├── config.site.in │ ├── config.sub │ ├── description.md │ ├── funcs.mk │ ├── hosts │ │ ├── darwin.mk │ │ ├── default.mk │ │ ├── linux.mk │ │ └── mingw32.mk │ ├── packages.md │ ├── packages │ │ ├── bdb.mk │ │ ├── boost.mk │ │ ├── cmake │ │ │ ├── conf │ │ │ │ ├── mxe-conf.cmake.in │ │ │ │ └── target-cmake.in │ │ │ └── test │ │ │ │ └── CMakeLists.txt │ │ ├── cppzmq.mk │ │ ├── eudev.mk │ │ ├── expat.mk │ │ ├── graphviz.mk │ │ ├── gtest.mk │ │ ├── hidapi.mk │ │ ├── icu4c.mk │ │ ├── ldns.mk │ │ ├── libICE.mk │ │ ├── libSM.mk │ │ ├── libevent.mk │ │ ├── libiconv.mk │ │ ├── libusb.mk │ │ ├── miniupnpc.mk │ │ ├── native_biplist.mk │ │ ├── native_ccache.mk │ │ ├── native_cctools.mk │ │ ├── native_cdrkit.mk │ │ ├── native_cmake-unused.mk │ │ ├── native_ds_store.mk │ │ ├── native_libdmg-hfsplus.mk │ │ ├── native_mac_alias.mk │ │ ├── openssl.mk │ │ ├── packages.mk │ │ ├── protobuf.mk │ │ ├── qt.mk │ │ ├── readline.mk │ │ ├── sodium-darwin.mk │ │ ├── sodium.mk │ │ ├── unbound.mk │ │ ├── unwind.mk │ │ ├── xproto.mk │ │ ├── zeromq.mk │ │ └── zlib.mk │ ├── patches │ │ ├── cmake │ │ │ └── cmake-1-fixes.patch │ │ ├── icu4c │ │ │ └── icu-001-dont-build-static-dynamic-twice.patch │ │ ├── libiconv │ │ │ └── fix-whitespace.patch │ │ ├── native_biplist │ │ │ └── sorted_list.patch │ │ ├── native_cdrkit │ │ │ └── cdrkit-deterministic.patch │ │ ├── native_mac_alias │ │ │ └── python3.patch │ │ ├── qt │ │ │ ├── fix_qt_pkgconfig.patch │ │ │ ├── pidlist_absolute.patch │ │ │ └── qfixed-coretext.patch │ │ ├── readline │ │ │ └── readline-1.patch │ │ ├── sodium │ │ │ └── fix-whitespace.patch │ │ └── zeromq │ │ │ ├── 9114d3957725acd34aa8b8d011585812f3369411.patch │ │ │ └── 9e6745c12e0b100cd38acecc16ce7db02905e27c.patch │ ├── protobuf.mk │ └── toolchain.cmake.in ├── epee │ ├── CMakeLists.txt │ ├── LICENSE.txt │ ├── README.md │ ├── demo │ │ ├── CMakeLists.txt │ │ ├── README.txt │ │ ├── demo_http_server │ │ │ ├── stdafx.cpp │ │ │ ├── stdafx.h │ │ │ └── targetver.h │ │ ├── demo_levin_server │ │ │ ├── stdafx.cpp │ │ │ ├── stdafx.h │ │ │ └── targetver.h │ │ ├── generate_gcc.sh │ │ ├── generate_vc_proj.bat │ │ └── iface │ │ │ └── transport_defs.h │ ├── include │ │ ├── ado_db_helper.h │ │ ├── console_handler.h │ │ ├── copyable_atomic.h │ │ ├── file_io_utils.h │ │ ├── fnv1.h │ │ ├── global_stream_operators.h │ │ ├── gzip_encoding.h │ │ ├── hex.h │ │ ├── hmac-md5.h │ │ ├── include_base_utils.h │ │ ├── math_helper.h │ │ ├── md5_l.h │ │ ├── md5_l.inl │ │ ├── md5global.h │ │ ├── memwipe.h │ │ ├── misc_language.h │ │ ├── misc_log_ex.h │ │ ├── misc_os_dependent.h │ │ ├── mlocker.h │ │ ├── net │ │ │ ├── abstract_tcp_server.h │ │ │ ├── abstract_tcp_server2.h │ │ │ ├── abstract_tcp_server2.inl │ │ │ ├── abstract_tcp_server_cp.h │ │ │ ├── abstract_tcp_server_cp.inl │ │ │ ├── connection_basic.hpp │ │ │ ├── http_auth.h │ │ │ ├── http_base.h │ │ │ ├── http_client.h │ │ │ ├── http_client_base.h │ │ │ ├── http_client_via_api_helper.h │ │ │ ├── http_protocol_handler.h │ │ │ ├── http_protocol_handler.inl │ │ │ ├── http_server_cp.h │ │ │ ├── http_server_cp2.h │ │ │ ├── http_server_handlers_map2.h │ │ │ ├── http_server_impl_base.h │ │ │ ├── http_server_thread_per_connect.h │ │ │ ├── jsonrpc_protocol_handler.h │ │ │ ├── jsonrpc_server_handlers_map.h │ │ │ ├── jsonrpc_server_impl_base.h │ │ │ ├── jsonrpc_structs.h │ │ │ ├── levin_base.h │ │ │ ├── levin_client.h │ │ │ ├── levin_client.inl │ │ │ ├── levin_client_async.h │ │ │ ├── levin_client_async.inl │ │ │ ├── levin_helper.h │ │ │ ├── levin_protocol_handler.h │ │ │ ├── levin_protocol_handler_async.h │ │ │ ├── levin_server_cp.h │ │ │ ├── levin_server_cp2.h │ │ │ ├── local_ip.h │ │ │ ├── multiprotocols_server.h │ │ │ ├── munin_connection_handler.h │ │ │ ├── munin_node_server.h │ │ │ ├── net_helper.h │ │ │ ├── net_parse_helpers.h │ │ │ ├── net_utils_base.h │ │ │ ├── network_throttle-detail.hpp │ │ │ ├── network_throttle.hpp │ │ │ ├── protocol_switcher.h │ │ │ ├── rpc_method_name.h │ │ │ ├── smtp.h │ │ │ ├── smtp.inl │ │ │ └── smtp_helper.h │ │ ├── pragma_comp_defs.h │ │ ├── profile_tools.h │ │ ├── readline_buffer.h │ │ ├── reg_exp_definer.h │ │ ├── reg_utils.h │ │ ├── rolling_median.h │ │ ├── serialization │ │ │ ├── enableable.h │ │ │ ├── keyvalue_serialization.h │ │ │ ├── keyvalue_serialization_overloads.h │ │ │ └── serialize_base.h │ │ ├── service_impl_base.h │ │ ├── sha1.h │ │ ├── sha1.inl │ │ ├── soci_helper.h │ │ ├── span.h │ │ ├── static_initializer.h │ │ ├── storages │ │ │ ├── crypted_storage.h │ │ │ ├── gzipped_inmemstorage.h │ │ │ ├── http_abstract_invoke.h │ │ │ ├── levin_abstract_invoke2.h │ │ │ ├── parserse_base_utils.h │ │ │ ├── portable_storage.h │ │ │ ├── portable_storage_base.h │ │ │ ├── portable_storage_from_bin.h │ │ │ ├── portable_storage_from_json.h │ │ │ ├── portable_storage_template_helper.h │ │ │ ├── portable_storage_to_bin.h │ │ │ ├── portable_storage_to_json.h │ │ │ └── portable_storage_val_converters.h │ │ ├── string_coding.h │ │ ├── string_tools.h │ │ ├── syncobj.h │ │ ├── time_helper.h │ │ ├── tiny_ini.h │ │ ├── to_nonconst_iterator.h │ │ ├── warnings.h │ │ ├── winobj.h │ │ ├── wipeable_string.h │ │ └── zlib_helper.h │ ├── src │ │ ├── CMakeLists.txt │ │ ├── connection_basic.cpp │ │ ├── hex.cpp │ │ ├── http_auth.cpp │ │ ├── memwipe.c │ │ ├── mlocker.cpp │ │ ├── mlog.cpp │ │ ├── net_utils_base.cpp │ │ ├── network_throttle-detail.cpp │ │ ├── network_throttle.cpp │ │ ├── readline_buffer.cpp │ │ ├── string_tools.cpp │ │ └── wipeable_string.cpp │ └── tests │ │ ├── data │ │ └── storages │ │ │ ├── invalid_storage_1.bin │ │ │ ├── invalid_storage_2.bin │ │ │ ├── invalid_storage_3.bin │ │ │ ├── invalid_storage_4.bin │ │ │ └── valid_storage.bin │ │ ├── generate_vc_proj.bat │ │ └── src │ │ ├── CMakeLists.txt │ │ ├── misc │ │ └── test_math.h │ │ ├── net │ │ └── test_net.h │ │ ├── storages │ │ ├── portable_storages_test.h │ │ └── storage_tests.h │ │ └── tests.cpp ├── fuzz_testing │ └── fuzz.sh ├── gitian │ ├── README.md │ ├── gitian-build.py │ ├── gitian-linux.yml │ ├── gitian-osx.yml │ ├── gitian-win.yml │ └── symbol-check.py ├── rlwrap │ ├── monerocommands_bitmonerod.txt │ └── monerocommands_monero-wallet-cli.txt ├── snap │ ├── monerod-wrapper │ ├── monerod.conf │ ├── setup │ │ └── gui │ │ │ └── icon.png │ └── snapcraft.yaml └── valgrind │ └── monero.supp ├── external ├── CMakeLists.txt ├── boost │ └── archive │ │ ├── portable_binary_archive.hpp │ │ ├── portable_binary_iarchive.hpp │ │ └── portable_binary_oarchive.hpp ├── db_drivers │ ├── CMakeLists.txt │ └── liblmdb │ │ ├── CHANGES │ │ ├── CMakeLists.txt │ │ ├── COPYRIGHT │ │ ├── Doxyfile │ │ ├── LICENSE │ │ ├── Makefile │ │ ├── intro.doc │ │ ├── lmdb.h │ │ ├── mdb.c │ │ ├── mdb_copy.1 │ │ ├── mdb_copy.c │ │ ├── mdb_drop.1 │ │ ├── mdb_drop.c │ │ ├── mdb_dump.1 │ │ ├── mdb_dump.c │ │ ├── mdb_load.1 │ │ ├── mdb_load.c │ │ ├── mdb_stat.1 │ │ ├── mdb_stat.c │ │ ├── midl.c │ │ ├── midl.h │ │ ├── mtest.c │ │ ├── mtest2.c │ │ ├── mtest3.c │ │ ├── mtest4.c │ │ ├── mtest5.c │ │ ├── mtest6.c │ │ ├── sample-bdb.txt │ │ ├── sample-mdb.txt │ │ └── tooltag ├── easylogging++ │ ├── CMakeLists.txt │ ├── ea_config.h │ ├── easylogging++.cc │ └── easylogging++.h └── qrcodegen │ ├── CMakeLists.txt │ ├── QrCode.cpp │ └── QrCode.hpp ├── include ├── INode.h └── IWallet.h ├── snap ├── src ├── CMakeLists.txt ├── blockchain_db │ ├── CMakeLists.txt │ ├── berkeleydb │ │ ├── db_bdb.cpp │ │ └── db_bdb.h │ ├── blockchain_db.cpp │ ├── blockchain_db.h │ ├── db_types.h │ ├── lmdb │ │ ├── db_lmdb.cpp │ │ └── db_lmdb.h │ └── testdb.h ├── blockchain_utilities │ ├── CMakeLists.txt │ ├── README.md │ ├── blockchain_ancestry.cpp │ ├── blockchain_blackball.cpp │ ├── blockchain_depth.cpp │ ├── blockchain_export.cpp │ ├── blockchain_import.cpp │ ├── blockchain_usage.cpp │ ├── blockchain_utilities.h │ ├── blocksdat_file.cpp │ ├── blocksdat_file.h │ ├── bootstrap_file.cpp │ ├── bootstrap_file.h │ └── bootstrap_serialization.h ├── blocks │ ├── CMakeLists.txt │ ├── blocks.cpp │ ├── blocks.h │ ├── checkpoints.dat │ ├── stagenet_blocks.dat │ └── testnet_blocks.dat ├── checkpoints │ ├── CMakeLists.txt │ ├── checkpoints.cpp │ └── checkpoints.h ├── common │ ├── CMakeLists.txt │ ├── aligned.c │ ├── aligned.h │ ├── apply_permutation.h │ ├── base58.cpp │ ├── base58.h │ ├── boost_serialization_helper.h │ ├── combinator.cpp │ ├── combinator.h │ ├── command_line.cpp │ ├── command_line.h │ ├── common_fwd.h │ ├── dns_utils.cpp │ ├── dns_utils.h │ ├── download.cpp │ ├── download.h │ ├── error.cpp │ ├── error.h │ ├── expect.cpp │ ├── expect.h │ ├── http_connection.h │ ├── i18n.cpp │ ├── i18n.h │ ├── int-util.h │ ├── json_util.h │ ├── notify.cpp │ ├── notify.h │ ├── password.cpp │ ├── password.h │ ├── perf_timer.cpp │ ├── perf_timer.h │ ├── pod-class.h │ ├── rpc_client.h │ ├── scoped_message_writer.h │ ├── sfinae_helpers.h │ ├── spawn.cpp │ ├── spawn.h │ ├── stack_trace.cpp │ ├── stack_trace.h │ ├── threadpool.cpp │ ├── threadpool.h │ ├── unordered_containers_boost_serialization.h │ ├── updates.cpp │ ├── updates.h │ ├── util.cpp │ ├── util.h │ └── varint.h ├── crypto │ ├── CMakeLists.txt │ ├── aesb.c │ ├── blake256.c │ ├── blake256.h │ ├── chacha.c │ ├── chacha.h │ ├── crypto-ops-data.c │ ├── crypto-ops.c │ ├── crypto-ops.h │ ├── crypto.cpp │ ├── crypto.h │ ├── crypto_ops_builder │ │ ├── Makefile │ │ ├── README.md │ │ ├── api.h │ │ ├── crypto-ops-data.c │ │ ├── crypto-ops-old.c │ │ ├── crypto-ops.h │ │ ├── crypto_int32.h │ │ ├── crypto_sign.h │ │ ├── crypto_uint32.h │ │ ├── crypto_verify_32.h │ │ ├── ietf.txt │ │ ├── include │ │ │ ├── Makefile.am │ │ │ ├── libsodium_LICENSE │ │ │ ├── sodium.h │ │ │ └── sodium │ │ │ │ ├── crypto_int32.h │ │ │ │ ├── crypto_int64.h │ │ │ │ ├── crypto_uint16.h │ │ │ │ ├── crypto_uint32.h │ │ │ │ ├── crypto_uint64.h │ │ │ │ ├── crypto_uint8.h │ │ │ │ ├── crypto_verify_32.h │ │ │ │ └── randombytes.h │ │ ├── randombytes.c │ │ ├── ref10 │ │ │ ├── Makefile │ │ │ ├── README.md │ │ │ ├── api.h │ │ │ ├── base.h │ │ │ ├── base.py │ │ │ ├── base2.h │ │ │ ├── base2.py │ │ │ ├── d.h │ │ │ ├── d.py │ │ │ ├── d2.h │ │ │ ├── d2.py │ │ │ ├── description │ │ │ ├── designers │ │ │ ├── fe.h │ │ │ ├── fe_0.c │ │ │ ├── fe_1.c │ │ │ ├── fe_add.c │ │ │ ├── fe_cmov.c │ │ │ ├── fe_copy.c │ │ │ ├── fe_frombytes.c │ │ │ ├── fe_invert.c │ │ │ ├── fe_isnegative.c │ │ │ ├── fe_isnonzero.c │ │ │ ├── fe_mul.c │ │ │ ├── fe_neg.c │ │ │ ├── fe_pow22523.c │ │ │ ├── fe_sq.c │ │ │ ├── fe_sq2.c │ │ │ ├── fe_sub.c │ │ │ ├── fe_tobytes.c │ │ │ ├── ge.h │ │ │ ├── ge_add.c │ │ │ ├── ge_add.h │ │ │ ├── ge_add.q │ │ │ ├── ge_double_scalarmult.c │ │ │ ├── ge_frombytes.c │ │ │ ├── ge_madd.c │ │ │ ├── ge_madd.h │ │ │ ├── ge_madd.q │ │ │ ├── ge_msub.c │ │ │ ├── ge_msub.h │ │ │ ├── ge_msub.q │ │ │ ├── ge_p1p1_to_p2.c │ │ │ ├── ge_p1p1_to_p3.c │ │ │ ├── ge_p2_0.c │ │ │ ├── ge_p2_dbl.c │ │ │ ├── ge_p2_dbl.h │ │ │ ├── ge_p2_dbl.q │ │ │ ├── ge_p3_0.c │ │ │ ├── ge_p3_dbl.c │ │ │ ├── ge_p3_to_cached.c │ │ │ ├── ge_p3_to_p2.c │ │ │ ├── ge_p3_tobytes.c │ │ │ ├── ge_precomp_0.c │ │ │ ├── ge_scalarmult_base.c │ │ │ ├── ge_sub.c │ │ │ ├── ge_sub.h │ │ │ ├── ge_sub.q │ │ │ ├── ge_tobytes.c │ │ │ ├── keypair.c │ │ │ ├── open.c │ │ │ ├── pow22523.h │ │ │ ├── pow22523.q │ │ │ ├── pow225521.h │ │ │ ├── pow225521.q │ │ │ ├── q2h.sh │ │ │ ├── sc.h │ │ │ ├── sc_muladd.c │ │ │ ├── sc_reduce.c │ │ │ ├── sign.c │ │ │ ├── sqrtm1.h │ │ │ └── sqrtm1.py │ │ ├── ref10CommentedCombined │ │ │ ├── MakeCryptoOps.py │ │ │ ├── api.h │ │ │ ├── base.h │ │ │ ├── base.py │ │ │ ├── base2.h │ │ │ ├── base2.py │ │ │ ├── crypto-ops.h │ │ │ ├── d.h │ │ │ ├── d.py │ │ │ ├── d2.h │ │ │ ├── d2.py │ │ │ ├── description │ │ │ ├── designers │ │ │ ├── fe.h │ │ │ ├── fe_0.c │ │ │ ├── fe_1.c │ │ │ ├── fe_add.c │ │ │ ├── fe_cmov.c │ │ │ ├── fe_copy.c │ │ │ ├── fe_frombytes.c │ │ │ ├── fe_invert.c │ │ │ ├── fe_isnegative.c │ │ │ ├── fe_isnonzero.c │ │ │ ├── fe_mul.c │ │ │ ├── fe_neg.c │ │ │ ├── fe_pow22523.c │ │ │ ├── fe_sq.c │ │ │ ├── fe_sq2.c │ │ │ ├── fe_sub.c │ │ │ ├── fe_tobytes.c │ │ │ ├── ge.h │ │ │ ├── ge_add.c │ │ │ ├── ge_add.h │ │ │ ├── ge_add.q │ │ │ ├── ge_double_scalarmult.c │ │ │ ├── ge_frombytes.c │ │ │ ├── ge_madd.c │ │ │ ├── ge_madd.h │ │ │ ├── ge_madd.q │ │ │ ├── ge_msub.c │ │ │ ├── ge_msub.h │ │ │ ├── ge_msub.q │ │ │ ├── ge_p1p1_to_p2.c │ │ │ ├── ge_p1p1_to_p3.c │ │ │ ├── ge_p2_0.c │ │ │ ├── ge_p2_dbl.c │ │ │ ├── ge_p2_dbl.h │ │ │ ├── ge_p2_dbl.q │ │ │ ├── ge_p3_0.c │ │ │ ├── ge_p3_dbl.c │ │ │ ├── ge_p3_to_cached.c │ │ │ ├── ge_p3_to_p2.c │ │ │ ├── ge_p3_tobytes.c │ │ │ ├── ge_precomp_0.c │ │ │ ├── ge_scalarmult_base.c │ │ │ ├── ge_sub.c │ │ │ ├── ge_sub.h │ │ │ ├── ge_sub.q │ │ │ ├── ge_tobytes.c │ │ │ ├── keypair.c │ │ │ ├── open.c │ │ │ ├── pow22523.h │ │ │ ├── pow22523.q │ │ │ ├── pow225521.h │ │ │ ├── pow225521.q │ │ │ ├── q2h.sh │ │ │ ├── sc.h │ │ │ ├── sc_muladd.c │ │ │ ├── sc_reduce.c │ │ │ ├── sc_sub.xmr.c │ │ │ ├── scrap.txt │ │ │ ├── sign.c │ │ │ ├── sqrtm1.h │ │ │ ├── sqrtm1.py │ │ │ ├── test.py │ │ │ └── xmrSpecificOld.c │ │ ├── sha512-blocks.c │ │ ├── sha512-hash.c │ │ ├── sha512.h │ │ └── verify.c │ ├── generic-ops.h │ ├── groestl.c │ ├── groestl.h │ ├── groestl_tables.h │ ├── hash-extra-blake.c │ ├── hash-extra-groestl.c │ ├── hash-extra-jh.c │ ├── hash-extra-skein.c │ ├── hash-ops.h │ ├── hash.c │ ├── hash.h │ ├── initializer.h │ ├── jh.c │ ├── jh.h │ ├── k12.c │ ├── k12 │ │ ├── KangarooTwelve.c │ │ ├── KangarooTwelve.h │ │ ├── KeccakP-1600-SnP.h │ │ ├── KeccakP-1600-reference.c │ │ ├── KeccakP-1600-reference.h │ │ ├── KeccakSponge-common.h │ │ ├── KeccakSponge.inc │ │ ├── KeccakSpongeWidth1600.c │ │ ├── KeccakSpongeWidth1600.h │ │ ├── Phases.h │ │ ├── align.h │ │ └── brg_endian.h │ ├── keccak.c │ ├── keccak.h │ ├── oaes_config.h │ ├── oaes_lib.c │ ├── oaes_lib.h │ ├── random.c │ ├── random.h │ ├── skein.c │ ├── skein.h │ ├── skein_port.h │ ├── slow-hash.c │ └── tree-hash.c ├── cryptonote_basic │ ├── CMakeLists.txt │ ├── account.cpp │ ├── account.h │ ├── account_boost_serialization.h │ ├── blobdatatype.h │ ├── connection_context.h │ ├── cryptonote_basic.h │ ├── cryptonote_basic_impl.cpp │ ├── cryptonote_basic_impl.h │ ├── cryptonote_boost_serialization.h │ ├── cryptonote_format_utils.cpp │ ├── cryptonote_format_utils.h │ ├── cryptonote_stat_info.h │ ├── difficulty.cpp │ ├── difficulty.h │ ├── hardfork.cpp │ ├── hardfork.h │ ├── miner.cpp │ ├── miner.h │ ├── subaddress_index.h │ ├── tx_extra.h │ └── verification_context.h ├── cryptonote_config.h ├── cryptonote_core │ ├── CMakeLists.txt │ ├── blockchain.cpp │ ├── blockchain.h │ ├── blockchain_storage_boost_serialization.h │ ├── cryptonote_core.cpp │ ├── cryptonote_core.h │ ├── cryptonote_tx_utils.cpp │ ├── cryptonote_tx_utils.h │ ├── tx_pool.cpp │ └── tx_pool.h ├── cryptonote_protocol │ ├── CMakeLists.txt │ ├── block_queue.cpp │ ├── block_queue.h │ ├── cryptonote_protocol_defs.h │ ├── cryptonote_protocol_handler-base.cpp │ ├── cryptonote_protocol_handler.h │ ├── cryptonote_protocol_handler.inl │ └── cryptonote_protocol_handler_common.h ├── daemon │ ├── CMakeLists.txt │ ├── command_line_args.h │ ├── command_parser_executor.cpp │ ├── command_parser_executor.h │ ├── command_server.cpp │ ├── command_server.h │ ├── core.h │ ├── daemon.cpp │ ├── daemon.h │ ├── executor.cpp │ ├── executor.h │ ├── main.cpp │ ├── p2p.h │ ├── protocol.h │ ├── rpc.h │ ├── rpc_command_executor.cpp │ └── rpc_command_executor.h ├── daemonizer │ ├── CMakeLists.txt │ ├── daemonizer.h │ ├── posix_daemonizer.inl │ ├── posix_fork.cpp │ ├── posix_fork.h │ ├── windows_daemonizer.inl │ ├── windows_service.cpp │ ├── windows_service.h │ └── windows_service_runner.h ├── debug_utilities │ ├── CMakeLists.txt │ ├── cn_deserialize.cpp │ └── object_sizes.cpp ├── device │ ├── CMakeLists.txt │ ├── device.cpp │ ├── device.hpp │ ├── device_default.cpp │ ├── device_default.hpp │ ├── device_io.hpp │ ├── device_io_hid.cpp │ ├── device_io_hid.hpp │ ├── device_ledger.cpp │ ├── device_ledger.hpp │ ├── log.cpp │ └── log.hpp ├── gen_multisig │ ├── CMakeLists.txt │ └── gen_multisig.cpp ├── mnemonics │ ├── CMakeLists.txt │ ├── chinese_simplified.h │ ├── dutch.h │ ├── electrum-words.cpp │ ├── electrum-words.h │ ├── english.h │ ├── english_old.h │ ├── esperanto.h │ ├── french.h │ ├── german.h │ ├── italian.h │ ├── japanese.h │ ├── language_base.h │ ├── lojban.h │ ├── portuguese.h │ ├── russian.h │ ├── singleton.h │ └── spanish.h ├── multisig │ ├── CMakeLists.txt │ ├── multisig.cpp │ └── multisig.h ├── p2p │ ├── CMakeLists.txt │ ├── net_node.cpp │ ├── net_node.h │ ├── net_node.inl │ ├── net_node_common.h │ ├── net_peerlist.h │ ├── net_peerlist_boost_serialization.h │ ├── p2p_protocol_defs.h │ └── stdafx.h ├── platform │ ├── mingw │ │ └── alloca.h │ └── msc │ │ ├── alloca.h │ │ ├── inline_c.h │ │ ├── stdbool.h │ │ └── sys │ │ └── param.h ├── ringct │ ├── CMakeLists.txt │ ├── bulletproofs.cc │ ├── bulletproofs.h │ ├── multiexp.cc │ ├── multiexp.h │ ├── rctCryptoOps.c │ ├── rctCryptoOps.h │ ├── rctOps.cpp │ ├── rctOps.h │ ├── rctSigs.cpp │ ├── rctSigs.h │ ├── rctTypes.cpp │ └── rctTypes.h ├── rpc │ ├── CMakeLists.txt │ ├── core_rpc_server.cpp │ ├── core_rpc_server.h │ ├── core_rpc_server_commands_defs.h │ ├── core_rpc_server_error_codes.h │ ├── daemon_handler.cpp │ ├── daemon_handler.h │ ├── daemon_messages.cpp │ ├── daemon_messages.h │ ├── daemon_rpc_version.h │ ├── instanciations.cpp │ ├── message.cpp │ ├── message.h │ ├── message_data_structs.h │ ├── rpc_args.cpp │ ├── rpc_args.h │ ├── rpc_handler.h │ ├── zmq_server.cpp │ └── zmq_server.h ├── serialization │ ├── CMakeLists.txt │ ├── binary_archive.h │ ├── binary_utils.h │ ├── container.h │ ├── crypto.h │ ├── debug_archive.h │ ├── deque.h │ ├── difficulty_type.h │ ├── json_archive.h │ ├── json_object.cpp │ ├── json_object.h │ ├── json_utils.h │ ├── list.h │ ├── pair.h │ ├── serialization.h │ ├── set.h │ ├── string.h │ ├── unordered_set.h │ ├── variant.h │ └── vector.h ├── simplewallet │ ├── CMakeLists.txt │ ├── simplewallet.cpp │ └── simplewallet.h ├── version.cpp.in ├── version.h └── wallet │ ├── CMakeLists.txt │ ├── api │ ├── CMakeLists.txt │ ├── address_book.cpp │ ├── address_book.h │ ├── common_defines.h │ ├── pending_transaction.cpp │ ├── pending_transaction.h │ ├── subaddress.cpp │ ├── subaddress.h │ ├── subaddress_account.cpp │ ├── subaddress_account.h │ ├── transaction_history.cpp │ ├── transaction_history.h │ ├── transaction_info.cpp │ ├── transaction_info.h │ ├── unsigned_transaction.cpp │ ├── unsigned_transaction.h │ ├── utils.cpp │ ├── wallet.cpp │ ├── wallet.h │ ├── wallet2_api.h │ ├── wallet_manager.cpp │ └── wallet_manager.h │ ├── node_rpc_proxy.cpp │ ├── node_rpc_proxy.h │ ├── ringdb.cpp │ ├── ringdb.h │ ├── trezor_link_flags.txt │ ├── wallet2.cpp │ ├── wallet2.h │ ├── wallet_args.cpp │ ├── wallet_args.h │ ├── wallet_errors.h │ ├── wallet_rpc_server.cpp │ ├── wallet_rpc_server.h │ ├── wallet_rpc_server_commands_defs.h │ └── wallet_rpc_server_error_codes.h ├── tests ├── CMakeLists.txt ├── README.md ├── block_weight │ ├── CMakeLists.txt │ ├── block_weight.cpp │ ├── block_weight.py │ └── compare.py ├── core_proxy │ ├── CMakeLists.txt │ ├── core_proxy.cpp │ └── core_proxy.h ├── core_tests │ ├── CMakeLists.txt │ ├── block_reward.cpp │ ├── block_reward.h │ ├── block_validation.cpp │ ├── block_validation.h │ ├── borromean.cpp │ ├── borromean.h │ ├── bulletproofs.cpp │ ├── bulletproofs.h │ ├── chain_split_1.cpp │ ├── chain_split_1.h │ ├── chain_switch_1.cpp │ ├── chain_switch_1.h │ ├── chaingen.cpp │ ├── chaingen.h │ ├── chaingen001.cpp │ ├── chaingen_main.cpp │ ├── chaingen_tests_list.h │ ├── double_spend.cpp │ ├── double_spend.h │ ├── double_spend.inl │ ├── integer_overflow.cpp │ ├── integer_overflow.h │ ├── multisig.cpp │ ├── multisig.h │ ├── rct.cpp │ ├── rct.h │ ├── ring_signature_1.cpp │ ├── ring_signature_1.h │ ├── transaction_tests.cpp │ ├── transaction_tests.h │ ├── tx_validation.cpp │ ├── tx_validation.h │ ├── v2_tests.cpp │ └── v2_tests.h ├── crypto │ ├── CMakeLists.txt │ ├── crypto-ops-data.c │ ├── crypto-ops.c │ ├── crypto-tests.h │ ├── crypto.cpp │ ├── hash.c │ ├── main.cpp │ ├── random.c │ └── tests.txt ├── cryptolib.pl ├── cryptotest.pl ├── daemon_tests │ ├── CMakeLists.txt │ └── transfers.cpp ├── data │ ├── account-002bee2f8e16f5de4db0d3b8ce9227c8c0b7f9688348b028e022cb43f210968b40a69cdc8531fd4a2e7c9e144eec48bb477733d70ce5f9b85338a07cb10b849ad8fb │ ├── account-007af2d7c5ffd8f69005debae820207820805e28c7d7a16714591143f56fb51e2b91ad0c1a535567e6292b321773df5e5aaace00fe767c4f09de452838575357ca9f │ ├── account-009b82d66dfaaba55a581913fa09d6c5bebe179cd73731781265c96e9e630dcd27fd5d20e7f1d0fa42619de9ca8fe4c0659f6959b2bebb15079cdaed07a442a78486 │ ├── account-00aff84db50d6a54dd56051379f6c336fdd330d1cb11e7523bbf71f30b1ae760fa47ace8679b6486f79429980fd2331715a631f5729db284eb1fc6f108aeb7a7f4fe │ ├── fuzz │ │ ├── base58 │ │ │ ├── ENC1 │ │ │ └── ENC2 │ │ ├── block │ │ │ ├── BLOCK1 │ │ │ └── BLOCK2 │ │ ├── bulletproof │ │ │ └── BP0 │ │ ├── cold-outputs │ │ │ ├── OUTPUTS1 │ │ │ └── OUTPUTS2 │ │ ├── cold-transaction │ │ │ └── CTX1 │ │ ├── http-client │ │ │ └── RESP1 │ │ ├── levin │ │ │ └── LEVIN1 │ │ ├── load-from-binary │ │ │ └── BINARY1 │ │ ├── load-from-json │ │ │ └── JSON1 │ │ ├── parse-url │ │ │ ├── URL1 │ │ │ └── URL2 │ │ ├── signature │ │ │ ├── SIG1 │ │ │ └── SIG2 │ │ └── transaction │ │ │ ├── TX1 │ │ │ └── TX2 │ ├── outputs │ ├── signed_monero_tx │ ├── unsigned_monero_tx │ ├── wallet_WmsMW3 │ └── wallet_WmsMW3.keys ├── difficulty │ ├── CMakeLists.txt │ ├── data-v9.txt │ ├── data.txt │ ├── difficulty.cpp │ ├── gen_wide_data.py │ ├── generate-data │ └── wide_difficulty.py ├── functional_tests │ ├── CMakeLists.txt │ ├── blockchain.py │ ├── main.cpp │ ├── speed.py │ ├── test_framework │ │ ├── __init__.py │ │ ├── daemon.py │ │ ├── rpc.py │ │ └── wallet.py │ ├── transactions_flow_test.cpp │ ├── transactions_flow_test.h │ ├── transactions_generation_from_blockchain.cpp │ └── transactions_generation_from_blockchain.h ├── fuzz │ ├── CMakeLists.txt │ ├── base58.cpp │ ├── block.cpp │ ├── bulletproof.cpp │ ├── cold-outputs.cpp │ ├── cold-transaction.cpp │ ├── fuzzer.cpp │ ├── fuzzer.h │ ├── http-client.cpp │ ├── levin.cpp │ ├── load_from_binary.cpp │ ├── load_from_json.cpp │ ├── parse_url.cpp │ ├── signature.cpp │ └── transaction.cpp ├── gtest │ ├── CHANGES │ ├── CMakeLists.txt │ ├── CONTRIBUTORS │ ├── LICENSE │ ├── README.md │ ├── cmake │ │ └── internal_utils.cmake │ ├── include │ │ └── gtest │ │ │ ├── gtest-death-test.h │ │ │ ├── gtest-message.h │ │ │ ├── gtest-param-test.h │ │ │ ├── gtest-param-test.h.pump │ │ │ ├── gtest-printers.h │ │ │ ├── gtest-spi.h │ │ │ ├── gtest-test-part.h │ │ │ ├── gtest-typed-test.h │ │ │ ├── gtest.h │ │ │ ├── gtest_pred_impl.h │ │ │ ├── gtest_prod.h │ │ │ └── internal │ │ │ ├── custom │ │ │ ├── gtest-port.h │ │ │ ├── gtest-printers.h │ │ │ └── gtest.h │ │ │ ├── gtest-death-test-internal.h │ │ │ ├── gtest-filepath.h │ │ │ ├── gtest-internal.h │ │ │ ├── gtest-linked_ptr.h │ │ │ ├── gtest-param-util-generated.h │ │ │ ├── gtest-param-util-generated.h.pump │ │ │ ├── gtest-param-util.h │ │ │ ├── gtest-port-arch.h │ │ │ ├── gtest-port.h │ │ │ ├── gtest-string.h │ │ │ ├── gtest-tuple.h │ │ │ ├── gtest-tuple.h.pump │ │ │ ├── gtest-type-util.h │ │ │ └── gtest-type-util.h.pump │ └── src │ │ ├── gtest-all.cc │ │ ├── gtest-death-test.cc │ │ ├── gtest-filepath.cc │ │ ├── gtest-internal-inl.h │ │ ├── gtest-port.cc │ │ ├── gtest-printers.cc │ │ ├── gtest-test-part.cc │ │ ├── gtest-typed-test.cc │ │ ├── gtest.cc │ │ └── gtest_main.cc ├── hash-target.cpp ├── hash │ ├── CMakeLists.txt │ ├── main.cpp │ ├── tests-extra-blake.txt │ ├── tests-extra-groestl.txt │ ├── tests-extra-jh.txt │ ├── tests-extra-skein.txt │ ├── tests-fast.txt │ ├── tests-k12.txt │ ├── tests-slow-1m-1.txt │ ├── tests-slow-1m.txt │ ├── tests-slow-2m-1.txt │ ├── tests-slow-2m.txt │ └── tests-tree.txt ├── io.h ├── libwallet_api_tests │ ├── CMakeLists.txt │ ├── main.cpp │ └── scripts │ │ ├── README.md │ │ ├── create_wallets.sh │ │ ├── mining_start.sh │ │ ├── mining_stop.sh │ │ ├── open_wallet_1.sh │ │ ├── open_wallet_2.sh │ │ ├── open_wallet_3.sh │ │ ├── open_wallet_4.sh │ │ ├── open_wallet_5.sh │ │ ├── open_wallet_miner.sh │ │ └── send_funds.sh ├── net_load_tests │ ├── CMakeLists.txt │ ├── clt.cpp │ ├── net_load_tests.h │ └── srv.cpp ├── performance_tests │ ├── CMakeLists.txt │ ├── bulletproof.h │ ├── check_hash.h │ ├── check_tx_signature.h │ ├── cn_fast_hash.h │ ├── cn_slow_hash.h │ ├── construct_tx.h │ ├── crypto_ops.h │ ├── derive_public_key.h │ ├── derive_secret_key.h │ ├── equality.h │ ├── ge_frombytes_vartime.h │ ├── generate_key_derivation.h │ ├── generate_key_image.h │ ├── generate_key_image_helper.h │ ├── generate_keypair.h │ ├── is_out_to_acc.h │ ├── main.cpp │ ├── multi_tx_test_base.h │ ├── multiexp.h │ ├── performance_tests.h │ ├── performance_utils.h │ ├── range_proof.h │ ├── rct_mlsag.h │ ├── sc_reduce32.h │ ├── signature.h │ ├── single_tx_test_base.h │ └── subaddress_expand.h └── unit_tests │ ├── CMakeLists.txt │ ├── account.cpp │ ├── address_from_url.cpp │ ├── aligned.cpp │ ├── apply_permutation.cpp │ ├── ban.cpp │ ├── base58.cpp │ ├── block_queue.cpp │ ├── block_reward.cpp │ ├── blockchain_db.cpp │ ├── borromean_signature.cpp │ ├── bulletproofs.cpp │ ├── canonical_amounts.cpp │ ├── chacha.cpp │ ├── checkpoints.cpp │ ├── command_line.cpp │ ├── crypto.cpp │ ├── decompose_amount_into_digits.cpp │ ├── device.cpp │ ├── difficulty.cpp │ ├── dns_resolver.cpp │ ├── epee_boosted_tcp_server.cpp │ ├── epee_levin_protocol_handler_async.cpp │ ├── epee_utils.cpp │ ├── expect.cpp │ ├── get_xtype_from_string.cpp │ ├── hardfork.cpp │ ├── hashchain.cpp │ ├── http.cpp │ ├── int-util.cpp │ ├── is_hdd.cpp │ ├── json_serialization.cpp │ ├── keccak.cpp │ ├── long_term_block_weight.cpp │ ├── main.cpp │ ├── memwipe.cpp │ ├── mlocker.cpp │ ├── mnemonics.cpp │ ├── mul_div.cpp │ ├── multiexp.cpp │ ├── multisig.cpp │ ├── notify.cpp │ ├── output_selection.cpp │ ├── parse_amount.cpp │ ├── random.cpp │ ├── ringct.cpp │ ├── ringdb.cpp │ ├── rolling_median.cpp │ ├── serialization.cpp │ ├── sha256.cpp │ ├── slow_memmem.cpp │ ├── subaddress.cpp │ ├── test_notifier.cpp │ ├── test_peerlist.cpp │ ├── test_protocol_pack.cpp │ ├── test_tx_utils.cpp │ ├── threadpool.cpp │ ├── unbound.cpp │ ├── unit_tests_utils.h │ ├── uri.cpp │ ├── varint.cpp │ ├── vercmp.cpp │ └── wipeable_string.cpp ├── translations ├── CMakeLists.txt ├── generate_translations_header.c ├── monero.ts ├── monero_fr.ts ├── monero_it.ts ├── monero_ja.ts └── monero_sv.ts └── utils ├── build_scripts ├── android32.Dockerfile ├── android64.Dockerfile └── windows.bat ├── conf └── aeond.conf ├── doxygen-publish.sh ├── gpg_keys ├── anonimal.asc ├── bigslimvdub.asc ├── fluffypony.asc ├── guzzi.asc ├── hyc.asc ├── iDunk.asc ├── jaquee.asc ├── kenshi84.asc ├── luigi1111.asc ├── mikezackles.asc ├── mishi_choudhary.asc ├── moneromooo.asc ├── nanoakron.asc ├── oranjuice.asc ├── sarang.asc ├── stoffu.asc ├── tewinget.asc ├── tomerkon.asc └── warptangent.asc ├── munin_plugins ├── alt_blocks_count ├── difficulty ├── grey_peerlist_size ├── height ├── incoming_connections_count ├── outgoing_connections_count ├── tx_count ├── tx_pool_size └── white_peerlist_size ├── systemd └── aeond.service └── translations ├── build-translations.sh └── update-translations.sh /cmake/CheckLinkerFlag.c: -------------------------------------------------------------------------------- 1 | #ifdef __CLASSIC_C__ 2 | int main() 3 | { 4 | int ac; 5 | char* av[]; 6 | #else 7 | int main(int ac, char* av[]) 8 | { 9 | #endif 10 | if (ac > 1000) { 11 | return *av[0]; 12 | } 13 | return 0; 14 | } 15 | -------------------------------------------------------------------------------- /cmake/CheckLinkerFlag.cmake: -------------------------------------------------------------------------------- 1 | include(CheckCCompilerFlag) 2 | 3 | macro(CHECK_LINKER_FLAG flag VARIABLE) 4 | if(NOT DEFINED "${VARIABLE}") 5 | if(NOT CMAKE_REQUIRED_QUIET) 6 | message(STATUS "Looking for ${flag} linker flag") 7 | endif() 8 | 9 | set(_cle_source ${CMAKE_SOURCE_DIR}/cmake/CheckLinkerFlag.c) 10 | 11 | set(saved_CMAKE_C_FLAGS ${CMAKE_C_FLAGS}) 12 | set(CMAKE_C_FLAGS "${flag}") 13 | try_compile(${VARIABLE} 14 | ${CMAKE_BINARY_DIR} 15 | ${_cle_source} 16 | COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} ${flag} 17 | CMAKE_FLAGS 18 | OUTPUT_VARIABLE OUTPUT) 19 | unset(_cle_source) 20 | set(CMAKE_C_FLAGS ${saved_CMAKE_C_FLAGS}) 21 | unset(saved_CMAKE_C_FLAGS) 22 | 23 | if ("${OUTPUT}" MATCHES "warning.*ignored") 24 | set(${VARIABLE} 0) 25 | endif() 26 | 27 | if(${VARIABLE}) 28 | if(NOT CMAKE_REQUIRED_QUIET) 29 | message(STATUS "Looking for ${flag} linker flag - found") 30 | endif() 31 | set(${VARIABLE} 1 CACHE INTERNAL "Have linker flag ${flag}") 32 | file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log 33 | "Determining if the ${flag} linker flag is supported " 34 | "passed with the following output:\n" 35 | "${OUTPUT}\n\n") 36 | else() 37 | if(NOT CMAKE_REQUIRED_QUIET) 38 | message(STATUS "Looking for ${flag} linker flag - not found") 39 | endif() 40 | set(${VARIABLE} "" CACHE INTERNAL "Have linker flag ${flag}") 41 | file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log 42 | "Determining if the ${flag} linker flag is supported " 43 | "failed with the following output:\n" 44 | "${OUTPUT}\n\n") 45 | endif() 46 | endif() 47 | endmacro() 48 | -------------------------------------------------------------------------------- /cmake/Doxygen.extra.css.in: -------------------------------------------------------------------------------- 1 | /* increase vertical space */ 2 | #titlearea, #nav-path { 3 | display: none; 4 | height: 0px; 5 | } 6 | 7 | 8 | /* uncomment these lines for some extra vertical space */ 9 | 10 | /* 11 | .tablist li { 12 | line-height: 26px; 13 | } 14 | */ 15 | -------------------------------------------------------------------------------- /cmake/FindBerkeleyDB.cmake: -------------------------------------------------------------------------------- 1 | # - Try to find Berkeley DB 2 | # Once done this will define 3 | # 4 | # BERKELEY_DB_FOUND - system has Berkeley DB 5 | # BERKELEY_DB_INCLUDE_DIR - the Berkeley DB include directory 6 | # BERKELEY_DB_LIBRARIES - Link these to use Berkeley DB 7 | # BERKELEY_DB_DEFINITIONS - Compiler switches required for using Berkeley DB 8 | 9 | # Copyright (c) 2006, Alexander Dymo, 10 | # 11 | # Redistribution and use is allowed according to the terms of the BSD license. 12 | # For details see the accompanying COPYING-CMAKE-SCRIPTS file. 13 | 14 | find_path(BERKELEY_DB_INCLUDE_DIR db_cxx.h 15 | /usr/include/db4 16 | /usr/local/include/db4 17 | ) 18 | 19 | find_library(BERKELEY_DB_LIBRARIES NAMES db_cxx ) 20 | 21 | include(FindPackageHandleStandardArgs) 22 | find_package_handle_standard_args(Berkeley "Could not find Berkeley DB >= 4.1" BERKELEY_DB_INCLUDE_DIR BERKELEY_DB_LIBRARIES) 23 | # show the BERKELEY_DB_INCLUDE_DIR and BERKELEY_DB_LIBRARIES variables only in the advanced view 24 | mark_as_advanced(BERKELEY_DB_INCLUDE_DIR BERKELEY_DB_LIBRARIES ) 25 | 26 | -------------------------------------------------------------------------------- /cmake/FindLibunwind.cmake: -------------------------------------------------------------------------------- 1 | # - Try to find libunwind 2 | # Once done this will define 3 | # 4 | # LIBUNWIND_FOUND - system has libunwind 5 | # LIBUNWIND_INCLUDE_DIR - the libunwind include directory 6 | # LIBUNWIND_LIBRARIES - Link these to use libunwind 7 | # LIBUNWIND_DEFINITIONS - Compiler switches required for using libunwind 8 | 9 | # Copyright (c) 2006, Alexander Dymo, 10 | # 11 | # Redistribution and use is allowed according to the terms of the BSD license. 12 | # For details see the accompanying COPYING-CMAKE-SCRIPTS file. 13 | 14 | find_path(LIBUNWIND_INCLUDE_DIR libunwind.h 15 | /usr/include 16 | /usr/local/include 17 | ) 18 | 19 | find_library(LIBUNWIND_LIBRARIES NAMES unwind ) 20 | if(NOT LIBUNWIND_LIBRARIES STREQUAL "LIBUNWIND_LIBRARIES-NOTFOUND") 21 | if (CMAKE_COMPILER_IS_GNUCC) 22 | set(LIBUNWIND_LIBRARIES "gcc_eh;${LIBUNWIND_LIBRARIES}") 23 | endif() 24 | endif() 25 | 26 | # some versions of libunwind need liblzma, and we don't use pkg-config 27 | # so we just look whether liblzma is installed, and add it if it is. 28 | # It might not be actually needed, but doesn't hurt if it is not. 29 | # We don't need any headers, just the lib, as it's privately needed. 30 | message(STATUS "looking for liblzma") 31 | find_library(LIBLZMA_LIBRARIES lzma ) 32 | if(NOT LIBLZMA_LIBRARIES STREQUAL "LIBLZMA_LIBRARIES-NOTFOUND") 33 | message(STATUS "liblzma found") 34 | set(LIBUNWIND_LIBRARIES "${LIBUNWIND_LIBRARIES};${LIBLZMA_LIBRARIES}") 35 | endif() 36 | 37 | include(FindPackageHandleStandardArgs) 38 | find_package_handle_standard_args(Libunwind "Could not find libunwind" LIBUNWIND_INCLUDE_DIR LIBUNWIND_LIBRARIES) 39 | # show the LIBUNWIND_INCLUDE_DIR and LIBUNWIND_LIBRARIES variables only in the advanced view 40 | mark_as_advanced(LIBUNWIND_INCLUDE_DIR LIBUNWIND_LIBRARIES ) 41 | 42 | -------------------------------------------------------------------------------- /cmake/test-static-assert.c: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-2019, AEON, The Monero Project 2 | // 3 | // All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without modification, are 6 | // permitted provided that the following conditions are met: 7 | // 8 | // 1. Redistributions of source code must retain the above copyright notice, this list of 9 | // conditions and the following disclaimer. 10 | // 11 | // 2. Redistributions in binary form must reproduce the above copyright notice, this list 12 | // of conditions and the following disclaimer in the documentation and/or other 13 | // materials provided with the distribution. 14 | // 15 | // 3. Neither the name of the copyright holder nor the names of its contributors may be 16 | // used to endorse or promote products derived from this software without specific 17 | // prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 20 | // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 21 | // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL 22 | // THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 24 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25 | // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 26 | // STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF 27 | // THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | 29 | #include 30 | 31 | static_assert(1, "FAIL"); 32 | int main(int argc, char *argv[]) { 33 | return 0; 34 | } 35 | -------------------------------------------------------------------------------- /cmake/test-static-assert.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-2019, AEON, The Monero Project 2 | // 3 | // All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without modification, are 6 | // permitted provided that the following conditions are met: 7 | // 8 | // 1. Redistributions of source code must retain the above copyright notice, this list of 9 | // conditions and the following disclaimer. 10 | // 11 | // 2. Redistributions in binary form must reproduce the above copyright notice, this list 12 | // of conditions and the following disclaimer in the documentation and/or other 13 | // materials provided with the distribution. 14 | // 15 | // 3. Neither the name of the copyright holder nor the names of its contributors may be 16 | // used to endorse or promote products derived from this software without specific 17 | // prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 20 | // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 21 | // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL 22 | // THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 24 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25 | // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 26 | // STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF 27 | // THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | 29 | #include 30 | 31 | static_assert(1, "FAIL"); 32 | int main(int argc, char *argv[]) { 33 | return 0; 34 | } 35 | -------------------------------------------------------------------------------- /contrib/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2014-2019, AEON, The Monero Project 2 | # 3 | # All rights reserved. 4 | # 5 | # Redistribution and use in source and binary forms, with or without modification, are 6 | # permitted provided that the following conditions are met: 7 | # 8 | # 1. Redistributions of source code must retain the above copyright notice, this list of 9 | # conditions and the following disclaimer. 10 | # 11 | # 2. Redistributions in binary form must reproduce the above copyright notice, this list 12 | # of conditions and the following disclaimer in the documentation and/or other 13 | # materials provided with the distribution. 14 | # 15 | # 3. Neither the name of the copyright holder nor the names of its contributors may be 16 | # used to endorse or promote products derived from this software without specific 17 | # prior written permission. 18 | # 19 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 20 | # EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 21 | # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL 22 | # THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 24 | # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25 | # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 26 | # STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF 27 | # THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | 29 | add_subdirectory(epee) 30 | 31 | -------------------------------------------------------------------------------- /contrib/codefresh/codefresh.yml: -------------------------------------------------------------------------------- 1 | version: '1.0' 2 | steps: 3 | init_submodules: 4 | title: Init Submodules 5 | commands: 6 | - git submodule update --init --recursive 7 | image: codefreshio/git-image:latest 8 | working_directory: ${{main_clone}} 9 | 10 | BuildingDockerImage: 11 | title: Building Docker Image 12 | type: build 13 | image_name: monero 14 | working_directory: ./ 15 | tag: '${{CF_BRANCH_TAG_NORMALIZED}}' 16 | dockerfile: Dockerfile 17 | build_arguments: 18 | - NPROC=1 19 | -------------------------------------------------------------------------------- /contrib/depends/builders/darwin.mk: -------------------------------------------------------------------------------- 1 | build_darwin_CC: = $(shell xcrun -f clang) 2 | build_darwin_CXX: = $(shell xcrun -f clang++) 3 | build_darwin_AR: = $(shell xcrun -f ar) 4 | build_darwin_RANLIB: = $(shell xcrun -f ranlib) 5 | build_darwin_STRIP: = $(shell xcrun -f strip) 6 | build_darwin_OTOOL: = $(shell xcrun -f otool) 7 | build_darwin_NM: = $(shell xcrun -f nm) 8 | build_darwin_INSTALL_NAME_TOOL:=$(shell xcrun -f install_name_tool) 9 | build_darwin_SHA256SUM = shasum -a 256 10 | build_darwin_DOWNLOAD = curl --location --fail --connect-timeout $(DOWNLOAD_CONNECT_TIMEOUT) --retry $(DOWNLOAD_RETRIES) -o 11 | 12 | #darwin host on darwin builder. overrides darwin host preferences. 13 | darwin_CC=$(shell xcrun -f clang) -mmacosx-version-min=$(OSX_MIN_VERSION) 14 | darwin_CXX:=$(shell xcrun -f clang++) -mmacosx-version-min=$(OSX_MIN_VERSION) -stdlib=libc++ 15 | darwin_AR:=$(shell xcrun -f ar) 16 | darwin_RANLIB:=$(shell xcrun -f ranlib) 17 | darwin_STRIP:=$(shell xcrun -f strip) 18 | darwin_LIBTOOL:=$(shell xcrun -f libtool) 19 | darwin_OTOOL:=$(shell xcrun -f otool) 20 | darwin_NM:=$(shell xcrun -f nm) 21 | darwin_INSTALL_NAME_TOOL:=$(shell xcrun -f install_name_tool) 22 | darwin_native_toolchain= 23 | -------------------------------------------------------------------------------- /contrib/depends/builders/default.mk: -------------------------------------------------------------------------------- 1 | default_build_CC = gcc 2 | default_build_CXX = g++ 3 | default_build_AR = ar 4 | default_build_RANLIB = ranlib 5 | default_build_STRIP = strip 6 | default_build_NM = nm 7 | default_build_OTOOL = otool 8 | default_build_INSTALL_NAME_TOOL = install_name_tool 9 | 10 | define add_build_tool_func 11 | build_$(build_os)_$1 ?= $$(default_build_$1) 12 | build_$(build_arch)_$(build_os)_$1 ?= $$(build_$(build_os)_$1) 13 | build_$1=$$(build_$(build_arch)_$(build_os)_$1) 14 | endef 15 | $(foreach var,CC CXX AR RANLIB NM STRIP SHA256SUM DOWNLOAD OTOOL INSTALL_NAME_TOOL,$(eval $(call add_build_tool_func,$(var)))) 16 | define add_build_flags_func 17 | build_$(build_arch)_$(build_os)_$1 += $(build_$(build_os)_$1) 18 | build_$1=$$(build_$(build_arch)_$(build_os)_$1) 19 | endef 20 | $(foreach flags, CFLAGS CXXFLAGS LDFLAGS, $(eval $(call add_build_flags_func,$(flags)))) 21 | -------------------------------------------------------------------------------- /contrib/depends/builders/linux.mk: -------------------------------------------------------------------------------- 1 | build_linux_SHA256SUM = sha256sum 2 | build_linux_DOWNLOAD = curl --location --fail --connect-timeout $(DOWNLOAD_CONNECT_TIMEOUT) --retry $(DOWNLOAD_RETRIES) -o 3 | -------------------------------------------------------------------------------- /contrib/depends/hosts/darwin.mk: -------------------------------------------------------------------------------- 1 | OSX_MIN_VERSION=10.8 2 | OSX_SDK_VERSION=10.11 3 | OSX_SDK=$(SDK_PATH)/MacOSX$(OSX_SDK_VERSION).sdk 4 | LD64_VERSION=253.9 5 | darwin_CC=clang -target $(host) -mmacosx-version-min=$(OSX_MIN_VERSION) --sysroot $(OSX_SDK) -mlinker-version=$(LD64_VERSION) -B $(host_prefix)/native/bin 6 | darwin_CXX=clang++ -target $(host) -mmacosx-version-min=$(OSX_MIN_VERSION) --sysroot $(OSX_SDK) -mlinker-version=$(LD64_VERSION) -stdlib=libc++ -B $(host_prefix)/native/bin 7 | 8 | darwin_CFLAGS=-pipe 9 | darwin_CXXFLAGS=$(darwin_CFLAGS) 10 | 11 | darwin_release_CFLAGS=-O1 12 | darwin_release_CXXFLAGS=$(darwin_release_CFLAGS) 13 | 14 | darwin_debug_CFLAGS=-O1 15 | darwin_debug_CXXFLAGS=$(darwin_debug_CFLAGS) 16 | 17 | darwin_native_toolchain=native_cctools 18 | -------------------------------------------------------------------------------- /contrib/depends/hosts/default.mk: -------------------------------------------------------------------------------- 1 | default_host_CC = $(host_toolchain)gcc 2 | default_host_CXX = $(host_toolchain)g++ 3 | default_host_AR = $(host_toolchain)ar 4 | default_host_RANLIB = $(host_toolchain)ranlib 5 | default_host_STRIP = $(host_toolchain)strip 6 | default_host_LIBTOOL = $(host_toolchain)libtool 7 | default_host_INSTALL_NAME_TOOL = $(host_toolchain)install_name_tool 8 | default_host_OTOOL = $(host_toolchain)otool 9 | default_host_NM = $(host_toolchain)nm 10 | 11 | define add_host_tool_func 12 | $(host_os)_$1?=$$(default_host_$1) 13 | $(host_arch)_$(host_os)_$1?=$$($(host_os)_$1) 14 | $(host_arch)_$(host_os)_$(release_type)_$1?=$$($(host_os)_$1) 15 | host_$1=$$($(host_arch)_$(host_os)_$1) 16 | endef 17 | 18 | define add_host_flags_func 19 | $(host_arch)_$(host_os)_$1 += $($(host_os)_$1) 20 | $(host_arch)_$(host_os)_$(release_type)_$1 += $($(host_os)_$(release_type)_$1) 21 | host_$1 = $$($(host_arch)_$(host_os)_$1) 22 | host_$(release_type)_$1 = $$($(host_arch)_$(host_os)_$(release_type)_$1) 23 | endef 24 | 25 | $(foreach tool,CC CXX AR RANLIB STRIP NM LIBTOOL OTOOL INSTALL_NAME_TOOL,$(eval $(call add_host_tool_func,$(tool)))) 26 | $(foreach flags,CFLAGS CXXFLAGS CPPFLAGS LDFLAGS, $(eval $(call add_host_flags_func,$(flags)))) 27 | -------------------------------------------------------------------------------- /contrib/depends/hosts/linux.mk: -------------------------------------------------------------------------------- 1 | linux_CFLAGS=-pipe 2 | linux_CXXFLAGS=$(linux_CFLAGS) 3 | 4 | linux_release_CFLAGS=-O2 5 | linux_release_CXXFLAGS=$(linux_release_CFLAGS) 6 | 7 | linux_debug_CFLAGS=-O1 8 | linux_debug_CXXFLAGS=$(linux_debug_CFLAGS) 9 | 10 | linux_debug_CPPFLAGS=-D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC 11 | 12 | ifeq (86,$(findstring 86,$(build_arch))) 13 | i686_linux_CC=gcc -m32 14 | i686_linux_CXX=g++ -m32 15 | i686_linux_AR=ar 16 | i686_linux_RANLIB=ranlib 17 | i686_linux_NM=nm 18 | i686_linux_STRIP=strip 19 | 20 | x86_64_linux_CC=gcc -m64 21 | x86_64_linux_CXX=g++ -m64 22 | x86_64_linux_AR=ar 23 | x86_64_linux_RANLIB=ranlib 24 | x86_64_linux_NM=nm 25 | x86_64_linux_STRIP=strip 26 | else 27 | i686_linux_CC=$(default_host_CC) -m32 28 | i686_linux_CXX=$(default_host_CXX) -m32 29 | x86_64_linux_CC=$(default_host_CC) -m64 30 | x86_64_linux_CXX=$(default_host_CXX) -m64 31 | endif 32 | -------------------------------------------------------------------------------- /contrib/depends/hosts/mingw32.mk: -------------------------------------------------------------------------------- 1 | mingw32_CFLAGS=-pipe 2 | mingw32_CXXFLAGS=$(mingw32_CFLAGS) 3 | 4 | mingw32_release_CFLAGS=-O2 5 | mingw32_release_CXXFLAGS=$(mingw32_release_CFLAGS) 6 | 7 | mingw32_debug_CFLAGS=-O1 8 | mingw32_debug_CXXFLAGS=$(mingw32_debug_CFLAGS) 9 | 10 | mingw32_debug_CPPFLAGS=-D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC 11 | -------------------------------------------------------------------------------- /contrib/depends/packages/bdb.mk: -------------------------------------------------------------------------------- 1 | package=bdb 2 | $(package)_version=4.8.30 3 | $(package)_download_path=http://download.oracle.com/berkeley-db 4 | $(package)_file_name=db-$($(package)_version).NC.tar.gz 5 | $(package)_sha256_hash=12edc0df75bf9abd7f82f821795bcee50f42cb2e5f76a6a281b85732798364ef 6 | $(package)_build_subdir=build_unix 7 | 8 | define $(package)_set_vars 9 | $(package)_config_opts=--disable-shared --enable-cxx --disable-replication 10 | $(package)_config_opts_mingw32=--enable-mingw 11 | $(package)_config_opts_linux=--with-pic 12 | $(package)_cxxflags=-std=c++11 13 | endef 14 | 15 | define $(package)_preprocess_cmds 16 | sed -i.old 's/__atomic_compare_exchange/__atomic_compare_exchange_db/' dbinc/atomic.h && \ 17 | sed -i.old 's/atomic_init/atomic_init_db/' dbinc/atomic.h mp/mp_region.c mp/mp_mvcc.c mp/mp_fget.c mutex/mut_method.c mutex/mut_tas.c && \ 18 | cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub dist 19 | endef 20 | 21 | define $(package)_config_cmds 22 | ../dist/$($(package)_autoconf) 23 | endef 24 | 25 | define $(package)_build_cmds 26 | $(MAKE) libdb_cxx-4.8.a libdb-4.8.a 27 | endef 28 | 29 | define $(package)_stage_cmds 30 | $(MAKE) DESTDIR=$($(package)_staging_dir) install_lib install_include 31 | endef 32 | -------------------------------------------------------------------------------- /contrib/depends/packages/cmake/conf/target-cmake.in: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | echo "== Using MXE wrapper: @PREFIX@/bin/@TARGET@-cmake" 3 | 4 | # https://cmake.org/cmake/help/latest/manual/cmake-policies.7.html 5 | # https://cmake.org/cmake/help/latest/variable/CMAKE_POLICY_DEFAULT_CMPNNNN.html 6 | POLICIES=(0017,0020) 7 | 8 | unset NO_MXE_TOOLCHAIN 9 | if echo -- "$@" | grep -Ewq "(--build|-E|--system-information)" ; then 10 | NO_MXE_TOOLCHAIN=1 11 | fi 12 | if [[ "$NO_MXE_TOOLCHAIN" == "1" ]]; then 13 | echo "== Skip using MXE toolchain: @CMAKE_TOOLCHAIN_FILE@" 14 | # see https://github.com/mxe/mxe/issues/932 15 | exec "@PREFIX@/@BUILD@/bin/cmake" "$@" 16 | else 17 | echo " - cmake version @CMAKE_VERSION@" 18 | echo " - warnings for unused CMAKE_POLICY_DEFAULT variables can be ignored" 19 | echo "== Using MXE toolchain: @CMAKE_TOOLCHAIN_FILE@" 20 | echo "== Using MXE runresult: @CMAKE_RUNRESULT_FILE@" 21 | if ! ( echo "$@" | grep --silent "DCMAKE_BUILD_TYPE" ) ; then 22 | echo '== Adding "-DCMAKE_BUILD_TYPE=Release"' 23 | set -- "-DCMAKE_BUILD_TYPE=Release" "$@" 24 | fi 25 | exec "@PREFIX@/@BUILD@/bin/cmake" \ 26 | -DCMAKE_TOOLCHAIN_FILE="@CMAKE_TOOLCHAIN_FILE@" \ 27 | `eval echo -DCMAKE_POLICY_DEFAULT_CMP{$POLICIES}=NEW` \ 28 | -C"@CMAKE_RUNRESULT_FILE@" "$@" 29 | fi 30 | -------------------------------------------------------------------------------- /contrib/depends/packages/cmake/test/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # This file is part of MXE. See LICENSE.md for licensing information. 2 | 3 | # 2.8.9 is Debian Wheezy version 4 | cmake_minimum_required(VERSION 2.8.9) 5 | 6 | # use default C and CXX languages 7 | project(mxe) 8 | 9 | # see cmake --help-policy for details 10 | cmake_policy(SET CMP0017 NEW) 11 | if (POLICY CMP0020) 12 | cmake_policy(SET CMP0020 NEW) 13 | endif() 14 | 15 | # so we can find pkg-test.cmake files to include 16 | set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/../.. ${CMAKE_MODULE_PATH}) 17 | 18 | include(${PKG}-test) 19 | -------------------------------------------------------------------------------- /contrib/depends/packages/cppzmq.mk: -------------------------------------------------------------------------------- 1 | package=cppzmq 2 | $(package)_version=4.2.3 3 | $(package)_download_path=https://github.com/stoffu/depends-sources/releases/download/v1 # https://github.com/zeromq/cppzmq/archive/ 4 | $(package)_file_name=$(package)-v$($(package)_version).tar.gz 5 | $(package)_sha256_hash=3e6b57bf49115f4ae893b1ff7848ead7267013087dc7be1ab27636a97144d373 6 | $(package)_dependencies=zeromq 7 | 8 | define $(package)_stage_cmds 9 | mkdir $($(package)_staging_prefix_dir)/include &&\ 10 | cp zmq.hpp $($(package)_staging_prefix_dir)/include 11 | endef 12 | 13 | define $(package)_postprocess_cmds 14 | rm -rf bin share 15 | endef 16 | -------------------------------------------------------------------------------- /contrib/depends/packages/eudev.mk: -------------------------------------------------------------------------------- 1 | package=eudev 2 | $(package)_version=v3.2.6 3 | $(package)_download_path=https://github.com/stoffu/depends-sources/releases/download/v1 # https://github.com/gentoo/eudev/archive/ 4 | $(package)_file_name=$(package)-$($(package)_version).tar.gz 5 | $(package)_sha256_hash=a96ecb8637667897b8bd4dee4c22c7c5f08b327be45186e912ce6bc768385852 6 | 7 | define $(package)_set_vars 8 | $(package)_config_opts=--disable-gudev --disable-introspection --disable-hwdb --disable-manpages --disable-shared 9 | endef 10 | 11 | define $(package)_config_cmds 12 | $($(package)_autoconf) 13 | endef 14 | 15 | define $(package)_build_cmd 16 | $(MAKE) 17 | endef 18 | 19 | define $(package)_preprocess_cmds 20 | cd $($(package)_build_subdir); autoreconf -f -i 21 | endef 22 | 23 | define $(package)_stage_cmds 24 | $(MAKE) DESTDIR=$($(package)_staging_dir) install 25 | endef 26 | -------------------------------------------------------------------------------- /contrib/depends/packages/expat.mk: -------------------------------------------------------------------------------- 1 | package=expat 2 | $(package)_version=2.2.4 3 | $(package)_download_path=https://downloads.sourceforge.net/project/expat/expat/$($(package)_version) 4 | $(package)_file_name=$(package)-$($(package)_version).tar.bz2 5 | $(package)_sha256_hash=03ad85db965f8ab2d27328abcf0bc5571af6ec0a414874b2066ee3fdd372019e 6 | 7 | define $(package)_set_vars 8 | $(package)_config_opts=--enable-static 9 | $(package)_config_opts+=--prefix=$(host_prefix) 10 | endef 11 | 12 | define $(package)_config_cmds 13 | $($(package)_autoconf) $($(package)_config_opts) 14 | endef 15 | 16 | define $(package)_build_cmds 17 | $(MAKE) 18 | endef 19 | 20 | define $(package)_stage_cmds 21 | $(MAKE) DESTDIR=$($(package)_staging_dir) install 22 | endef 23 | -------------------------------------------------------------------------------- /contrib/depends/packages/graphviz.mk: -------------------------------------------------------------------------------- 1 | package=graphviz 2 | $(package)_version=2.40.1 3 | $(package)_download_path=www.graphviz.org/pub/graphviz/stable/SOURCES/ 4 | $(package)_file_name=$(package)-$($(package)_version).tar.gz 5 | $(package)_sha256_hash=ca5218fade0204d59947126c38439f432853543b0818d9d728c589dfe7f3a421 6 | 7 | define $(package)_preprocess_cmds 8 | ./autogen.sh 9 | endef 10 | 11 | define $(package)_set_vars 12 | $(package)_config_opts=--disable-shared --enable-multibye --without-purify --without-curses 13 | $(package)_config_opts_release=--disable-debug-mode 14 | $(package)_config_opts_linux=--with-pic 15 | endef 16 | 17 | define $(package)_config_cmds 18 | $($(package)_autoconf) 19 | endef 20 | 21 | define $(package)_build_cmds 22 | $(MAKE) 23 | endef 24 | 25 | define $(package)_stage_cmds 26 | $(MAKE) DESTDIR=$($(package)_staging_dir) install 27 | endef 28 | 29 | define $(package)_postprocess_cmds 30 | endef 31 | -------------------------------------------------------------------------------- /contrib/depends/packages/hidapi.mk: -------------------------------------------------------------------------------- 1 | package=hidapi 2 | $(package)_version=0.8.0-rc1 3 | $(package)_download_path=https://github.com/signal11/hidapi/archive 4 | $(package)_file_name=$(package)-$($(package)_version).tar.gz 5 | $(package)_sha256_hash=3c147200bf48a04c1e927cd81589c5ddceff61e6dac137a605f6ac9793f4af61 6 | $(package)_linux_dependencies=libusb eudev 7 | 8 | define $(package)_set_vars 9 | $(package)_config_opts=--enable-static --disable-shared 10 | $(package)_config_opts+=--prefix=$(host_prefix) 11 | $(package)_config_opts_darwin+=RANLIB="$(host_prefix)/native/bin/x86_64-apple-darwin11-ranlib" AR="$(host_prefix)/native/bin/x86_64-apple-darwin11-ar" CC="$(host_prefix)/native/bin/$($(package)_cc)" 12 | $(package)_config_opts_linux+=libudev_LIBS="-L$(host_prefix)/lib -ludev" 13 | $(package)_config_opts_linux+=libudev_CFLAGS=-I$(host_prefix)/include 14 | $(package)_config_opts_linux+=libusb_LIBS="-L$(host_prefix)/lib -lusb-1.0" 15 | $(package)_config_opts_linux+=libusb_CFLAGS=-I$(host_prefix)/include/libusb-1.0 16 | $(package)_config_opts_linux+=--with-pic 17 | endef 18 | 19 | define $(package)_config_cmds 20 | ./bootstrap &&\ 21 | $($(package)_autoconf) $($(package)_config_opts) 22 | endef 23 | 24 | define $(package)_build_cmds 25 | $(MAKE) 26 | endef 27 | 28 | define $(package)_stage_cmds 29 | $(MAKE) DESTDIR=$($(package)_staging_dir) install 30 | endef 31 | -------------------------------------------------------------------------------- /contrib/depends/packages/icu4c.mk: -------------------------------------------------------------------------------- 1 | package=icu4c 2 | $(package)_version=55.1 3 | $(package)_download_path=https://github.com/stoffu/depends-sources/releases/download/v1 # https://github.com/TheCharlatan/icu4c/archive 4 | $(package)_file_name=$(package)-$($(package)_version).tar.gz 5 | $(package)_sha256_hash=1f912c54035533fb4268809701d65c7468d00e292efbc31e6444908450cc46ef 6 | $(package)_patches=icu-001-dont-build-static-dynamic-twice.patch 7 | 8 | define $(package)_set_vars 9 | $(package)_build_opts=CFLAGS="$($(package)_cflags) $($(package)_cppflags) -DU_USING_ICU_NAMESPACE=0 --std=gnu++0x -DU_STATIC_IMPLEMENTATION -DU_COMBINED_IMPLEMENTATION -fPIC" 10 | endef 11 | 12 | define $(package)_config_cmds 13 | patch -p1 < $($(package)_patch_dir)/icu-001-dont-build-static-dynamic-twice.patch &&\ 14 | mkdir builda &&\ 15 | mkdir buildb &&\ 16 | cd builda &&\ 17 | sh ../source/runConfigureICU Linux &&\ 18 | make &&\ 19 | cd ../buildb &&\ 20 | sh ../source/$($(package)_autoconf) --enable-static=yes --enable-shared=yes --disable-layoutex --prefix=$(host_prefix) --with-cross-build=`pwd`/../builda &&\ 21 | $(MAKE) $($(package)_build_opts) 22 | endef 23 | 24 | #define $(package)_build_cmds 25 | # cd source &&\ 26 | $(MAKE) $($((package)_build_opts) `nproc` 27 | #endef 28 | 29 | define $(package)_stage_cmds 30 | cd buildb &&\ 31 | $(MAKE) $($(package)_build_opts) DESTDIR=$($(package)_staging_dir) install lib/* 32 | endef 33 | -------------------------------------------------------------------------------- /contrib/depends/packages/ldns.mk: -------------------------------------------------------------------------------- 1 | package=ldns 2 | $(package)_version=1.6.17 3 | $(package)_download_path=http://www.nlnetlabs.nl/downloads/ldns/ 4 | $(package)_file_name=$(package)-$($(package)_version).tar.gz 5 | $(package)_sha256_hash=8b88e059452118e8949a2752a55ce59bc71fa5bc414103e17f5b6b06f9bcc8cd 6 | $(package)_dependencies=openssl 7 | 8 | define $(package)_set_vars 9 | $(package)_config_opts=--disable-shared --enable-static --disable-dane-ta-usage --with-drill 10 | $(package)_config_opts=--with-ssl=$(host_prefix) 11 | $(package)_config_opts_release=--disable-debug-mode 12 | $(package)_config_opts_linux=--with-pic 13 | endef 14 | 15 | define $(package)_config_cmds 16 | $($(package)_autoconf) 17 | endef 18 | 19 | define $(package)_build_cmds 20 | $(MAKE) 21 | endef 22 | 23 | define $(package)_stage_cmds 24 | $(MAKE) DESTDIR=$($(package)_staging_dir) install-h install-lib 25 | endef 26 | 27 | define $(package)_postprocess_cmds 28 | endef 29 | -------------------------------------------------------------------------------- /contrib/depends/packages/libICE.mk: -------------------------------------------------------------------------------- 1 | package=libICE 2 | $(package)_version=1.0.9 3 | $(package)_download_path=http://xorg.freedesktop.org/releases/individual/lib/ 4 | $(package)_file_name=$(package)-$($(package)_version).tar.bz2 5 | $(package)_sha256_hash=8f7032f2c1c64352b5423f6b48a8ebdc339cc63064af34d66a6c9aa79759e202 6 | $(package)_dependencies=xtrans xproto 7 | 8 | define $(package)_set_vars 9 | $(package)_config_opts=--disable-static --disable-docs --disable-specs --without-xsltproc 10 | $(package)_config_opts_linux=--with-pic 11 | endef 12 | 13 | define $(package)_config_cmds 14 | $($(package)_autoconf) 15 | endef 16 | 17 | define $(package)_build_cmds 18 | $(MAKE) 19 | endef 20 | 21 | define $(package)_stage_cmds 22 | $(MAKE) DESTDIR=$($(package)_staging_dir) install 23 | endef 24 | -------------------------------------------------------------------------------- /contrib/depends/packages/libSM.mk: -------------------------------------------------------------------------------- 1 | package=libSM 2 | $(package)_version=1.2.2 3 | $(package)_download_path=http://xorg.freedesktop.org/releases/individual/lib/ 4 | $(package)_file_name=$(package)-$($(package)_version).tar.bz2 5 | $(package)_sha256_hash=0baca8c9f5d934450a70896c4ad38d06475521255ca63b717a6510fdb6e287bd 6 | $(package)_dependencies=xtrans xproto libICE 7 | 8 | define $(package)_set_vars 9 | $(package)_config_opts=--without-libuuid --without-xsltproc --disable-docs --disable-static 10 | $(package)_config_opts_linux=--with-pic 11 | endef 12 | 13 | define $(package)_config_cmds 14 | $($(package)_autoconf) 15 | endef 16 | 17 | define $(package)_build_cmds 18 | $(MAKE) 19 | endef 20 | 21 | define $(package)_stage_cmds 22 | $(MAKE) DESTDIR=$($(package)_staging_dir) install 23 | endef 24 | -------------------------------------------------------------------------------- /contrib/depends/packages/libevent.mk: -------------------------------------------------------------------------------- 1 | package=libevent 2 | $(package)_version=2.1.8-stable 3 | $(package)_download_path=https://github.com/stoffu/depends-sources/releases/download/v1 # https://github.com/libevent/libevent/archive/ 4 | $(package)_file_name=$(package)-release-$($(package)_version).tar.gz 5 | $(package)_sha256_hash=316ddb401745ac5d222d7c529ef1eada12f58f6376a66c1118eee803cb70f83d 6 | 7 | define $(package)_preprocess_cmds 8 | ./autogen.sh 9 | endef 10 | 11 | define $(package)_set_vars 12 | $(package)_config_opts=--disable-shared --disable-openssl --disable-libevent-regress --disable-samples 13 | $(package)_config_opts_release=--disable-debug-mode 14 | $(package)_config_opts_linux=--with-pic 15 | endef 16 | 17 | define $(package)_config_cmds 18 | $($(package)_autoconf) 19 | endef 20 | 21 | define $(package)_build_cmds 22 | $(MAKE) 23 | endef 24 | 25 | define $(package)_stage_cmds 26 | $(MAKE) DESTDIR=$($(package)_staging_dir) install 27 | endef 28 | 29 | define $(package)_postprocess_cmds 30 | endef 31 | -------------------------------------------------------------------------------- /contrib/depends/packages/libiconv.mk: -------------------------------------------------------------------------------- 1 | package=libiconv 2 | $(package)_version=1.15 3 | $(package)_download_path=https://ftp.gnu.org/gnu/libiconv 4 | $(package)_file_name=libiconv-$($(package)_version).tar.gz 5 | $(package)_sha256_hash=ccf536620a45458d26ba83887a983b96827001e92a13847b45e4925cc8913178 6 | $(package)_patches=fix-whitespace.patch 7 | 8 | define $(package)_set_vars 9 | $(package)_config_opts=--disable-nls 10 | $(package)_config_opts=--enable-static 11 | $(package)_config_opts=--disable-shared 12 | $(package)_config_opts_linux=--with-pic 13 | endef 14 | 15 | define $(package)_preprocess_cmds 16 | cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub build-aux/ &&\ 17 | patch -p1 < $($(package)_patch_dir)/fix-whitespace.patch 18 | endef 19 | 20 | define $(package)_config_cmds 21 | $($(package)_autoconf) 22 | endef 23 | 24 | define $(package)_build_cmds 25 | $(MAKE) 26 | endef 27 | 28 | define $(package)_stage_cmds 29 | $(MAKE) DESTDIR=$($(package)_staging_dir) install 30 | endef 31 | -------------------------------------------------------------------------------- /contrib/depends/packages/libusb.mk: -------------------------------------------------------------------------------- 1 | package=libusb 2 | $(package)_version=1.0.9 3 | $(package)_download_path=http://sourceforge.net/projects/libusb/files/libusb-1.0/libusb-1.0.9/ 4 | $(package)_file_name=$(package)-$($(package)_version).tar.bz2 5 | $(package)_sha256_hash=e920eedc2d06b09606611c99ec7304413c6784cba6e33928e78243d323195f9b 6 | 7 | define $(package)_preprocess_cmds 8 | autoreconf -i 9 | endef 10 | 11 | define $(package)_set_vars 12 | $(package)_config_opts=--disable-shared 13 | $(package)_config_opts_linux=--with-pic 14 | endef 15 | 16 | define $(package)_config_cmds 17 | cp -f $(BASEDIR)/config.guess config.guess &&\ 18 | cp -f $(BASEDIR)/config.sub config.sub &&\ 19 | $($(package)_autoconf) 20 | endef 21 | 22 | define $(package)_build_cmd 23 | $(MAKE) 24 | endef 25 | 26 | define $(package)_stage_cmds 27 | $(MAKE) DESTDIR=$($(package)_staging_dir) install 28 | endef 29 | 30 | define $(package)_postprocess_cmds cp -f lib/libusb-1.0.a lib/libusb.a 31 | endef 32 | -------------------------------------------------------------------------------- /contrib/depends/packages/miniupnpc.mk: -------------------------------------------------------------------------------- 1 | package=miniupnpc 2 | $(package)_version=2.0.20170509 3 | $(package)_download_path=http://miniupnp.free.fr/files 4 | $(package)_file_name=$(package)-$($(package)_version).tar.gz 5 | $(package)_sha256_hash=d3c368627f5cdfb66d3ebd64ca39ba54d6ff14a61966dbecb8dd296b7039f16a 6 | 7 | define $(package)_set_vars 8 | $(package)_build_opts=CC="$($(package)_cc)" 9 | $(package)_build_opts_darwin=OS=Darwin LIBTOOL="$($(package)_libtool)" 10 | $(package)_build_opts_mingw32=-f Makefile.mingw 11 | $(package)_build_env+=CFLAGS="$($(package)_cflags) $($(package)_cppflags)" AR="$($(package)_ar)" 12 | endef 13 | 14 | define $(package)_preprocess_cmds 15 | mkdir dll && \ 16 | sed -e 's|MINIUPNPC_VERSION_STRING \"version\"|MINIUPNPC_VERSION_STRING \"$($(package)_version)\"|' -e 's|OS/version|$(host)|' miniupnpcstrings.h.in > miniupnpcstrings.h && \ 17 | sed -i.old "s|miniupnpcstrings.h: miniupnpcstrings.h.in wingenminiupnpcstrings|miniupnpcstrings.h: miniupnpcstrings.h.in|" Makefile.mingw 18 | endef 19 | 20 | define $(package)_build_cmds 21 | $(MAKE) libminiupnpc.a $($(package)_build_opts) 22 | endef 23 | 24 | define $(package)_stage_cmds 25 | mkdir -p $($(package)_staging_prefix_dir)/include/miniupnpc $($(package)_staging_prefix_dir)/lib &&\ 26 | install *.h $($(package)_staging_prefix_dir)/include/miniupnpc &&\ 27 | install libminiupnpc.a $($(package)_staging_prefix_dir)/lib 28 | endef 29 | -------------------------------------------------------------------------------- /contrib/depends/packages/native_biplist.mk: -------------------------------------------------------------------------------- 1 | package=native_biplist 2 | $(package)_version=0.9 3 | $(package)_download_path=https://pypi.python.org/packages/source/b/biplist 4 | $(package)_file_name=biplist-$($(package)_version).tar.gz 5 | $(package)_sha256_hash=b57cadfd26e4754efdf89e9e37de87885f9b5c847b2615688ca04adfaf6ca604 6 | $(package)_install_libdir=$(build_prefix)/lib/python/dist-packages 7 | $(package)_patches=sorted_list.patch 8 | 9 | define $(package)_preprocess_cmds 10 | patch -p1 < $($(package)_patch_dir)/sorted_list.patch 11 | endef 12 | 13 | define $(package)_build_cmds 14 | python setup.py build 15 | endef 16 | 17 | define $(package)_stage_cmds 18 | mkdir -p $($(package)_install_libdir) && \ 19 | python setup.py install --root=$($(package)_staging_dir) --prefix=$(build_prefix) --install-lib=$($(package)_install_libdir) 20 | endef 21 | -------------------------------------------------------------------------------- /contrib/depends/packages/native_ccache.mk: -------------------------------------------------------------------------------- 1 | package=native_ccache 2 | $(package)_version=3.3.4 3 | $(package)_download_path=https://samba.org/ftp/ccache 4 | $(package)_file_name=ccache-$($(package)_version).tar.bz2 5 | $(package)_sha256_hash=fa9d7f38367431bc86b19ad107d709ca7ecf1574fdacca01698bdf0a47cd8567 6 | 7 | define $(package)_set_vars 8 | $(package)_config_opts= 9 | endef 10 | 11 | define $(package)_config_cmds 12 | $($(package)_autoconf) 13 | endef 14 | 15 | define $(package)_build_cmds 16 | $(MAKE) 17 | endef 18 | 19 | define $(package)_stage_cmds 20 | $(MAKE) DESTDIR=$($(package)_staging_dir) install 21 | endef 22 | 23 | define $(package)_postprocess_cmds 24 | rm -rf lib include 25 | endef 26 | -------------------------------------------------------------------------------- /contrib/depends/packages/native_cdrkit.mk: -------------------------------------------------------------------------------- 1 | package=native_cdrkit 2 | $(package)_version=1.1.11 3 | $(package)_download_path=http://distro.ibiblio.org/fatdog/source/600/c 4 | $(package)_file_name=cdrkit-$($(package)_version).tar.bz2 5 | $(package)_sha256_hash=b50d64c214a65b1a79afe3a964c691931a4233e2ba605d793eb85d0ac3652564 6 | $(package)_patches=cdrkit-deterministic.patch 7 | 8 | define $(package)_preprocess_cmds 9 | patch -p1 < $($(package)_patch_dir)/cdrkit-deterministic.patch 10 | endef 11 | 12 | define $(package)_config_cmds 13 | cmake -DCMAKE_INSTALL_PREFIX=$(build_prefix) 14 | endef 15 | 16 | define $(package)_build_cmds 17 | $(MAKE) genisoimage 18 | endef 19 | 20 | define $(package)_stage_cmds 21 | $(MAKE) DESTDIR=$($(package)_staging_dir) -C genisoimage install 22 | endef 23 | 24 | define $(package)_postprocess_cmds 25 | rm bin/isovfy bin/isoinfo bin/isodump bin/isodebug bin/devdump 26 | endef 27 | -------------------------------------------------------------------------------- /contrib/depends/packages/native_cmake-unused.mk: -------------------------------------------------------------------------------- 1 | package=native_cmake 2 | $(package)_version=3.14.0 3 | $(package)_version_dot=v3.14 4 | $(package)_download_path=https://cmake.org/files/$($(package)_version_dot)/ 5 | $(package)_file_name=cmake-$($(package)_version).tar.gz 6 | $(package)_sha256_hash=aa76ba67b3c2af1946701f847073f4652af5cbd9f141f221c97af99127e75502 7 | 8 | define $(package)_set_vars 9 | $(package)_config_opts= 10 | endef 11 | 12 | define $(package)_config_cmds 13 | ./bootstrap &&\ 14 | ./configure $($(package)_config_opts) 15 | endef 16 | 17 | define $(package)_build_cmd 18 | $(MAKE) 19 | endef 20 | 21 | define $(package)_stage_cmds 22 | $(MAKE) DESTDIR=$($(package)_staging_dir) install 23 | endef 24 | -------------------------------------------------------------------------------- /contrib/depends/packages/native_ds_store.mk: -------------------------------------------------------------------------------- 1 | package=native_ds_store 2 | $(package)_version=1.1.0 3 | $(package)_download_path=https://github.com/stoffu/depends-sources/releases/download/v1 # https://github.com/al45tair/ds_store/archive 4 | $(package)_download_file=$(package)-v$($(package)_version).tar.gz 5 | $(package)_file_name=$(package)-$($(package)_version).tar.gz 6 | $(package)_sha256_hash=a9f4c0755c6be7224ff7029e188dd262e830bb81e801424841db9eb0780ec8ed 7 | $(package)_install_libdir=$(build_prefix)/lib/python/dist-packages 8 | $(package)_dependencies=native_biplist 9 | 10 | define $(package)_build_cmds 11 | python setup.py build 12 | endef 13 | 14 | define $(package)_stage_cmds 15 | mkdir -p $($(package)_install_libdir) && \ 16 | python setup.py install --root=$($(package)_staging_dir) --prefix=$(build_prefix) --install-lib=$($(package)_install_libdir) 17 | endef 18 | -------------------------------------------------------------------------------- /contrib/depends/packages/native_libdmg-hfsplus.mk: -------------------------------------------------------------------------------- 1 | package=native_libdmg-hfsplus 2 | $(package)_version=0.1 3 | $(package)_download_path=https://github.com/theuni/libdmg-hfsplus/archive 4 | $(package)_file_name=libdmg-hfsplus-v$($(package)_version).tar.gz 5 | $(package)_sha256_hash=6569a02eb31c2827080d7d59001869ea14484c281efab0ae7f2b86af5c3120b3 6 | $(package)_build_subdir=build 7 | 8 | define $(package)_preprocess_cmds 9 | mkdir build 10 | endef 11 | 12 | define $(package)_config_cmds 13 | cmake -DCMAKE_INSTALL_PREFIX:PATH=$(build_prefix)/bin .. 14 | endef 15 | 16 | define $(package)_build_cmds 17 | $(MAKE) -C dmg 18 | endef 19 | 20 | define $(package)_stage_cmds 21 | $(MAKE) DESTDIR=$($(package)_staging_dir) -C dmg install 22 | endef 23 | -------------------------------------------------------------------------------- /contrib/depends/packages/native_mac_alias.mk: -------------------------------------------------------------------------------- 1 | package=native_mac_alias 2 | $(package)_version=1.1.0 3 | $(package)_download_path=https://github.com/stoffu/depends-sources/releases/download/v1 # https://github.com/al45tair/mac_alias/archive 4 | $(package)_download_file=$(package)-v$($(package)_version).tar.gz 5 | $(package)_file_name=$(package)-$($(package)_version).tar.gz 6 | $(package)_sha256_hash=b10cb44ecb64fc25283fae7a9cf365d2829377d84e37b9c21100aca8757509be 7 | $(package)_install_libdir=$(build_prefix)/lib/python/dist-packages 8 | $(package)_patches=python3.patch 9 | 10 | define $(package)_preprocess_cmds 11 | patch -p1 < $($(package)_patch_dir)/python3.patch 12 | endef 13 | 14 | define $(package)_build_cmds 15 | python setup.py build 16 | endef 17 | 18 | define $(package)_stage_cmds 19 | mkdir -p $($(package)_install_libdir) && \ 20 | python setup.py install --root=$($(package)_staging_dir) --prefix=$(build_prefix) --install-lib=$($(package)_install_libdir) 21 | endef 22 | -------------------------------------------------------------------------------- /contrib/depends/packages/packages.mk: -------------------------------------------------------------------------------- 1 | packages:=boost openssl libevent zeromq cppzmq zlib expat ldns readline libiconv qt hidapi 2 | native_packages := native_ccache 3 | 4 | wallet_packages=bdb 5 | 6 | darwin_native_packages = native_biplist native_ds_store native_mac_alias 7 | darwin_packages = sodium-darwin 8 | 9 | linux_packages = eudev libusb 10 | 11 | ifeq ($(build_tests),ON) 12 | packages += gtest 13 | endif 14 | 15 | ifeq ($(host_os),linux) 16 | packages += unwind 17 | packages += sodium 18 | endif 19 | ifeq ($(host_os),mingw32) 20 | packages += icu4c 21 | packages += sodium 22 | endif 23 | 24 | ifneq ($(build_os),darwin) 25 | darwin_native_packages += native_cctools native_cdrkit native_libdmg-hfsplus 26 | packages += readline 27 | endif 28 | 29 | -------------------------------------------------------------------------------- /contrib/depends/packages/protobuf.mk: -------------------------------------------------------------------------------- 1 | package=protobuf 2 | $(package)_version=$(native_$(package)_version) 3 | $(package)_download_path=$(native_$(package)_download_path) 4 | $(package)_file_name=$(native_$(package)_file_name) 5 | $(package)_sha256_hash=$(native_$(package)_sha256_hash) 6 | $(package)_dependencies=native_$(package) 7 | $(package)_cxxflags=-std=c++11 8 | 9 | define $(package)_set_vars 10 | $(package)_config_opts=--disable-shared --with-protoc=$(build_prefix)/bin/protoc 11 | $(package)_config_opts_linux=--with-pic 12 | endef 13 | 14 | define $(package)_config_cmds 15 | $($(package)_autoconf) 16 | endef 17 | 18 | define $(package)_build_cmds 19 | $(MAKE) -C src libprotobuf.la 20 | endef 21 | 22 | define $(package)_stage_cmds 23 | $(MAKE) DESTDIR=$($(package)_staging_dir) -C src install-libLTLIBRARIES install-nobase_includeHEADERS &&\ 24 | $(MAKE) DESTDIR=$($(package)_staging_dir) install-pkgconfigDATA 25 | endef 26 | 27 | define $(package)_postprocess_cmds 28 | rm lib/libprotoc.a 29 | endef 30 | -------------------------------------------------------------------------------- /contrib/depends/packages/readline.mk: -------------------------------------------------------------------------------- 1 | package=readline 2 | $(package)_version=6.3 3 | $(package)_download_path=ftp://ftp.cwru.edu/pub/bash/ 4 | $(package)_file_name=$(package)-$($(package)_version).tar.gz 5 | $(package)_sha256_hash=56ba6071b9462f980c5a72ab0023893b65ba6debb4eeb475d7a563dc65cafd43 6 | $(package)_patches=readline-1.patch 7 | 8 | define $(package)_set_vars 9 | $(package)_build_opts=CC="$($(package)_cc)" 10 | $(package)_config_env=AR="$($(package)_ar)" RANLIB="$($(package)_ranlib)" CC="$($(package)_cc)" 11 | $(package)_config_opts=--prefix=$(host_prefix) 12 | $(package)_config_opts+=--disable-shared --enable-multibye --without-purify --without-curses 13 | $(package)_config_opts_release=--disable-debug-mode 14 | $(package)_build_opts=CFLAGS="$($(package)_cflags) $($(package)_cppflags) -fPIC" 15 | endef 16 | 17 | define $(package)_config_cmds 18 | patch -p1 < $($(package)_patch_dir)/readline-1.patch &&\ 19 | export bash_cv_have_mbstate_t=yes &&\ 20 | export bash_cv_wcwidth_broken=yes &&\ 21 | ./configure $($(package)_config_opts) 22 | endef 23 | 24 | define $(package)_build_cmds 25 | $(MAKE) $($(package)_build_opts) 26 | endef 27 | 28 | define $(package)_stage_cmds 29 | $(MAKE) DESTDIR=$($(package)_staging_dir) install 30 | endef 31 | 32 | define $(package)_postprocess_cmds 33 | endef 34 | -------------------------------------------------------------------------------- /contrib/depends/packages/sodium-darwin.mk: -------------------------------------------------------------------------------- 1 | package=sodium-darwin 2 | $(package)_version=1.0.18 3 | $(package)_download_path=https://download.libsodium.org/libsodium/releases/ 4 | $(package)_file_name=libsodium-$($(package)_version).tar.gz 5 | $(package)_sha256_hash=6f504490b342a4f8a4c4a02fc9b866cbef8622d5df4e5452b46be121e46636c1 6 | 7 | define $(package)_set_vars 8 | $(package)_build_opts_darwin=OS=Darwin LIBTOOL="$($(package)_libtool)" 9 | $(package)_config_opts=--enable-static --disable-shared 10 | $(package)_config_opts+=--prefix=$(host_prefix) 11 | endef 12 | 13 | define $(package)_config_cmds 14 | ./autogen.sh &&\ 15 | $($(package)_autoconf) $($(package)_config_opts) RANLIB="$(host_prefix)/native/bin/x86_64-apple-darwin11-ranlib" AR="$(host_prefix)/native/bin/x86_64-apple-darwin11-ar" CC="$(host_prefix)/native/bin/$($(package)_cc)" 16 | endef 17 | 18 | define $(package)_build_cmds 19 | echo "path is problematic here" &&\ 20 | make 21 | endef 22 | 23 | define $(package)_stage_cmds 24 | $(MAKE) DESTDIR=$($(package)_staging_dir) install 25 | endef 26 | -------------------------------------------------------------------------------- /contrib/depends/packages/sodium.mk: -------------------------------------------------------------------------------- 1 | package=sodium 2 | $(package)_version=1.0.18 3 | $(package)_download_path=https://download.libsodium.org/libsodium/releases/ 4 | $(package)_file_name=libsodium-$($(package)_version).tar.gz 5 | $(package)_sha256_hash=6f504490b342a4f8a4c4a02fc9b866cbef8622d5df4e5452b46be121e46636c1 6 | $(package)_patches=fix-whitespace.patch 7 | 8 | define $(package)_set_vars 9 | $(package)_config_opts=--enable-static --disable-shared 10 | $(package)_config_opts+=--prefix=$(host_prefix) 11 | endef 12 | 13 | define $(package)_config_cmds 14 | ./autogen.sh &&\ 15 | patch -p1 < $($(package)_patch_dir)/fix-whitespace.patch &&\ 16 | $($(package)_autoconf) $($(package)_config_opts) 17 | endef 18 | 19 | define $(package)_build_cmds 20 | $(MAKE) 21 | endef 22 | 23 | define $(package)_stage_cmds 24 | $(MAKE) DESTDIR=$($(package)_staging_dir) install 25 | endef 26 | -------------------------------------------------------------------------------- /contrib/depends/packages/unbound.mk: -------------------------------------------------------------------------------- 1 | package=unbound 2 | $(package)_version=1.6.8 3 | $(package)_download_path=http://www.unbound.net/downloads/ 4 | $(package)_file_name=$(package)-$($(package)_version).tar.gz 5 | $(package)_sha256_hash=e3b428e33f56a45417107448418865fe08d58e0e7fea199b855515f60884dd49 6 | $(package)_dependencies=openssl expat ldns 7 | 8 | define $(package)_set_vars 9 | $(package)_config_opts=--disable-shared --enable-static --without-pyunbound --prefix=$(host_prefix) --with-libexpat=$(host_prefix) --with-ssl=$(host_prefix) --with-libevent=no --without-pythonmodule --disable-flto --with-pthreads 10 | $(package)_config_opts_linux=--with-pic 11 | $(package)_config_opts_w64=--enable-static-exe --sysconfdir=/etc --prefix=$(host_prefix) --target=$(host_prefix) 12 | $(package)_build_opts_mingw32=LDFLAGS="$($(package)_ldflags) -lpthread" 13 | endef 14 | 15 | define $(package)_config_cmds 16 | $($(package)_autoconf) $($(package)_config_opts) 17 | endef 18 | 19 | define $(package)_build_cmds 20 | $(MAKE) $($(package)_build_opts) 21 | endef 22 | 23 | define $(package)_stage_cmds 24 | $(MAKE) DESTDIR=$($(package)_staging_dir) install 25 | endef 26 | 27 | define $(package)_postprocess_cmds 28 | endef 29 | -------------------------------------------------------------------------------- /contrib/depends/packages/unwind.mk: -------------------------------------------------------------------------------- 1 | package=unwind 2 | $(package)_version=1.2 3 | $(package)_download_path=http://download.savannah.nongnu.org/releases/libunwind 4 | $(package)_file_name=lib$(package)-$($(package)_version).tar.gz 5 | $(package)_sha256_hash=1de38ffbdc88bd694d10081865871cd2bfbb02ad8ef9e1606aee18d65532b992 6 | 7 | define $(package)_config_cmds 8 | cp -f $(BASEDIR)/config.guess config/config.guess &&\ 9 | cp -f $(BASEDIR)/config.sub config/config.sub &&\ 10 | $($(package)_autoconf) --disable-shared --enable-static 11 | endef 12 | 13 | define $(package)_build_cmds 14 | $(MAKE) 15 | endef 16 | 17 | define $(package)_stage_cmds 18 | $(MAKE) DESTDIR=$($(package)_staging_dir) install 19 | endef 20 | 21 | define $(package)_postprocess_cmds 22 | endef 23 | -------------------------------------------------------------------------------- /contrib/depends/packages/xproto.mk: -------------------------------------------------------------------------------- 1 | package=xproto 2 | $(package)_version=7.0.26 3 | $(package)_download_path=http://xorg.freedesktop.org/releases/individual/proto 4 | $(package)_file_name=$(package)-$($(package)_version).tar.bz2 5 | $(package)_sha256_hash=636162c1759805a5a0114a369dffdeccb8af8c859ef6e1445f26a4e6e046514f 6 | 7 | define $(package)_set_vars 8 | $(package)_config_opts=--disable-shared 9 | endef 10 | 11 | define $(package)_config_cmds 12 | $($(package)_autoconf) 13 | endef 14 | 15 | define $(package)_build_cmds 16 | $(MAKE) 17 | endef 18 | 19 | define $(package)_stage_cmds 20 | $(MAKE) DESTDIR=$($(package)_staging_dir) install 21 | endef 22 | -------------------------------------------------------------------------------- /contrib/depends/packages/zeromq.mk: -------------------------------------------------------------------------------- 1 | package=zeromq 2 | $(package)_version=4.1.5 3 | $(package)_download_path=https://github.com/zeromq/zeromq4-1/releases/download/v$($(package)_version)/ 4 | $(package)_file_name=$(package)-$($(package)_version).tar.gz 5 | $(package)_sha256_hash=04aac57f081ffa3a2ee5ed04887be9e205df3a7ddade0027460b8042432bdbcf 6 | $(package)_patches=9114d3957725acd34aa8b8d011585812f3369411.patch 9e6745c12e0b100cd38acecc16ce7db02905e27c.patch 7 | 8 | define $(package)_set_vars 9 | $(package)_config_opts=--without-documentation --disable-shared --without-libsodium --disable-curve 10 | $(package)_config_opts_linux=--with-pic 11 | $(package)_cxxflags=-std=c++11 12 | endef 13 | 14 | define $(package)_preprocess_cmds 15 | patch -p1 < $($(package)_patch_dir)/9114d3957725acd34aa8b8d011585812f3369411.patch && \ 16 | patch -p1 < $($(package)_patch_dir)/9e6745c12e0b100cd38acecc16ce7db02905e27c.patch && \ 17 | ./autogen.sh 18 | endef 19 | 20 | define $(package)_config_cmds 21 | $($(package)_autoconf) 22 | endef 23 | 24 | define $(package)_build_cmds 25 | $(MAKE) libzmq.la 26 | endef 27 | 28 | define $(package)_stage_cmds 29 | $(MAKE) DESTDIR=$($(package)_staging_dir) install-libLTLIBRARIES install-includeHEADERS install-pkgconfigDATA 30 | endef 31 | 32 | define $(package)_postprocess_cmds 33 | rm -rf bin share 34 | endef 35 | -------------------------------------------------------------------------------- /contrib/depends/packages/zlib.mk: -------------------------------------------------------------------------------- 1 | package=zlib 2 | $(package)_version=1.2.11 3 | $(package)_download_path=http://www.zlib.net 4 | $(package)_file_name=$(package)-$($(package)_version).tar.gz 5 | $(package)_sha256_hash=c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1 6 | 7 | define $(package)_set_vars 8 | $(package)_build_opts= CC="$($(package)_cc)" 9 | $(package)_build_opts+=CFLAGS="$($(package)_cflags) $($(package)_cppflags) -fPIC" 10 | $(package)_build_opts+=RANLIB="$($(package)_ranlib)" 11 | $(package)_build_opts+=AR="$($(package)_ar)" 12 | $(package)_build_opts_darwin+=AR="$($(package)_libtool)" 13 | $(package)_build_opts_darwin+=ARFLAGS="-o" 14 | endef 15 | 16 | define $(package)_config_cmds 17 | ./configure --static --prefix=$(host_prefix) 18 | endef 19 | 20 | define $(package)_build_cmds 21 | $(MAKE) $($(package)_build_opts) libz.a 22 | endef 23 | 24 | define $(package)_stage_cmds 25 | $(MAKE) DESTDIR=$($(package)_staging_dir) install $($(package)_build_opts) 26 | endef 27 | 28 | -------------------------------------------------------------------------------- /contrib/depends/patches/icu4c/icu-001-dont-build-static-dynamic-twice.patch: -------------------------------------------------------------------------------- 1 | Don't build object files twice 2 | 3 | When passed --enable-static and --enable-shared, icu will generate 4 | both a shared and a static version of its libraries. 5 | 6 | However, in order to do so, it builds each and every object file 7 | twice: once with -fPIC (for the shared library), and once without 8 | -fPIC (for the static library). While admittedly building -fPIC for a 9 | static library generates a slightly suboptimal code, this is what all 10 | the autotools-based project are doing. They build each object file 11 | once, and they use it for both the static and shared libraries. 12 | 13 | icu builds the object files for the shared library as .o files, and 14 | the object files for static library as .ao files. By simply changing 15 | the suffix of object files used for static libraries to ".o", we tell 16 | icu to use the ones built for the shared library (i.e, with -fPIC), 17 | and avoid the double build of icu. 18 | 19 | On a fast build server, this brings the target icu build from 20 | 3m41.302s down to 1m43.926s (approximate numbers: some other builds 21 | are running on the system at the same time). 22 | 23 | Signed-off-by: Thomas Petazzoni 24 | 25 | Index: b/source/config/mh-linux 26 | =================================================================== 27 | --- a/source/config/mh-linux 28 | +++ b/source/config/mh-linux 29 | @@ -38,7 +38,7 @@ 30 | ## Shared object suffix 31 | SO = so 32 | ## Non-shared intermediate object suffix 33 | -STATIC_O = ao 34 | +STATIC_O = o 35 | 36 | ## Compilation rules 37 | %.$(STATIC_O): $(srcdir)/%.c 38 | -------------------------------------------------------------------------------- /contrib/depends/patches/libiconv/fix-whitespace.patch: -------------------------------------------------------------------------------- 1 | diff --git a/preload/configure b/preload/configure 2 | index aab5c77..e20b8f0 100755 3 | --- a/preload/configure 4 | +++ b/preload/configure 5 | @@ -588,7 +588,7 @@ MAKEFLAGS= 6 | PACKAGE_NAME='libiconv' 7 | PACKAGE_TARNAME='libiconv' 8 | PACKAGE_VERSION='0' 9 | -PACKAGE_STRING='libiconv 0' 10 | +PACKAGE_STRING='libiconv0' 11 | PACKAGE_BUGREPORT='' 12 | PACKAGE_URL='' 13 | 14 | -------------------------------------------------------------------------------- /contrib/depends/patches/native_biplist/sorted_list.patch: -------------------------------------------------------------------------------- 1 | --- a/biplist/__init__.py 2014-10-26 19:03:11.000000000 +0000 2 | +++ b/biplist/__init__.py 2016-07-19 19:30:17.663521999 +0000 3 | @@ -541,7 +541,7 @@ 4 | return HashableWrapper(n) 5 | elif isinstance(root, dict): 6 | n = {} 7 | - for key, value in iteritems(root): 8 | + for key, value in sorted(iteritems(root)): 9 | n[self.wrapRoot(key)] = self.wrapRoot(value) 10 | return HashableWrapper(n) 11 | elif isinstance(root, list): 12 | @@ -616,7 +616,7 @@ 13 | elif isinstance(obj, dict): 14 | size = proc_size(len(obj)) 15 | self.incrementByteCount('dictBytes', incr=1+size) 16 | - for key, value in iteritems(obj): 17 | + for key, value in sorted(iteritems(obj)): 18 | check_key(key) 19 | self.computeOffsets(key, asReference=True) 20 | self.computeOffsets(value, asReference=True) 21 | @@ -714,7 +714,7 @@ 22 | keys = [] 23 | values = [] 24 | objectsToWrite = [] 25 | - for key, value in iteritems(obj): 26 | + for key, value in sorted(iteritems(obj)): 27 | keys.append(key) 28 | values.append(value) 29 | for key in keys: 30 | -------------------------------------------------------------------------------- /contrib/depends/patches/qt/fix_qt_pkgconfig.patch: -------------------------------------------------------------------------------- 1 | --- old/qtbase/mkspecs/features/qt_module.prf 2 | +++ new/qtbase/mkspecs/features/qt_module.prf 3 | @@ -245,7 +245,7 @@ 4 | load(qt_targets) 5 | 6 | # this builds on top of qt_common 7 | -!internal_module:!lib_bundle:if(unix|mingw) { 8 | +unix|mingw { 9 | CONFIG += create_pc 10 | QMAKE_PKGCONFIG_DESTDIR = pkgconfig 11 | host_build: \ 12 | -------------------------------------------------------------------------------- /contrib/depends/patches/qt/qfixed-coretext.patch: -------------------------------------------------------------------------------- 1 | From dbdd5f0ffbce52c8b789ed09f1aa3f1da6c02e23 Mon Sep 17 00:00:00 2001 2 | From: Gabriel de Dietrich 3 | Date: Fri, 30 Mar 2018 11:58:16 -0700 4 | Subject: [PATCH] QCoreTextFontEngine: Fix build with Xcode 9.3 5 | 6 | Apple LLVM version 9.1.0 (clang-902.0.39.1) 7 | 8 | Error message: 9 | 10 | .../qfontengine_coretext.mm:827:20: error: qualified reference to 11 | 'QFixed' is a constructor name rather than a type in this context 12 | return QFixed::QFixed(int(CTFontGetUnitsPerEm(ctfont))); 13 | 14 | Change-Id: Iebe26b3b087a16b10664208fc8851cbddb47f043 15 | Reviewed-by: Konstantin Ritt 16 | --- 17 | src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm | 2 +- 18 | 1 file changed, 1 insertion(+), 1 deletion(-) 19 | 20 | diff --git old/qtbase/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm new/qtbase/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm 21 | index 25ff69d877d..98b753eff96 100644 22 | --- old/qtbase/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm 23 | +++ new/qtbase/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm 24 | @@ -824,7 +824,7 @@ void QCoreTextFontEngine::getUnscaledGlyph(glyph_t glyph, QPainterPath *path, gl 25 | 26 | QFixed QCoreTextFontEngine::emSquareSize() const 27 | { 28 | - return QFixed::QFixed(int(CTFontGetUnitsPerEm(ctfont))); 29 | + return QFixed(int(CTFontGetUnitsPerEm(ctfont))); 30 | } 31 | 32 | QFontEngine *QCoreTextFontEngine::cloneWithSize(qreal pixelSize) const 33 | -- 34 | 2.16.3 -------------------------------------------------------------------------------- /contrib/depends/patches/sodium/fix-whitespace.patch: -------------------------------------------------------------------------------- 1 | diff --git a/configure b/configure 2 | index b29f769..ca008ae 100755 3 | --- a/configure 4 | +++ b/configure 5 | @@ -591,7 +591,7 @@ MAKEFLAGS= 6 | PACKAGE_NAME='libsodium' 7 | PACKAGE_TARNAME='libsodium' 8 | PACKAGE_VERSION='1.0.15' 9 | -PACKAGE_STRING='libsodium 1.0.15' 10 | +PACKAGE_STRING='libsodium' 11 | PACKAGE_BUGREPORT='https://github.com/jedisct1/libsodium/issues' 12 | PACKAGE_URL='https://github.com/jedisct1/libsodium' 13 | 14 | -------------------------------------------------------------------------------- /contrib/depends/patches/zeromq/9114d3957725acd34aa8b8d011585812f3369411.patch: -------------------------------------------------------------------------------- 1 | From 9114d3957725acd34aa8b8d011585812f3369411 Mon Sep 17 00:00:00 2001 2 | From: Jeroen Ooms 3 | Date: Tue, 20 Oct 2015 13:10:38 +0200 4 | Subject: [PATCH] enable static libraries on mingw 5 | 6 | --- 7 | configure.ac | 2 +- 8 | 1 file changed, 1 insertion(+), 1 deletion(-) 9 | 10 | diff --git a/configure.ac b/configure.ac 11 | index 393505b..e92131a 100644 12 | --- a/configure.ac 13 | +++ b/configure.ac 14 | @@ -265,7 +265,7 @@ case "${host_os}" in 15 | libzmq_dso_visibility="no" 16 | 17 | if test "x$enable_static" = "xyes"; then 18 | - AC_MSG_ERROR([Building static libraries is not supported under MinGW32]) 19 | + CPPFLAGS="-DZMQ_STATIC" 20 | fi 21 | 22 | # Set FD_SETSIZE to 1024 -------------------------------------------------------------------------------- /contrib/depends/patches/zeromq/9e6745c12e0b100cd38acecc16ce7db02905e27c.patch: -------------------------------------------------------------------------------- 1 | From 9e6745c12e0b100cd38acecc16ce7db02905e27c Mon Sep 17 00:00:00 2001 2 | From: David Millard 3 | Date: Tue, 10 May 2016 13:53:53 -0700 4 | Subject: [PATCH] Fix autotools for static MinGW builds 5 | 6 | --- 7 | configure.ac | 2 +- 8 | 1 file changed, 1 insertion(+), 1 deletion(-) 9 | 10 | diff --git a/configure.ac b/configure.ac 11 | index 5a0fa14..def6ea7 100644 12 | --- a/configure.ac 13 | +++ b/configure.ac 14 | @@ -259,7 +259,7 @@ case "${host_os}" in 15 | libzmq_dso_visibility="no" 16 | 17 | if test "x$enable_static" = "xyes"; then 18 | - CPPFLAGS="-DZMQ_STATIC" 19 | + CPPFLAGS="-DZMQ_STATIC $CPPFLAGS" 20 | fi 21 | 22 | # Set FD_SETSIZE to 1024 -------------------------------------------------------------------------------- /contrib/depends/protobuf.mk: -------------------------------------------------------------------------------- 1 | package=protobuf 2 | $(package)_version=$(native_$(package)_version) 3 | $(package)_download_path=$(native_$(package)_download_path) 4 | $(package)_file_name=$(native_$(package)_file_name) 5 | $(package)_sha256_hash=$(native_$(package)_sha256_hash) 6 | $(package)_dependencies=native_$(package) 7 | $(package)_cxxflags=-std=c++11 8 | 9 | define $(package)_set_vars 10 | $(package)_config_opts=--disable-shared --with-protoc=$(build_prefix)/bin/protoc 11 | $(package)_config_opts_linux=--with-pic 12 | endef 13 | 14 | define $(package)_config_cmds 15 | $($(package)_autoconf) 16 | endef 17 | 18 | define $(package)_build_cmds 19 | $(MAKE) -C src libprotobuf.la 20 | endef 21 | 22 | define $(package)_stage_cmds 23 | $(MAKE) DESTDIR=$($(package)_staging_dir) -C src install-libLTLIBRARIES install-nobase_includeHEADERS &&\ 24 | $(MAKE) DESTDIR=$($(package)_staging_dir) install-pkgconfigDATA 25 | endef 26 | 27 | define $(package)_postprocess_cmds 28 | rm lib/libprotoc.a 29 | endef 30 | -------------------------------------------------------------------------------- /contrib/epee/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2014-2019, AEON, The Monero Project 2 | # 3 | # All rights reserved. 4 | # 5 | # Redistribution and use in source and binary forms, with or without modification, are 6 | # permitted provided that the following conditions are met: 7 | # 8 | # 1. Redistributions of source code must retain the above copyright notice, this list of 9 | # conditions and the following disclaimer. 10 | # 11 | # 2. Redistributions in binary form must reproduce the above copyright notice, this list 12 | # of conditions and the following disclaimer in the documentation and/or other 13 | # materials provided with the distribution. 14 | # 15 | # 3. Neither the name of the copyright holder nor the names of its contributors may be 16 | # used to endorse or promote products derived from this software without specific 17 | # prior written permission. 18 | # 19 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 20 | # EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 21 | # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL 22 | # THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 24 | # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25 | # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 26 | # STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF 27 | # THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | 29 | add_subdirectory(src) 30 | 31 | -------------------------------------------------------------------------------- /contrib/epee/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2006-2013, Andrey N. Sabelnikov, www.sabelnikov.net 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | * Redistributions of source code must retain the above copyright 7 | notice, this list of conditions and the following disclaimer. 8 | * Redistributions in binary form must reproduce the above copyright 9 | notice, this list of conditions and the following disclaimer in the 10 | documentation and/or other materials provided with the distribution. 11 | * Neither the name of the Andrey N. Sabelnikov nor the 12 | names of its contributors may be used to endorse or promote products 13 | derived from this software without specific prior written permission. 14 | 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | DISCLAIMED. IN NO EVENT SHALL Andrey N. Sabelnikov BE LIABLE FOR ANY 20 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | -------------------------------------------------------------------------------- /contrib/epee/README.md: -------------------------------------------------------------------------------- 1 | epee - is a small library of helpers, wrappers, tools and and so on, used to make my life easier. 2 | -------------------------------------------------------------------------------- /contrib/epee/demo/README.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aeonix/aeon/c1ebcc640e486cf72d9c2517a0e1b9b1384c51e4/contrib/epee/demo/README.txt -------------------------------------------------------------------------------- /contrib/epee/demo/demo_http_server/stdafx.cpp: -------------------------------------------------------------------------------- 1 | // stdafx.cpp : source file that includes just the standard includes 2 | // demo_http_server.pch will be the pre-compiled header 3 | // stdafx.obj will contain the pre-compiled type information 4 | 5 | #include "stdafx.h" 6 | 7 | // TODO: reference any additional headers you need in STDAFX.H 8 | // and not in this file 9 | -------------------------------------------------------------------------------- /contrib/epee/demo/demo_http_server/targetver.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // The following macros define the minimum required platform. The minimum required platform 4 | // is the earliest version of Windows, Internet Explorer etc. that has the necessary features to run 5 | // your application. The macros work by enabling all features available on platform versions up to and 6 | // including the version specified. 7 | 8 | // Modify the following defines if you have to target a platform prior to the ones specified below. 9 | // Refer to MSDN for the latest info on corresponding values for different platforms. 10 | #ifndef _WIN32_WINNT // Specifies that the minimum required platform is Windows Vista. 11 | #define _WIN32_WINNT 0x0600 // Change this to the appropriate value to target other versions of Windows. 12 | #endif 13 | 14 | -------------------------------------------------------------------------------- /contrib/epee/demo/demo_levin_server/stdafx.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2006-2013, Andrey N. Sabelnikov, www.sabelnikov.net 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are met: 6 | // * Redistributions of source code must retain the above copyright 7 | // notice, this list of conditions and the following disclaimer. 8 | // * Redistributions in binary form must reproduce the above copyright 9 | // notice, this list of conditions and the following disclaimer in the 10 | // documentation and/or other materials provided with the distribution. 11 | // * Neither the name of the Andrey N. Sabelnikov nor the 12 | // names of its contributors may be used to endorse or promote products 13 | // derived from this software without specific prior written permission. 14 | // 15 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 16 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18 | // DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER BE LIABLE FOR ANY 19 | // DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20 | // (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21 | // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22 | // ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24 | // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | // 26 | 27 | 28 | 29 | #include "stdafx.h" 30 | 31 | -------------------------------------------------------------------------------- /contrib/epee/demo/demo_levin_server/targetver.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // The following macros define the minimum required platform. The minimum required platform 4 | // is the earliest version of Windows, Internet Explorer etc. that has the necessary features to run 5 | // your application. The macros work by enabling all features available on platform versions up to and 6 | // including the version specified. 7 | 8 | // Modify the following defines if you have to target a platform prior to the ones specified below. 9 | // Refer to MSDN for the latest info on corresponding values for different platforms. 10 | #ifndef _WIN32_WINNT // Specifies that the minimum required platform is Windows Vista. 11 | #define _WIN32_WINNT 0x0600 // Change this to the appropriate value to target other versions of Windows. 12 | #endif 13 | 14 | -------------------------------------------------------------------------------- /contrib/epee/demo/generate_gcc.sh: -------------------------------------------------------------------------------- 1 | mkdir build 2 | cd build 3 | cmake .. 4 | #cmake -DBOOST_ROOT=/usr/local/proj/boost_1_49_0 -DBOOST_LIBRARYDIR=/usr/local/proj/boost_1_49_0/stage/lib .. 5 | -------------------------------------------------------------------------------- /contrib/epee/demo/generate_vc_proj.bat: -------------------------------------------------------------------------------- 1 | mkdir build 2 | 3 | cd build 4 | 5 | cmake "-DBoost_USE_STATIC_LIBS=TRUE" -G "Visual Studio 11 Win64" .. 6 | cd .. 7 | pause 8 | -------------------------------------------------------------------------------- /contrib/epee/include/net/levin_client_async.inl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aeonix/aeon/c1ebcc640e486cf72d9c2517a0e1b9b1384c51e4/contrib/epee/include/net/levin_client_async.inl -------------------------------------------------------------------------------- /contrib/epee/include/net/local_ip.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aeonix/aeon/c1ebcc640e486cf72d9c2517a0e1b9b1384c51e4/contrib/epee/include/net/local_ip.h -------------------------------------------------------------------------------- /contrib/epee/include/pragma_comp_defs.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #if defined(__GNUC__) 4 | #define PRAGMA_WARNING_PUSH _Pragma("GCC diagnostic push") 5 | #define PRAGMA_WARNING_POP _Pragma("GCC diagnostic pop") 6 | #define PRAGMA_WARNING_DISABLE_VS(w) 7 | #define PRAGMA_GCC(w) _Pragma(w) 8 | #elif defined(_MSC_VER) 9 | #define PRAGMA_WARNING_PUSH __pragma(warning( push )) 10 | #define PRAGMA_WARNING_POP __pragma(warning( pop )) 11 | #define PRAGMA_WARNING_DISABLE_VS(w) __pragma( warning ( disable: w )) 12 | //#define PRAGMA_WARNING_DISABLE_GCC(w) 13 | #define PRAGMA_GCC(w) 14 | #endif 15 | -------------------------------------------------------------------------------- /contrib/epee/include/readline_buffer.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | #include 6 | 7 | namespace rdln 8 | { 9 | typedef enum { empty, partial, full } linestatus; 10 | class readline_buffer : public std::stringbuf 11 | { 12 | public: 13 | readline_buffer(); 14 | void start(); 15 | void stop(); 16 | bool is_running() const 17 | { 18 | return m_cout_buf != NULL; 19 | } 20 | linestatus get_line(std::string& line) const; 21 | void set_prompt(const std::string& prompt); 22 | static void add_completion(const std::string& command); 23 | static const std::vector& get_completions(); 24 | 25 | protected: 26 | virtual int sync(); 27 | 28 | private: 29 | std::streambuf* m_cout_buf; 30 | size_t m_prompt_length; 31 | static std::vector& completion_commands(); 32 | }; 33 | 34 | class suspend_readline 35 | { 36 | public: 37 | suspend_readline(); 38 | ~suspend_readline(); 39 | private: 40 | readline_buffer* m_buffer; 41 | bool m_restart; 42 | }; 43 | } 44 | 45 | -------------------------------------------------------------------------------- /contrib/epee/include/serialization/serialize_base.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | -------------------------------------------------------------------------------- /contrib/epee/include/warnings.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #if defined(_MSC_VER) 4 | 5 | #define PUSH_WARNINGS __pragma(warning(push)) 6 | #define POP_WARNINGS __pragma(warning(pop)) 7 | #define DISABLE_VS_WARNINGS(w) __pragma(warning(disable: w)) 8 | #define DISABLE_GCC_WARNING(w) 9 | #define DISABLE_CLANG_WARNING(w) 10 | #define DISABLE_GCC_AND_CLANG_WARNING(w) 11 | 12 | #else 13 | 14 | #include 15 | 16 | #define PUSH_WARNINGS _Pragma("GCC diagnostic push") 17 | #define POP_WARNINGS _Pragma("GCC diagnostic pop") 18 | #define DISABLE_VS_WARNINGS(w) 19 | 20 | #if defined(__clang__) 21 | #define DISABLE_GCC_WARNING(w) 22 | #define DISABLE_CLANG_WARNING DISABLE_GCC_AND_CLANG_WARNING 23 | #else 24 | #define DISABLE_GCC_WARNING DISABLE_GCC_AND_CLANG_WARNING 25 | #define DISABLE_CLANG_WARNING(w) 26 | #endif 27 | 28 | #define DISABLE_GCC_AND_CLANG_WARNING(w) _Pragma(BOOST_PP_STRINGIZE(GCC diagnostic ignored BOOST_PP_STRINGIZE(-W##w))) 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /contrib/epee/tests/data/storages/invalid_storage_1.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aeonix/aeon/c1ebcc640e486cf72d9c2517a0e1b9b1384c51e4/contrib/epee/tests/data/storages/invalid_storage_1.bin -------------------------------------------------------------------------------- /contrib/epee/tests/data/storages/invalid_storage_2.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aeonix/aeon/c1ebcc640e486cf72d9c2517a0e1b9b1384c51e4/contrib/epee/tests/data/storages/invalid_storage_2.bin -------------------------------------------------------------------------------- /contrib/epee/tests/data/storages/invalid_storage_3.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aeonix/aeon/c1ebcc640e486cf72d9c2517a0e1b9b1384c51e4/contrib/epee/tests/data/storages/invalid_storage_3.bin -------------------------------------------------------------------------------- /contrib/epee/tests/data/storages/invalid_storage_4.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aeonix/aeon/c1ebcc640e486cf72d9c2517a0e1b9b1384c51e4/contrib/epee/tests/data/storages/invalid_storage_4.bin -------------------------------------------------------------------------------- /contrib/epee/tests/data/storages/valid_storage.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aeonix/aeon/c1ebcc640e486cf72d9c2517a0e1b9b1384c51e4/contrib/epee/tests/data/storages/valid_storage.bin -------------------------------------------------------------------------------- /contrib/epee/tests/generate_vc_proj.bat: -------------------------------------------------------------------------------- 1 | mkdir build 2 | cd build 3 | cmake "-DBoost_USE_STATIC_LIBS=TRUE" -G "Visual Studio 11 Win64" ../src 4 | cd .. 5 | pause 6 | -------------------------------------------------------------------------------- /contrib/epee/tests/src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | cmake_minimum_required(VERSION 2.8) 3 | 4 | set(Boost_USE_MULTITHREADED ON) 5 | 6 | include_directories(.) 7 | include_directories(../../include) 8 | 9 | find_package(Boost COMPONENTS system filesystem thread date_time chrono regex) 10 | include_directories( ${Boost_INCLUDE_DIRS} ) 11 | 12 | IF (MSVC) 13 | add_definitions( "/W3 /D_CRT_SECURE_NO_WARNINGS /wd4996 /wd4345 /nologo /D_WIN32_WINNT=0x0600 /DWIN32_LEAN_AND_MEAN /bigobj" ) 14 | include_directories(SYSTEM platform/msvc) 15 | ELSE() 16 | # set stuff for other systems 17 | SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c11 -Wall") 18 | SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Wno-reorder") 19 | ENDIF() 20 | 21 | 22 | # Add folders to filters 23 | file(GLOB_RECURSE SRC RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} 24 | ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp 25 | ${CMAKE_CURRENT_SOURCE_DIR}/*.inl 26 | ${CMAKE_CURRENT_SOURCE_DIR}/*.h) 27 | 28 | source_group(general FILES ${SRC}) 29 | 30 | 31 | add_executable(tests ${SRC} ) 32 | target_link_libraries( tests ${Boost_LIBRARIES} ) 33 | 34 | -------------------------------------------------------------------------------- /contrib/fuzz_testing/fuzz.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | AFLFUZZ=$(which afl-fuzz) 4 | if ! test -x "$AFLFUZZ" 5 | then 6 | echo "afl-fuzz not found - install american-fuzzy-lop" 7 | exit 1 8 | fi 9 | 10 | type="$1" 11 | if test -z "$type" 12 | then 13 | echo "usage: $0 block|transaction|signature|cold-outputs|cold-transaction|load-from-binary|load-from-json|base58|parse-url|http-client|levin|bulletproof" 14 | exit 1 15 | fi 16 | case "$type" in 17 | block|transaction|signature|cold-outputs|cold-transaction|load-from-binary|load-from-json|base58|parse-url|http-client|levin|bulletproof) ;; 18 | *) echo "usage: $0 block|transaction|signature|cold-outputs|cold-transaction|load-from-binary|load-from-json|base58|parse-url|http-client|levin|bulletproof"; exit 1 ;; 19 | esac 20 | 21 | if test -d "fuzz-out/$type" 22 | then 23 | dir="-" 24 | else 25 | dir="tests/data/fuzz/$type" 26 | fi 27 | 28 | mkdir -p fuzz-out 29 | afl-fuzz -i "$dir" -m none -t 250 -o fuzz-out/$type build/fuzz/tests/fuzz/${type}_fuzz_tests @@ 30 | -------------------------------------------------------------------------------- /contrib/rlwrap/monerocommands_bitmonerod.txt: -------------------------------------------------------------------------------- 1 | ban 2 | bans 3 | diff 4 | exit 5 | flush_txpool 6 | hard_fork_info 7 | help 8 | hide_hr 9 | is_key_image_spent 10 | limit 11 | limit_down 12 | limit_up 13 | out_peers 14 | output_histogram 15 | print_bc 16 | print_block 17 | print_cn 18 | print_height 19 | print_pl 20 | print_pool 21 | print_pool_sh 22 | print_pool_stats 23 | print_status 24 | print_tx 25 | q 26 | save 27 | set_log 28 | show_hr 29 | start_mining 30 | start_save_graph 31 | status 32 | stop_daemon 33 | stop_mining 34 | stop_save_graph 35 | sync_info 36 | unban 37 | -------------------------------------------------------------------------------- /contrib/rlwrap/monerocommands_monero-wallet-cli.txt: -------------------------------------------------------------------------------- 1 | address 2 | balance 3 | bc_height 4 | check_tx_key 5 | export_key_images 6 | get_tx_key 7 | get_tx_note 8 | help 9 | import_key_images 10 | incoming_transfers 11 | integrated_address 12 | payments 13 | refresh 14 | rescan_bc 15 | rescan_spent 16 | save 17 | save_bc 18 | save_watch_only 19 | seed 20 | set 21 | set_tx_note 22 | show_transfers 23 | sign 24 | spendkey 25 | start_mining 26 | status 27 | stop_mining 28 | sweep_all 29 | sweep_unmixable 30 | transfer 31 | transfer_original 32 | verify 33 | viewkey 34 | -------------------------------------------------------------------------------- /contrib/snap/monerod-wrapper: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ ! -d "$SNAP_USER_DATA/etc" ]; then 4 | mkdir $SNAP_USER_DATA/etc/ 5 | cp -R $SNAP/etc/monerod.conf $SNAP_USER_DATA/etc/monerod.conf 6 | fi 7 | 8 | exec "$SNAP/bin/monerod" "$@" 9 | -------------------------------------------------------------------------------- /contrib/snap/monerod.conf: -------------------------------------------------------------------------------- 1 | # Configuration for monerod 2 | # Syntax: any command line option may be specified as 'clioptionname=value'. 3 | # Boolean options such as 'no-igd' are specified as 'no-igd=1'. 4 | # See 'monerod --help' for all available options. 5 | 6 | # Overridden by snap: 7 | # data-dir=/var/lib/monero 8 | # log-file=/var/log/monero/monero.log 9 | 10 | log-level=0 11 | -------------------------------------------------------------------------------- /contrib/snap/setup/gui/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aeonix/aeon/c1ebcc640e486cf72d9c2517a0e1b9b1384c51e4/contrib/snap/setup/gui/icon.png -------------------------------------------------------------------------------- /contrib/valgrind/monero.supp: -------------------------------------------------------------------------------- 1 | { 2 | libunwind causes spurious report 3 | Memcheck:Param 4 | msync(start) 5 | ... 6 | obj:/usr/lib64/libunwind.so.* 7 | ... 8 | fun:_ULx86_64_step 9 | ... 10 | } 11 | 12 | { 13 | boost unlocks before signalling cond var 14 | Helgrind:Misc 15 | ... 16 | fun:pthread_cond_signal@* 17 | fun:maybe_unlock_and_signal_one > 18 | ... 19 | } 20 | -------------------------------------------------------------------------------- /external/boost/archive/portable_binary_archive.hpp: -------------------------------------------------------------------------------- 1 | #ifndef PORTABLE_BINARY_ARCHIVE_HPP 2 | #define PORTABLE_BINARY_ARCHIVE_HPP 3 | 4 | // (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . 5 | // Use, modification and distribution is subject to the Boost Software 6 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 7 | // http://www.boost.org/LICENSE_1_0.txt) 8 | 9 | // MS compatible compilers support #pragma once 10 | #if defined(_MSC_VER) 11 | # pragma once 12 | #endif 13 | 14 | #include 15 | #include 16 | #include 17 | #include 18 | 19 | #include 20 | #if CHAR_BIT != 8 21 | #error This code assumes an eight-bit byte. 22 | #endif 23 | 24 | #include 25 | #include 26 | 27 | #include 28 | 29 | namespace boost { namespace archive { 30 | 31 | enum portable_binary_archive_flags { 32 | endian_big = 0x4000, 33 | endian_little = 0x8000 34 | }; 35 | 36 | //#if ( endian_big <= boost::archive::flags_last ) 37 | //#error archive flags conflict 38 | //#endif 39 | 40 | inline void 41 | reverse_bytes(signed char size, char *address){ 42 | if (size <= 0) 43 | throw archive_exception(archive_exception::other_exception); 44 | char * first = address; 45 | char * last = first + size - 1; 46 | for(;first < last;++first, --last){ 47 | char x = *last; 48 | *last = *first; 49 | *first = x; 50 | } 51 | } 52 | 53 | } } 54 | 55 | #endif // PORTABLE_BINARY_ARCHIVE_HPP 56 | -------------------------------------------------------------------------------- /external/db_drivers/liblmdb/COPYRIGHT: -------------------------------------------------------------------------------- 1 | Copyright 2011-2015 Howard Chu, Symas Corp. 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted only as authorized by the OpenLDAP 6 | Public License. 7 | 8 | A copy of this license is available in the file LICENSE in the 9 | top-level directory of the distribution or, alternatively, at 10 | . 11 | 12 | OpenLDAP is a registered trademark of the OpenLDAP Foundation. 13 | 14 | Individual files and/or contributed packages may be copyright by 15 | other parties and/or subject to additional restrictions. 16 | 17 | This work also contains materials derived from public sources. 18 | 19 | Additional information about OpenLDAP can be obtained at 20 | . 21 | -------------------------------------------------------------------------------- /external/db_drivers/liblmdb/mdb_drop.1: -------------------------------------------------------------------------------- 1 | .TH MDB_DROP 1 "2017/11/19" "LMDB 0.9.70" 2 | .\" Copyright 2014-2017 Howard Chu, Symas Corp. All Rights Reserved. 3 | .\" Copying restrictions apply. See COPYRIGHT/LICENSE. 4 | .SH NAME 5 | mdb_drop \- LMDB database delete tool 6 | .SH SYNOPSIS 7 | .B mdb_drop 8 | [\c 9 | .BR \-V ] 10 | [\c 11 | .BR \-n ] 12 | [\c 13 | .BR \-d ] 14 | [\c 15 | .BI \-s \ subdb\fR] 16 | .BR \ envpath 17 | .SH DESCRIPTION 18 | The 19 | .B mdb_drop 20 | utility empties or deletes a database in the specified 21 | environment. 22 | .SH OPTIONS 23 | .TP 24 | .BR \-V 25 | Write the library version number to the standard output, and exit. 26 | .TP 27 | .BR \-n 28 | Operate on an LMDB database which does not use subdirectories. 29 | .TP 30 | .BR \-d 31 | Delete the specified database, don't just empty it. 32 | .TP 33 | .BR \-s \ subdb 34 | Operate on a specific subdatabase. If no database is specified, only the main database is dropped. 35 | .SH DIAGNOSTICS 36 | Exit status is zero if no errors occur. 37 | Errors result in a non-zero exit status and 38 | a diagnostic message being written to standard error. 39 | .SH AUTHOR 40 | Howard Chu of Symas Corporation 41 | -------------------------------------------------------------------------------- /external/db_drivers/liblmdb/tooltag: -------------------------------------------------------------------------------- 1 | 2 | 3 | mdb_copy_1 4 | mdb_copy - environment copy tool 5 | mdb_copy.1 6 | 7 | 8 | mdb_drop_1 9 | mdb_drop - database delete tool 10 | mdb_drop.1 11 | 12 | 13 | mdb_dump_1 14 | mdb_dump - environment export tool 15 | mdb_dump.1 16 | 17 | 18 | mdb_load_1 19 | mdb_load - environment import tool 20 | mdb_load.1 21 | 22 | 23 | mdb_stat_1 24 | mdb_stat - environment status tool 25 | mdb_stat.1 26 | 27 | 28 | -------------------------------------------------------------------------------- /external/easylogging++/ea_config.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #define ELPP_THREAD_SAFE 4 | #define ELPP_DEFAULT_LOG_FILE "" 5 | #define ELPP_DISABLE_DEFAULT_CRASH_HANDLING 6 | #define ELPP_NO_CHECK_MACROS 7 | #define ELPP_WINSOCK2 8 | #define ELPP_NO_DEBUG_MACROS 9 | 10 | #ifdef EASYLOGGING_CC 11 | #if !(!defined __GNUC__ || defined __MINGW32__ || defined __MINGW64__ || defined __ANDROID__) 12 | #define ELPP_FEATURE_CRASH_LOG 13 | #endif 14 | #endif 15 | -------------------------------------------------------------------------------- /external/qrcodegen/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | project(libqrcodegen) 2 | 3 | add_library(qrcodegen STATIC QrCode.cpp) 4 | set_target_properties(qrcodegen PROPERTIES POSITION_INDEPENDENT_CODE ON) 5 | set_target_properties(qrcodegen PROPERTIES CXX_STANDARD 11) 6 | 7 | target_include_directories(qrcodegen PUBLIC 8 | ${CMAKE_CURRENT_SOURCE_DIR}) 9 | -------------------------------------------------------------------------------- /snap: -------------------------------------------------------------------------------- 1 | contrib/snap -------------------------------------------------------------------------------- /src/blocks/blocks.cpp: -------------------------------------------------------------------------------- 1 | #include "blocks.h" 2 | 3 | #include 4 | 5 | extern const unsigned char checkpoints[]; 6 | extern const size_t checkpoints_len; 7 | extern const unsigned char stagenet_blocks[]; 8 | extern const size_t stagenet_blocks_len; 9 | extern const unsigned char testnet_blocks[]; 10 | extern const size_t testnet_blocks_len; 11 | 12 | namespace blocks 13 | { 14 | 15 | const std::unordered_map, std::hash> CheckpointsByNetwork = { 16 | {cryptonote::network_type::MAINNET, {checkpoints, checkpoints_len}}, 17 | {cryptonote::network_type::STAGENET, {stagenet_blocks, stagenet_blocks_len}}, 18 | {cryptonote::network_type::TESTNET, {testnet_blocks, testnet_blocks_len}} 19 | }; 20 | 21 | const epee::span GetCheckpointsData(cryptonote::network_type network) 22 | { 23 | const auto it = CheckpointsByNetwork.find(network); 24 | if (it != CheckpointsByNetwork.end()) 25 | { 26 | return it->second; 27 | } 28 | return nullptr; 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /src/blocks/blocks.h: -------------------------------------------------------------------------------- 1 | #ifndef SRC_BLOCKS_BLOCKS_H_ 2 | #define SRC_BLOCKS_BLOCKS_H_ 3 | 4 | #include "cryptonote_config.h" 5 | #include "span.h" 6 | 7 | namespace blocks 8 | { 9 | const epee::span GetCheckpointsData(cryptonote::network_type network); 10 | } 11 | 12 | #endif /* SRC_BLOCKS_BLOCKS_H_ */ 13 | -------------------------------------------------------------------------------- /src/blocks/checkpoints.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aeonix/aeon/c1ebcc640e486cf72d9c2517a0e1b9b1384c51e4/src/blocks/checkpoints.dat -------------------------------------------------------------------------------- /src/blocks/stagenet_blocks.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aeonix/aeon/c1ebcc640e486cf72d9c2517a0e1b9b1384c51e4/src/blocks/stagenet_blocks.dat -------------------------------------------------------------------------------- /src/blocks/testnet_blocks.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aeonix/aeon/c1ebcc640e486cf72d9c2517a0e1b9b1384c51e4/src/blocks/testnet_blocks.dat -------------------------------------------------------------------------------- /src/crypto/crypto_ops_builder/Makefile: -------------------------------------------------------------------------------- 1 | 2 | CC=gcc 3 | CFLAGS=-O2 -Wall 4 | 5 | OBJS= fe25519.o ge25519.o sc25519.o sha512-blocks.o sha512-hash.o ed25519.o randombytes.o verify.o 6 | test: test.o $(OBJS) 7 | gcc -o $@ $^ 8 | 9 | clean: 10 | rm -f *.o test 11 | -------------------------------------------------------------------------------- /src/crypto/crypto_ops_builder/api.h: -------------------------------------------------------------------------------- 1 | #define CRYPTO_BYTES 32 2 | #define CRYPTO_SCALARBYTES 32 3 | -------------------------------------------------------------------------------- /src/crypto/crypto_ops_builder/crypto_int32.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_int32_h 2 | #define crypto_int32_h 3 | 4 | typedef int crypto_int32; 5 | 6 | #endif 7 | -------------------------------------------------------------------------------- /src/crypto/crypto_ops_builder/crypto_sign.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_sign_edwards25519sha512batch_H 2 | #define crypto_sign_edwards25519sha512batch_H 3 | 4 | #define SECRETKEYBYTES 64 5 | #define PUBLICKEYBYTES 32 6 | #define SIGNATUREBYTES 64 7 | 8 | extern int crypto_sign(unsigned char *,unsigned long long *,const unsigned char *,unsigned long long,const unsigned char *); 9 | extern int crypto_sign_open(unsigned char *,unsigned long long *,const unsigned char *,unsigned long long,const unsigned char *); 10 | extern int crypto_sign_keypair(unsigned char *,unsigned char *); 11 | extern int crypto_sign_publickey(unsigned char *pk, unsigned char *sk, unsigned char *seed); 12 | 13 | #endif 14 | -------------------------------------------------------------------------------- /src/crypto/crypto_ops_builder/crypto_uint32.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_uint32_h 2 | #define crypto_uint32_h 3 | 4 | typedef unsigned int crypto_uint32; 5 | 6 | #endif 7 | -------------------------------------------------------------------------------- /src/crypto/crypto_ops_builder/crypto_verify_32.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_verify_32_H 2 | #define crypto_verify_32_H 3 | 4 | #define crypto_verify_32_ref_BYTES 32 5 | extern int crypto_verify_32(const unsigned char *,const unsigned char *); 6 | 7 | #endif 8 | -------------------------------------------------------------------------------- /src/crypto/crypto_ops_builder/ietf.txt: -------------------------------------------------------------------------------- 1 | https://tools.ietf.org/id/draft-josefsson-eddsa-ed25519-02.txt 2 | 3 | Note: This draft is now superseded by https://datatracker.ietf.org/doc/rfc8032/ 4 | (review of the differences is left as an exercise for the reader) 5 | -------------------------------------------------------------------------------- /src/crypto/crypto_ops_builder/include/libsodium_LICENSE: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013-2015 3 | * Frank Denis 4 | * 5 | * Permission to use, copy, modify, and/or distribute this software for any 6 | * purpose with or without fee is hereby granted, provided that the above 7 | * copyright notice and this permission notice appear in all copies. 8 | * 9 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 15 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 | */ 17 | -------------------------------------------------------------------------------- /src/crypto/crypto_ops_builder/include/sodium/crypto_int32.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_int32_H 2 | #define crypto_int32_H 3 | 4 | #include 5 | 6 | typedef int32_t crypto_int32; 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /src/crypto/crypto_ops_builder/include/sodium/crypto_int64.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_int64_H 2 | #define crypto_int64_H 3 | 4 | #include 5 | 6 | typedef int64_t crypto_int64; 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /src/crypto/crypto_ops_builder/include/sodium/crypto_uint16.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_uint16_H 2 | #define crypto_uint16_H 3 | 4 | #include 5 | 6 | typedef uint16_t crypto_uint16; 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /src/crypto/crypto_ops_builder/include/sodium/crypto_uint32.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_uint32_H 2 | #define crypto_uint32_H 3 | 4 | #include 5 | 6 | typedef uint32_t crypto_uint32; 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /src/crypto/crypto_ops_builder/include/sodium/crypto_uint64.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_uint64_H 2 | #define crypto_uint64_H 3 | 4 | #include 5 | 6 | typedef uint64_t crypto_uint64; 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /src/crypto/crypto_ops_builder/include/sodium/crypto_uint8.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_uint8_H 2 | #define crypto_uint8_H 3 | 4 | #include 5 | 6 | typedef uint8_t crypto_uint8; 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /src/crypto/crypto_ops_builder/include/sodium/crypto_verify_32.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_verify_32_H 2 | #define crypto_verify_32_H 3 | 4 | #include 5 | #include "export.h" 6 | 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | #define crypto_verify_32_BYTES 32U 12 | SODIUM_EXPORT 13 | size_t crypto_verify_32_bytes(void); 14 | 15 | SODIUM_EXPORT 16 | int crypto_verify_32(const unsigned char *x, const unsigned char *y); 17 | 18 | #ifdef __cplusplus 19 | } 20 | #endif 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /src/crypto/crypto_ops_builder/include/sodium/randombytes.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef randombytes_H 3 | #define randombytes_H 4 | 5 | #include 6 | 7 | #include 8 | #include 9 | 10 | #include "export.h" 11 | 12 | #ifdef __cplusplus 13 | # if __GNUC__ 14 | # pragma GCC diagnostic ignored "-Wlong-long" 15 | # endif 16 | extern "C" { 17 | #endif 18 | 19 | typedef struct randombytes_implementation { 20 | const char *(*implementation_name)(void); /* required */ 21 | uint32_t (*random)(void); /* required */ 22 | void (*stir)(void); /* optional */ 23 | uint32_t (*uniform)(const uint32_t upper_bound); /* optional, a default implementation will be used if NULL */ 24 | void (*buf)(void * const buf, const size_t size); /* required */ 25 | int (*close)(void); /* optional */ 26 | } randombytes_implementation; 27 | 28 | SODIUM_EXPORT 29 | void randombytes_buf(void * const buf, const size_t size); 30 | 31 | SODIUM_EXPORT 32 | uint32_t randombytes_random(void); 33 | 34 | SODIUM_EXPORT 35 | uint32_t randombytes_uniform(const uint32_t upper_bound); 36 | 37 | SODIUM_EXPORT 38 | void randombytes_stir(void); 39 | 40 | SODIUM_EXPORT 41 | int randombytes_close(void); 42 | 43 | SODIUM_EXPORT 44 | int randombytes_set_implementation(randombytes_implementation *impl); 45 | 46 | SODIUM_EXPORT 47 | const char *randombytes_implementation_name(void); 48 | 49 | /* -- NaCl compatibility interface -- */ 50 | 51 | SODIUM_EXPORT 52 | void randombytes(unsigned char * const buf, const unsigned long long buf_len); 53 | 54 | #ifdef __cplusplus 55 | } 56 | #endif 57 | 58 | #endif 59 | -------------------------------------------------------------------------------- /src/crypto/crypto_ops_builder/randombytes.c: -------------------------------------------------------------------------------- 1 | #ifndef _WIN32 2 | #include 3 | #include 4 | #include 5 | #include 6 | 7 | /* it's really stupid that there isn't a syscall for this */ 8 | 9 | static int ed25519_random_fd = -1; 10 | 11 | static inline void ed25519_randombytes(unsigned char *x,unsigned long long xlen) 12 | { 13 | int i; 14 | 15 | if (ed25519_random_fd == -1) { 16 | for (;;) { 17 | ed25519_random_fd = open("/dev/urandom",O_RDONLY); 18 | if (ed25519_random_fd != -1) break; 19 | sleep(1); 20 | } 21 | } 22 | 23 | while (xlen > 0) { 24 | if (xlen < 1048576) i = xlen; else i = 1048576; 25 | 26 | i = read(ed25519_random_fd,x,i); 27 | if (i < 1) { 28 | sleep(1); 29 | continue; 30 | } 31 | 32 | x += i; 33 | xlen -= i; 34 | } 35 | } 36 | 37 | #else 38 | #include 39 | #include 40 | 41 | static inline void ed25519_randombytes(unsigned char *x,unsigned long long xlen) 42 | { 43 | HCRYPTPROV prov = 0; 44 | 45 | CryptAcquireContextW(&prov, NULL, NULL, 46 | PROV_RSA_FULL, CRYPT_VERIFYCONTEXT | CRYPT_SILENT); 47 | 48 | CryptGenRandom(prov, xlen, x); 49 | CryptReleaseContext(prov, 0); 50 | } 51 | 52 | #endif /* _WIN32 */ 53 | -------------------------------------------------------------------------------- /src/crypto/crypto_ops_builder/ref10/Makefile: -------------------------------------------------------------------------------- 1 | all: d.h d2.h sqrtm1.h base.h base2.h \ 2 | ge_add.h ge_sub.h \ 3 | ge_madd.h ge_msub.h \ 4 | ge_p2_dbl.h \ 5 | pow225521.h pow22523.h 6 | 7 | d.h: d.py 8 | python d.py > d.h 9 | 10 | d2.h: d2.py 11 | python d2.py > d2.h 12 | 13 | sqrtm1.h: sqrtm1.py 14 | python sqrtm1.py > sqrtm1.h 15 | 16 | base.h: base.py 17 | python base.py > base.h 18 | 19 | base2.h: base2.py 20 | python base2.py > base2.h 21 | 22 | ge_add.h: ge_add.q q2h.sh 23 | ./q2h.sh < ge_add.q > ge_add.h 24 | 25 | ge_sub.h: ge_sub.q q2h.sh 26 | ./q2h.sh < ge_sub.q > ge_sub.h 27 | 28 | ge_madd.h: ge_madd.q q2h.sh 29 | ./q2h.sh < ge_madd.q > ge_madd.h 30 | 31 | ge_msub.h: ge_msub.q q2h.sh 32 | ./q2h.sh < ge_msub.q > ge_msub.h 33 | 34 | ge_p2_dbl.h: ge_p2_dbl.q q2h.sh 35 | ./q2h.sh < ge_p2_dbl.q > ge_p2_dbl.h 36 | 37 | pow22523.h: pow22523.q q2h.sh 38 | ./q2h.sh < pow22523.q > pow22523.h 39 | 40 | pow225521.h: pow225521.q q2h.sh 41 | ./q2h.sh < pow225521.q > pow225521.h 42 | -------------------------------------------------------------------------------- /src/crypto/crypto_ops_builder/ref10/README.md: -------------------------------------------------------------------------------- 1 | This code comes from Daniel J. Bernstein's SUPERCOP source, 2 | released in the public domain. 3 | 4 | [http://ed25519.cr.yp.to/software.html](http://ed25519.cr.yp.to/software.html) 5 | -------------------------------------------------------------------------------- /src/crypto/crypto_ops_builder/ref10/api.h: -------------------------------------------------------------------------------- 1 | #define CRYPTO_SECRETKEYBYTES 64 2 | #define CRYPTO_PUBLICKEYBYTES 32 3 | #define CRYPTO_BYTES 64 4 | #define CRYPTO_DETERMINISTIC 1 5 | -------------------------------------------------------------------------------- /src/crypto/crypto_ops_builder/ref10/base.py: -------------------------------------------------------------------------------- 1 | b = 256 2 | q = 2**255 - 19 3 | l = 2**252 + 27742317777372353535851937790883648493 4 | 5 | def expmod(b,e,m): 6 | if e == 0: return 1 7 | t = expmod(b,e/2,m)**2 % m 8 | if e & 1: t = (t*b) % m 9 | return t 10 | 11 | def inv(x): 12 | return expmod(x,q-2,q) 13 | 14 | d = -121665 * inv(121666) 15 | I = expmod(2,(q-1)/4,q) 16 | 17 | def xrecover(y): 18 | xx = (y*y-1) * inv(d*y*y+1) 19 | x = expmod(xx,(q+3)/8,q) 20 | if (x*x - xx) % q != 0: x = (x*I) % q 21 | if x % 2 != 0: x = q-x 22 | return x 23 | 24 | By = 4 * inv(5) 25 | Bx = xrecover(By) 26 | B = [Bx % q,By % q] 27 | 28 | def edwards(P,Q): 29 | x1 = P[0] 30 | y1 = P[1] 31 | x2 = Q[0] 32 | y2 = Q[1] 33 | x3 = (x1*y2+x2*y1) * inv(1+d*x1*x2*y1*y2) 34 | y3 = (y1*y2+x1*x2) * inv(1-d*x1*x2*y1*y2) 35 | return [x3 % q,y3 % q] 36 | 37 | def radix255(x): 38 | x = x % q 39 | if x + x > q: x -= q 40 | x = [x,0,0,0,0,0,0,0,0,0] 41 | bits = [26,25,26,25,26,25,26,25,26,25] 42 | for i in range(9): 43 | carry = (x[i] + 2**(bits[i]-1)) / 2**bits[i] 44 | x[i] -= carry * 2**bits[i] 45 | x[i + 1] += carry 46 | result = "" 47 | for i in range(9): 48 | result = result+str(x[i])+"," 49 | result = result+str(x[9]) 50 | return result 51 | 52 | Bi = B 53 | for i in range(32): 54 | print "{" 55 | Bij = Bi 56 | for j in range(8): 57 | print " {" 58 | print " {",radix255(Bij[1]+Bij[0]),"}," 59 | print " {",radix255(Bij[1]-Bij[0]),"}," 60 | print " {",radix255(2*d*Bij[0]*Bij[1]),"}," 61 | Bij = edwards(Bij,Bi) 62 | print " }," 63 | print "}," 64 | for k in range(8): 65 | Bi = edwards(Bi,Bi) 66 | -------------------------------------------------------------------------------- /src/crypto/crypto_ops_builder/ref10/base2.py: -------------------------------------------------------------------------------- 1 | b = 256 2 | q = 2**255 - 19 3 | l = 2**252 + 27742317777372353535851937790883648493 4 | 5 | def expmod(b,e,m): 6 | if e == 0: return 1 7 | t = expmod(b,e/2,m)**2 % m 8 | if e & 1: t = (t*b) % m 9 | return t 10 | 11 | def inv(x): 12 | return expmod(x,q-2,q) 13 | 14 | d = -121665 * inv(121666) 15 | I = expmod(2,(q-1)/4,q) 16 | 17 | def xrecover(y): 18 | xx = (y*y-1) * inv(d*y*y+1) 19 | x = expmod(xx,(q+3)/8,q) 20 | if (x*x - xx) % q != 0: x = (x*I) % q 21 | if x % 2 != 0: x = q-x 22 | return x 23 | 24 | By = 4 * inv(5) 25 | Bx = xrecover(By) 26 | B = [Bx % q,By % q] 27 | 28 | def edwards(P,Q): 29 | x1 = P[0] 30 | y1 = P[1] 31 | x2 = Q[0] 32 | y2 = Q[1] 33 | x3 = (x1*y2+x2*y1) * inv(1+d*x1*x2*y1*y2) 34 | y3 = (y1*y2+x1*x2) * inv(1-d*x1*x2*y1*y2) 35 | return [x3 % q,y3 % q] 36 | 37 | def radix255(x): 38 | x = x % q 39 | if x + x > q: x -= q 40 | x = [x,0,0,0,0,0,0,0,0,0] 41 | bits = [26,25,26,25,26,25,26,25,26,25] 42 | for i in range(9): 43 | carry = (x[i] + 2**(bits[i]-1)) / 2**bits[i] 44 | x[i] -= carry * 2**bits[i] 45 | x[i + 1] += carry 46 | result = "" 47 | for i in range(9): 48 | result = result+str(x[i])+"," 49 | result = result+str(x[9]) 50 | return result 51 | 52 | Bi = B 53 | 54 | for i in range(8): 55 | print " {" 56 | print " {",radix255(Bi[1]+Bi[0]),"}," 57 | print " {",radix255(Bi[1]-Bi[0]),"}," 58 | print " {",radix255(2*d*Bi[0]*Bi[1]),"}," 59 | print " }," 60 | Bi = edwards(B,edwards(B,Bi)) 61 | -------------------------------------------------------------------------------- /src/crypto/crypto_ops_builder/ref10/d.h: -------------------------------------------------------------------------------- 1 | -10913610,13857413,-15372611,6949391,114729,-8787816,-6275908,-3247719,-18696448,-12055116 2 | -------------------------------------------------------------------------------- /src/crypto/crypto_ops_builder/ref10/d.py: -------------------------------------------------------------------------------- 1 | q = 2**255 - 19 2 | 3 | def expmod(b,e,m): 4 | if e == 0: return 1 5 | t = expmod(b,e/2,m)**2 % m 6 | if e & 1: t = (t*b) % m 7 | return t 8 | 9 | def inv(x): 10 | return expmod(x,q-2,q) 11 | 12 | def radix255(x): 13 | x = x % q 14 | if x + x > q: x -= q 15 | x = [x,0,0,0,0,0,0,0,0,0] 16 | bits = [26,25,26,25,26,25,26,25,26,25] 17 | for i in range(9): 18 | carry = (x[i] + 2**(bits[i]-1)) / 2**bits[i] 19 | x[i] -= carry * 2**bits[i] 20 | x[i + 1] += carry 21 | result = "" 22 | for i in range(9): 23 | result = result+str(x[i])+"," 24 | result = result+str(x[9]) 25 | return result 26 | 27 | d = -121665 * inv(121666) 28 | print radix255(d) 29 | -------------------------------------------------------------------------------- /src/crypto/crypto_ops_builder/ref10/d2.h: -------------------------------------------------------------------------------- 1 | -21827239,-5839606,-30745221,13898782,229458,15978800,-12551817,-6495438,29715968,9444199 2 | -------------------------------------------------------------------------------- /src/crypto/crypto_ops_builder/ref10/d2.py: -------------------------------------------------------------------------------- 1 | q = 2**255 - 19 2 | 3 | def expmod(b,e,m): 4 | if e == 0: return 1 5 | t = expmod(b,e/2,m)**2 % m 6 | if e & 1: t = (t*b) % m 7 | return t 8 | 9 | def inv(x): 10 | return expmod(x,q-2,q) 11 | 12 | def radix255(x): 13 | x = x % q 14 | if x + x > q: x -= q 15 | x = [x,0,0,0,0,0,0,0,0,0] 16 | bits = [26,25,26,25,26,25,26,25,26,25] 17 | for i in range(9): 18 | carry = (x[i] + 2**(bits[i]-1)) / 2**bits[i] 19 | x[i] -= carry * 2**bits[i] 20 | x[i + 1] += carry 21 | result = "" 22 | for i in range(9): 23 | result = result+str(x[i])+"," 24 | result = result+str(x[9]) 25 | return result 26 | 27 | d = -121665 * inv(121666) 28 | print radix255(d*2) 29 | -------------------------------------------------------------------------------- /src/crypto/crypto_ops_builder/ref10/description: -------------------------------------------------------------------------------- 1 | EdDSA signatures using Curve25519 2 | from https://hyperelliptic.org/ebats/supercop-20141124.tar.bz2 3 | -------------------------------------------------------------------------------- /src/crypto/crypto_ops_builder/ref10/designers: -------------------------------------------------------------------------------- 1 | Daniel J. Bernstein 2 | Niels Duif 3 | Tanja Lange 4 | Peter Schwabe 5 | Bo-Yin Yang 6 | -------------------------------------------------------------------------------- /src/crypto/crypto_ops_builder/ref10/fe_0.c: -------------------------------------------------------------------------------- 1 | #include "fe.h" 2 | 3 | /* 4 | h = 0 5 | */ 6 | 7 | void fe_0(fe h) 8 | { 9 | h[0] = 0; 10 | h[1] = 0; 11 | h[2] = 0; 12 | h[3] = 0; 13 | h[4] = 0; 14 | h[5] = 0; 15 | h[6] = 0; 16 | h[7] = 0; 17 | h[8] = 0; 18 | h[9] = 0; 19 | } 20 | -------------------------------------------------------------------------------- /src/crypto/crypto_ops_builder/ref10/fe_1.c: -------------------------------------------------------------------------------- 1 | #include "fe.h" 2 | 3 | /* 4 | h = 1 5 | */ 6 | 7 | void fe_1(fe h) 8 | { 9 | h[0] = 1; 10 | h[1] = 0; 11 | h[2] = 0; 12 | h[3] = 0; 13 | h[4] = 0; 14 | h[5] = 0; 15 | h[6] = 0; 16 | h[7] = 0; 17 | h[8] = 0; 18 | h[9] = 0; 19 | } 20 | -------------------------------------------------------------------------------- /src/crypto/crypto_ops_builder/ref10/fe_add.c: -------------------------------------------------------------------------------- 1 | #include "fe.h" 2 | 3 | /* 4 | h = f + g 5 | Can overlap h with f or g. 6 | 7 | Preconditions: 8 | |f| bounded by 1.1*2^25,1.1*2^24,1.1*2^25,1.1*2^24,etc. 9 | |g| bounded by 1.1*2^25,1.1*2^24,1.1*2^25,1.1*2^24,etc. 10 | 11 | Postconditions: 12 | |h| bounded by 1.1*2^26,1.1*2^25,1.1*2^26,1.1*2^25,etc. 13 | */ 14 | 15 | void fe_add(fe h,const fe f,const fe g) 16 | { 17 | crypto_int32 f0 = f[0]; 18 | crypto_int32 f1 = f[1]; 19 | crypto_int32 f2 = f[2]; 20 | crypto_int32 f3 = f[3]; 21 | crypto_int32 f4 = f[4]; 22 | crypto_int32 f5 = f[5]; 23 | crypto_int32 f6 = f[6]; 24 | crypto_int32 f7 = f[7]; 25 | crypto_int32 f8 = f[8]; 26 | crypto_int32 f9 = f[9]; 27 | crypto_int32 g0 = g[0]; 28 | crypto_int32 g1 = g[1]; 29 | crypto_int32 g2 = g[2]; 30 | crypto_int32 g3 = g[3]; 31 | crypto_int32 g4 = g[4]; 32 | crypto_int32 g5 = g[5]; 33 | crypto_int32 g6 = g[6]; 34 | crypto_int32 g7 = g[7]; 35 | crypto_int32 g8 = g[8]; 36 | crypto_int32 g9 = g[9]; 37 | crypto_int32 h0 = f0 + g0; 38 | crypto_int32 h1 = f1 + g1; 39 | crypto_int32 h2 = f2 + g2; 40 | crypto_int32 h3 = f3 + g3; 41 | crypto_int32 h4 = f4 + g4; 42 | crypto_int32 h5 = f5 + g5; 43 | crypto_int32 h6 = f6 + g6; 44 | crypto_int32 h7 = f7 + g7; 45 | crypto_int32 h8 = f8 + g8; 46 | crypto_int32 h9 = f9 + g9; 47 | h[0] = h0; 48 | h[1] = h1; 49 | h[2] = h2; 50 | h[3] = h3; 51 | h[4] = h4; 52 | h[5] = h5; 53 | h[6] = h6; 54 | h[7] = h7; 55 | h[8] = h8; 56 | h[9] = h9; 57 | } 58 | -------------------------------------------------------------------------------- /src/crypto/crypto_ops_builder/ref10/fe_cmov.c: -------------------------------------------------------------------------------- 1 | #include "fe.h" 2 | 3 | /* 4 | Replace (f,g) with (g,g) if b == 1; 5 | replace (f,g) with (f,g) if b == 0. 6 | 7 | Preconditions: b in {0,1}. 8 | */ 9 | 10 | void fe_cmov(fe f,const fe g,unsigned int b) 11 | { 12 | crypto_int32 f0 = f[0]; 13 | crypto_int32 f1 = f[1]; 14 | crypto_int32 f2 = f[2]; 15 | crypto_int32 f3 = f[3]; 16 | crypto_int32 f4 = f[4]; 17 | crypto_int32 f5 = f[5]; 18 | crypto_int32 f6 = f[6]; 19 | crypto_int32 f7 = f[7]; 20 | crypto_int32 f8 = f[8]; 21 | crypto_int32 f9 = f[9]; 22 | crypto_int32 g0 = g[0]; 23 | crypto_int32 g1 = g[1]; 24 | crypto_int32 g2 = g[2]; 25 | crypto_int32 g3 = g[3]; 26 | crypto_int32 g4 = g[4]; 27 | crypto_int32 g5 = g[5]; 28 | crypto_int32 g6 = g[6]; 29 | crypto_int32 g7 = g[7]; 30 | crypto_int32 g8 = g[8]; 31 | crypto_int32 g9 = g[9]; 32 | crypto_int32 x0 = f0 ^ g0; 33 | crypto_int32 x1 = f1 ^ g1; 34 | crypto_int32 x2 = f2 ^ g2; 35 | crypto_int32 x3 = f3 ^ g3; 36 | crypto_int32 x4 = f4 ^ g4; 37 | crypto_int32 x5 = f5 ^ g5; 38 | crypto_int32 x6 = f6 ^ g6; 39 | crypto_int32 x7 = f7 ^ g7; 40 | crypto_int32 x8 = f8 ^ g8; 41 | crypto_int32 x9 = f9 ^ g9; 42 | b = -b; 43 | x0 &= b; 44 | x1 &= b; 45 | x2 &= b; 46 | x3 &= b; 47 | x4 &= b; 48 | x5 &= b; 49 | x6 &= b; 50 | x7 &= b; 51 | x8 &= b; 52 | x9 &= b; 53 | f[0] = f0 ^ x0; 54 | f[1] = f1 ^ x1; 55 | f[2] = f2 ^ x2; 56 | f[3] = f3 ^ x3; 57 | f[4] = f4 ^ x4; 58 | f[5] = f5 ^ x5; 59 | f[6] = f6 ^ x6; 60 | f[7] = f7 ^ x7; 61 | f[8] = f8 ^ x8; 62 | f[9] = f9 ^ x9; 63 | } 64 | -------------------------------------------------------------------------------- /src/crypto/crypto_ops_builder/ref10/fe_copy.c: -------------------------------------------------------------------------------- 1 | #include "fe.h" 2 | 3 | /* 4 | h = f 5 | */ 6 | 7 | void fe_copy(fe h,const fe f) 8 | { 9 | crypto_int32 f0 = f[0]; 10 | crypto_int32 f1 = f[1]; 11 | crypto_int32 f2 = f[2]; 12 | crypto_int32 f3 = f[3]; 13 | crypto_int32 f4 = f[4]; 14 | crypto_int32 f5 = f[5]; 15 | crypto_int32 f6 = f[6]; 16 | crypto_int32 f7 = f[7]; 17 | crypto_int32 f8 = f[8]; 18 | crypto_int32 f9 = f[9]; 19 | h[0] = f0; 20 | h[1] = f1; 21 | h[2] = f2; 22 | h[3] = f3; 23 | h[4] = f4; 24 | h[5] = f5; 25 | h[6] = f6; 26 | h[7] = f7; 27 | h[8] = f8; 28 | h[9] = f9; 29 | } 30 | -------------------------------------------------------------------------------- /src/crypto/crypto_ops_builder/ref10/fe_invert.c: -------------------------------------------------------------------------------- 1 | #include "fe.h" 2 | 3 | void fe_invert(fe out,const fe z) 4 | { 5 | fe t0; 6 | fe t1; 7 | fe t2; 8 | fe t3; 9 | int i; 10 | 11 | #include "pow225521.h" 12 | 13 | return; 14 | } 15 | -------------------------------------------------------------------------------- /src/crypto/crypto_ops_builder/ref10/fe_isnegative.c: -------------------------------------------------------------------------------- 1 | #include "fe.h" 2 | 3 | /* 4 | return 1 if f is in {1,3,5,...,q-2} 5 | return 0 if f is in {0,2,4,...,q-1} 6 | 7 | Preconditions: 8 | |f| bounded by 1.1*2^26,1.1*2^25,1.1*2^26,1.1*2^25,etc. 9 | */ 10 | 11 | int fe_isnegative(const fe f) 12 | { 13 | unsigned char s[32]; 14 | fe_tobytes(s,f); 15 | return s[0] & 1; 16 | } 17 | -------------------------------------------------------------------------------- /src/crypto/crypto_ops_builder/ref10/fe_isnonzero.c: -------------------------------------------------------------------------------- 1 | #include "fe.h" 2 | #include "crypto_verify_32.h" 3 | 4 | /* 5 | return 1 if f == 0 6 | return 0 if f != 0 7 | 8 | Preconditions: 9 | |f| bounded by 1.1*2^26,1.1*2^25,1.1*2^26,1.1*2^25,etc. 10 | */ 11 | 12 | static const unsigned char zero[32]; 13 | 14 | int fe_isnonzero(const fe f) 15 | { 16 | unsigned char s[32]; 17 | fe_tobytes(s,f); 18 | return crypto_verify_32(s,zero); 19 | } 20 | -------------------------------------------------------------------------------- /src/crypto/crypto_ops_builder/ref10/fe_neg.c: -------------------------------------------------------------------------------- 1 | #include "fe.h" 2 | 3 | /* 4 | h = -f 5 | 6 | Preconditions: 7 | |f| bounded by 1.1*2^25,1.1*2^24,1.1*2^25,1.1*2^24,etc. 8 | 9 | Postconditions: 10 | |h| bounded by 1.1*2^25,1.1*2^24,1.1*2^25,1.1*2^24,etc. 11 | */ 12 | 13 | void fe_neg(fe h,const fe f) 14 | { 15 | crypto_int32 f0 = f[0]; 16 | crypto_int32 f1 = f[1]; 17 | crypto_int32 f2 = f[2]; 18 | crypto_int32 f3 = f[3]; 19 | crypto_int32 f4 = f[4]; 20 | crypto_int32 f5 = f[5]; 21 | crypto_int32 f6 = f[6]; 22 | crypto_int32 f7 = f[7]; 23 | crypto_int32 f8 = f[8]; 24 | crypto_int32 f9 = f[9]; 25 | crypto_int32 h0 = -f0; 26 | crypto_int32 h1 = -f1; 27 | crypto_int32 h2 = -f2; 28 | crypto_int32 h3 = -f3; 29 | crypto_int32 h4 = -f4; 30 | crypto_int32 h5 = -f5; 31 | crypto_int32 h6 = -f6; 32 | crypto_int32 h7 = -f7; 33 | crypto_int32 h8 = -f8; 34 | crypto_int32 h9 = -f9; 35 | h[0] = h0; 36 | h[1] = h1; 37 | h[2] = h2; 38 | h[3] = h3; 39 | h[4] = h4; 40 | h[5] = h5; 41 | h[6] = h6; 42 | h[7] = h7; 43 | h[8] = h8; 44 | h[9] = h9; 45 | } 46 | -------------------------------------------------------------------------------- /src/crypto/crypto_ops_builder/ref10/fe_pow22523.c: -------------------------------------------------------------------------------- 1 | #include "fe.h" 2 | 3 | void fe_pow22523(fe out,const fe z) 4 | { 5 | fe t0; 6 | fe t1; 7 | fe t2; 8 | int i; 9 | 10 | #include "pow22523.h" 11 | 12 | return; 13 | } 14 | -------------------------------------------------------------------------------- /src/crypto/crypto_ops_builder/ref10/fe_sub.c: -------------------------------------------------------------------------------- 1 | #include "fe.h" 2 | 3 | /* 4 | h = f - g 5 | Can overlap h with f or g. 6 | 7 | Preconditions: 8 | |f| bounded by 1.1*2^25,1.1*2^24,1.1*2^25,1.1*2^24,etc. 9 | |g| bounded by 1.1*2^25,1.1*2^24,1.1*2^25,1.1*2^24,etc. 10 | 11 | Postconditions: 12 | |h| bounded by 1.1*2^26,1.1*2^25,1.1*2^26,1.1*2^25,etc. 13 | */ 14 | 15 | void fe_sub(fe h,const fe f,const fe g) 16 | { 17 | crypto_int32 f0 = f[0]; 18 | crypto_int32 f1 = f[1]; 19 | crypto_int32 f2 = f[2]; 20 | crypto_int32 f3 = f[3]; 21 | crypto_int32 f4 = f[4]; 22 | crypto_int32 f5 = f[5]; 23 | crypto_int32 f6 = f[6]; 24 | crypto_int32 f7 = f[7]; 25 | crypto_int32 f8 = f[8]; 26 | crypto_int32 f9 = f[9]; 27 | crypto_int32 g0 = g[0]; 28 | crypto_int32 g1 = g[1]; 29 | crypto_int32 g2 = g[2]; 30 | crypto_int32 g3 = g[3]; 31 | crypto_int32 g4 = g[4]; 32 | crypto_int32 g5 = g[5]; 33 | crypto_int32 g6 = g[6]; 34 | crypto_int32 g7 = g[7]; 35 | crypto_int32 g8 = g[8]; 36 | crypto_int32 g9 = g[9]; 37 | crypto_int32 h0 = f0 - g0; 38 | crypto_int32 h1 = f1 - g1; 39 | crypto_int32 h2 = f2 - g2; 40 | crypto_int32 h3 = f3 - g3; 41 | crypto_int32 h4 = f4 - g4; 42 | crypto_int32 h5 = f5 - g5; 43 | crypto_int32 h6 = f6 - g6; 44 | crypto_int32 h7 = f7 - g7; 45 | crypto_int32 h8 = f8 - g8; 46 | crypto_int32 h9 = f9 - g9; 47 | h[0] = h0; 48 | h[1] = h1; 49 | h[2] = h2; 50 | h[3] = h3; 51 | h[4] = h4; 52 | h[5] = h5; 53 | h[6] = h6; 54 | h[7] = h7; 55 | h[8] = h8; 56 | h[9] = h9; 57 | } 58 | -------------------------------------------------------------------------------- /src/crypto/crypto_ops_builder/ref10/ge_add.c: -------------------------------------------------------------------------------- 1 | #include "ge.h" 2 | 3 | /* 4 | r = p + q 5 | */ 6 | 7 | void ge_add(ge_p1p1 *r,const ge_p3 *p,const ge_cached *q) 8 | { 9 | fe t0; 10 | #include "ge_add.h" 11 | } 12 | -------------------------------------------------------------------------------- /src/crypto/crypto_ops_builder/ref10/ge_add.q: -------------------------------------------------------------------------------- 1 | :name:fe:r->X:r->Y:r->Z:r->T:t0:t1:t2:t3:t4:t5:p->X:p->Y:p->Z:p->T:q->YplusX:q->YminusX:q->Z:q->T2d: 2 | fe r:var/r=fe: 3 | 4 | enter f:enter/f:>X1=fe#11:>Y1=fe#12:>Z1=fe#13:>T1=fe#14:>YpX2=fe#15:>YmX2=fe#16:>Z2=fe#17:>T2d2=fe#18: 5 | return:nofallthrough:h=fe:asm/fe_add(>h,h=fe:asm/fe_sub(>h,h=fe:asm/fe_mul(>h,h=fe:asm/fe_sq(>h,h=fe:asm/fe_add(>h,Y,s); 20 | fe_1(h->Z); 21 | fe_sq(u,h->Y); 22 | fe_mul(v,u,d); 23 | fe_sub(u,u,h->Z); /* u = y^2-1 */ 24 | fe_add(v,v,h->Z); /* v = dy^2+1 */ 25 | 26 | fe_sq(v3,v); 27 | fe_mul(v3,v3,v); /* v3 = v^3 */ 28 | fe_sq(h->X,v3); 29 | fe_mul(h->X,h->X,v); 30 | fe_mul(h->X,h->X,u); /* x = uv^7 */ 31 | 32 | fe_pow22523(h->X,h->X); /* x = (uv^7)^((q-5)/8) */ 33 | fe_mul(h->X,h->X,v3); 34 | fe_mul(h->X,h->X,u); /* x = uv^3(uv^7)^((q-5)/8) */ 35 | 36 | fe_sq(vxx,h->X); 37 | fe_mul(vxx,vxx,v); 38 | fe_sub(check,vxx,u); /* vx^2-u */ 39 | if (fe_isnonzero(check)) { 40 | fe_add(check,vxx,u); /* vx^2+u */ 41 | if (fe_isnonzero(check)) return -1; 42 | fe_mul(h->X,h->X,sqrtm1); 43 | } 44 | 45 | if (fe_isnegative(h->X) == (s[31] >> 7)) 46 | fe_neg(h->X,h->X); 47 | 48 | fe_mul(h->T,h->X,h->Y); 49 | return 0; 50 | } 51 | -------------------------------------------------------------------------------- /src/crypto/crypto_ops_builder/ref10/ge_madd.c: -------------------------------------------------------------------------------- 1 | #include "ge.h" 2 | 3 | /* 4 | r = p + q 5 | */ 6 | 7 | void ge_madd(ge_p1p1 *r,const ge_p3 *p,const ge_precomp *q) 8 | { 9 | fe t0; 10 | #include "ge_madd.h" 11 | } 12 | -------------------------------------------------------------------------------- /src/crypto/crypto_ops_builder/ref10/ge_madd.q: -------------------------------------------------------------------------------- 1 | :name:fe:r->X:r->Y:r->Z:r->T:t0:t1:t2:t3:t4:t5:p->X:p->Y:p->Z:p->T:q->yplusx:q->yminusx:q->xy2d: 2 | fe r:var/r=fe: 3 | 4 | enter f:enter/f:>X1=fe#11:>Y1=fe#12:>Z1=fe#13:>T1=fe#14:>ypx2=fe#15:>ymx2=fe#16:>xy2d2=fe#17: 5 | return:nofallthrough:h=fe:asm/fe_add(>h,h=fe:asm/fe_sub(>h,h=fe:asm/fe_mul(>h,h=fe:asm/fe_sq(>h,h=fe:asm/fe_add(>h,X:r->Y:r->Z:r->T:t0:t1:t2:t3:t4:t5:p->X:p->Y:p->Z:p->T:q->yplusx:q->yminusx:q->xy2d: 2 | fe r:var/r=fe: 3 | 4 | enter f:enter/f:>X1=fe#11:>Y1=fe#12:>Z1=fe#13:>T1=fe#14:>ypx2=fe#15:>ymx2=fe#16:>xy2d2=fe#17: 5 | return:nofallthrough:h=fe:asm/fe_add(>h,h=fe:asm/fe_sub(>h,h=fe:asm/fe_mul(>h,h=fe:asm/fe_sq(>h,h=fe:asm/fe_add(>h,X,p->X,p->T); 10 | fe_mul(r->Y,p->Y,p->Z); 11 | fe_mul(r->Z,p->Z,p->T); 12 | } 13 | -------------------------------------------------------------------------------- /src/crypto/crypto_ops_builder/ref10/ge_p1p1_to_p3.c: -------------------------------------------------------------------------------- 1 | #include "ge.h" 2 | 3 | /* 4 | r = p 5 | */ 6 | 7 | extern void ge_p1p1_to_p3(ge_p3 *r,const ge_p1p1 *p) 8 | { 9 | fe_mul(r->X,p->X,p->T); 10 | fe_mul(r->Y,p->Y,p->Z); 11 | fe_mul(r->Z,p->Z,p->T); 12 | fe_mul(r->T,p->X,p->Y); 13 | } 14 | -------------------------------------------------------------------------------- /src/crypto/crypto_ops_builder/ref10/ge_p2_0.c: -------------------------------------------------------------------------------- 1 | #include "ge.h" 2 | 3 | void ge_p2_0(ge_p2 *h) 4 | { 5 | fe_0(h->X); 6 | fe_1(h->Y); 7 | fe_1(h->Z); 8 | } 9 | -------------------------------------------------------------------------------- /src/crypto/crypto_ops_builder/ref10/ge_p2_dbl.c: -------------------------------------------------------------------------------- 1 | #include "ge.h" 2 | 3 | /* 4 | r = 2 * p 5 | */ 6 | 7 | void ge_p2_dbl(ge_p1p1 *r,const ge_p2 *p) 8 | { 9 | fe t0; 10 | #include "ge_p2_dbl.h" 11 | } 12 | -------------------------------------------------------------------------------- /src/crypto/crypto_ops_builder/ref10/ge_p2_dbl.q: -------------------------------------------------------------------------------- 1 | :name:fe:r->X:r->Y:r->Z:r->T:t0:t1:t2:t3:t4:t5:p->X:p->Y:p->Z: 2 | fe r:var/r=fe: 3 | 4 | enter f:enter/f:>X1=fe#11:>Y1=fe#12:>Z1=fe#13: 5 | return:nofallthrough:h=fe:asm/fe_add(>h,h=fe:asm/fe_sub(>h,h=fe:asm/fe_mul(>h,h=fe:asm/fe_sq(>h,h=fe:asm/fe_sq2(>h,h=fe:asm/fe_add(>h,X); 6 | fe_1(h->Y); 7 | fe_1(h->Z); 8 | fe_0(h->T); 9 | } 10 | -------------------------------------------------------------------------------- /src/crypto/crypto_ops_builder/ref10/ge_p3_dbl.c: -------------------------------------------------------------------------------- 1 | #include "ge.h" 2 | 3 | /* 4 | r = 2 * p 5 | */ 6 | 7 | void ge_p3_dbl(ge_p1p1 *r,const ge_p3 *p) 8 | { 9 | ge_p2 q; 10 | ge_p3_to_p2(&q,p); 11 | ge_p2_dbl(r,&q); 12 | } 13 | -------------------------------------------------------------------------------- /src/crypto/crypto_ops_builder/ref10/ge_p3_to_cached.c: -------------------------------------------------------------------------------- 1 | #include "ge.h" 2 | 3 | /* 4 | r = p 5 | */ 6 | 7 | static const fe d2 = { 8 | #include "d2.h" 9 | } ; 10 | 11 | extern void ge_p3_to_cached(ge_cached *r,const ge_p3 *p) 12 | { 13 | fe_add(r->YplusX,p->Y,p->X); 14 | fe_sub(r->YminusX,p->Y,p->X); 15 | fe_copy(r->Z,p->Z); 16 | fe_mul(r->T2d,p->T,d2); 17 | } 18 | -------------------------------------------------------------------------------- /src/crypto/crypto_ops_builder/ref10/ge_p3_to_p2.c: -------------------------------------------------------------------------------- 1 | #include "ge.h" 2 | 3 | /* 4 | r = p 5 | */ 6 | 7 | extern void ge_p3_to_p2(ge_p2 *r,const ge_p3 *p) 8 | { 9 | fe_copy(r->X,p->X); 10 | fe_copy(r->Y,p->Y); 11 | fe_copy(r->Z,p->Z); 12 | } 13 | -------------------------------------------------------------------------------- /src/crypto/crypto_ops_builder/ref10/ge_p3_tobytes.c: -------------------------------------------------------------------------------- 1 | #include "ge.h" 2 | 3 | void ge_p3_tobytes(unsigned char *s,const ge_p3 *h) 4 | { 5 | fe recip; 6 | fe x; 7 | fe y; 8 | 9 | fe_invert(recip,h->Z); 10 | fe_mul(x,h->X,recip); 11 | fe_mul(y,h->Y,recip); 12 | fe_tobytes(s,y); 13 | s[31] ^= fe_isnegative(x) << 7; 14 | } 15 | -------------------------------------------------------------------------------- /src/crypto/crypto_ops_builder/ref10/ge_precomp_0.c: -------------------------------------------------------------------------------- 1 | #include "ge.h" 2 | 3 | void ge_precomp_0(ge_precomp *h) 4 | { 5 | fe_1(h->yplusx); 6 | fe_1(h->yminusx); 7 | fe_0(h->xy2d); 8 | } 9 | -------------------------------------------------------------------------------- /src/crypto/crypto_ops_builder/ref10/ge_sub.c: -------------------------------------------------------------------------------- 1 | #include "ge.h" 2 | 3 | /* 4 | r = p - q 5 | */ 6 | 7 | void ge_sub(ge_p1p1 *r,const ge_p3 *p,const ge_cached *q) 8 | { 9 | fe t0; 10 | #include "ge_sub.h" 11 | } 12 | -------------------------------------------------------------------------------- /src/crypto/crypto_ops_builder/ref10/ge_sub.q: -------------------------------------------------------------------------------- 1 | :name:fe:r->X:r->Y:r->Z:r->T:t0:t1:t2:t3:t4:t5:p->X:p->Y:p->Z:p->T:q->YplusX:q->YminusX:q->Z:q->T2d: 2 | fe r:var/r=fe: 3 | 4 | enter f:enter/f:>X1=fe#11:>Y1=fe#12:>Z1=fe#13:>T1=fe#14:>YpX2=fe#15:>YmX2=fe#16:>Z2=fe#17:>T2d2=fe#18: 5 | return:nofallthrough:h=fe:asm/fe_add(>h,h=fe:asm/fe_sub(>h,h=fe:asm/fe_mul(>h,h=fe:asm/fe_sq(>h,h=fe:asm/fe_add(>h,Z); 10 | fe_mul(x,h->X,recip); 11 | fe_mul(y,h->Y,recip); 12 | fe_tobytes(s,y); 13 | s[31] ^= fe_isnegative(x) << 7; 14 | } 15 | -------------------------------------------------------------------------------- /src/crypto/crypto_ops_builder/ref10/keypair.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "randombytes.h" 3 | #include "crypto_sign.h" 4 | #include "crypto_hash_sha512.h" 5 | #include "ge.h" 6 | 7 | int crypto_sign_keypair(unsigned char *pk,unsigned char *sk) 8 | { 9 | unsigned char az[64]; 10 | ge_p3 A; 11 | 12 | randombytes(sk,32); 13 | crypto_hash_sha512(az,sk,32); 14 | az[0] &= 248; 15 | az[31] &= 63; 16 | az[31] |= 64; 17 | 18 | ge_scalarmult_base(&A,az); 19 | ge_p3_tobytes(pk,&A); 20 | 21 | memmove(sk + 32,pk,32); 22 | return 0; 23 | } 24 | -------------------------------------------------------------------------------- /src/crypto/crypto_ops_builder/ref10/open.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "crypto_sign.h" 3 | #include "crypto_hash_sha512.h" 4 | #include "crypto_verify_32.h" 5 | #include "ge.h" 6 | #include "sc.h" 7 | 8 | int crypto_sign_open( 9 | unsigned char *m,unsigned long long *mlen, 10 | const unsigned char *sm,unsigned long long smlen, 11 | const unsigned char *pk 12 | ) 13 | { 14 | unsigned char pkcopy[32]; 15 | unsigned char rcopy[32]; 16 | unsigned char scopy[32]; 17 | unsigned char h[64]; 18 | unsigned char rcheck[32]; 19 | ge_p3 A; 20 | ge_p2 R; 21 | 22 | if (smlen < 64) goto badsig; 23 | if (sm[63] & 224) goto badsig; 24 | if (ge_frombytes_negate_vartime(&A,pk) != 0) goto badsig; 25 | 26 | memmove(pkcopy,pk,32); 27 | memmove(rcopy,sm,32); 28 | memmove(scopy,sm + 32,32); 29 | 30 | memmove(m,sm,smlen); 31 | memmove(m + 32,pkcopy,32); 32 | crypto_hash_sha512(h,m,smlen); 33 | sc_reduce(h); 34 | 35 | ge_double_scalarmult_vartime(&R,h,&A,scopy); 36 | ge_tobytes(rcheck,&R); 37 | if (crypto_verify_32(rcheck,rcopy) == 0) { 38 | memmove(m,m + 64,smlen - 64); 39 | memset(m + smlen - 64,0,64); 40 | *mlen = smlen - 64; 41 | return 0; 42 | } 43 | 44 | badsig: 45 | *mlen = -1; 46 | memset(m,0,smlen); 47 | return -1; 48 | } 49 | -------------------------------------------------------------------------------- /src/crypto/crypto_ops_builder/ref10/pow22523.q: -------------------------------------------------------------------------------- 1 | :name:fe:t0:t1:t2:t3:t4:t5:t6:t7:t8:t9:z:out: 2 | fe r:var/r=fe: 3 | 4 | enter f:enter/f:>z1=fe#11: 5 | return:nofallthrough:h=fe:asm/fe_mul(>h,h=fe:#k:asm/fe_sq(>h,h,>h);: 9 | 10 | : 11 | 12 | fe z1 13 | fe z2 14 | fe z8 15 | fe z9 16 | fe z11 17 | fe z22 18 | fe z_5_0 19 | fe z_10_5 20 | fe z_10_0 21 | fe z_20_10 22 | fe z_20_0 23 | fe z_40_20 24 | fe z_40_0 25 | fe z_50_10 26 | fe z_50_0 27 | fe z_100_50 28 | fe z_100_0 29 | fe z_200_100 30 | fe z_200_0 31 | fe z_250_50 32 | fe z_250_0 33 | fe z_252_2 34 | fe z_252_3 35 | 36 | enter pow22523 37 | 38 | z2 = z1^2^1 39 | z8 = z2^2^2 40 | z9 = z1*z8 41 | z11 = z2*z9 42 | z22 = z11^2^1 43 | z_5_0 = z9*z22 44 | z_10_5 = z_5_0^2^5 45 | z_10_0 = z_10_5*z_5_0 46 | z_20_10 = z_10_0^2^10 47 | z_20_0 = z_20_10*z_10_0 48 | z_40_20 = z_20_0^2^20 49 | z_40_0 = z_40_20*z_20_0 50 | z_50_10 = z_40_0^2^10 51 | z_50_0 = z_50_10*z_10_0 52 | z_100_50 = z_50_0^2^50 53 | z_100_0 = z_100_50*z_50_0 54 | z_200_100 = z_100_0^2^100 55 | z_200_0 = z_200_100*z_100_0 56 | z_250_50 = z_200_0^2^50 57 | z_250_0 = z_250_50*z_50_0 58 | z_252_2 = z_250_0^2^2 59 | z_252_3 = z_252_2*z1 60 | 61 | return 62 | -------------------------------------------------------------------------------- /src/crypto/crypto_ops_builder/ref10/pow225521.q: -------------------------------------------------------------------------------- 1 | :name:fe:t0:t1:t2:t3:t4:t5:t6:t7:t8:t9:z:out: 2 | fe r:var/r=fe: 3 | 4 | enter f:enter/f:>z1=fe#11: 5 | return:nofallthrough:h=fe:asm/fe_mul(>h,h=fe:#k:asm/fe_sq(>h,h,>h);: 9 | 10 | : 11 | 12 | fe z1 13 | fe z2 14 | fe z8 15 | fe z9 16 | fe z11 17 | fe z22 18 | fe z_5_0 19 | fe z_10_5 20 | fe z_10_0 21 | fe z_20_10 22 | fe z_20_0 23 | fe z_40_20 24 | fe z_40_0 25 | fe z_50_10 26 | fe z_50_0 27 | fe z_100_50 28 | fe z_100_0 29 | fe z_200_100 30 | fe z_200_0 31 | fe z_250_50 32 | fe z_250_0 33 | fe z_255_5 34 | fe z_255_21 35 | 36 | enter pow225521 37 | 38 | z2 = z1^2^1 39 | z8 = z2^2^2 40 | z9 = z1*z8 41 | z11 = z2*z9 42 | z22 = z11^2^1 43 | z_5_0 = z9*z22 44 | z_10_5 = z_5_0^2^5 45 | z_10_0 = z_10_5*z_5_0 46 | z_20_10 = z_10_0^2^10 47 | z_20_0 = z_20_10*z_10_0 48 | z_40_20 = z_20_0^2^20 49 | z_40_0 = z_40_20*z_20_0 50 | z_50_10 = z_40_0^2^10 51 | z_50_0 = z_50_10*z_10_0 52 | z_100_50 = z_50_0^2^50 53 | z_100_0 = z_100_50*z_50_0 54 | z_200_100 = z_100_0^2^100 55 | z_200_0 = z_200_100*z_100_0 56 | z_250_50 = z_200_0^2^50 57 | z_250_0 = z_250_50*z_50_0 58 | z_255_5 = z_250_0^2^5 59 | z_255_21 = z_255_5*z11 60 | 61 | return 62 | -------------------------------------------------------------------------------- /src/crypto/crypto_ops_builder/ref10/q2h.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | sed 's/^#.*//' \ 3 | | qhasm-generic \ 4 | | sed 's_//\(.*\)$_/*\1 */_' 5 | -------------------------------------------------------------------------------- /src/crypto/crypto_ops_builder/ref10/sc.h: -------------------------------------------------------------------------------- 1 | #ifndef SC_H 2 | #define SC_H 3 | 4 | /* 5 | The set of scalars is \Z/l 6 | where l = 2^252 + 27742317777372353535851937790883648493. 7 | */ 8 | 9 | #define sc_reduce crypto_sign_ed25519_ref10_sc_reduce 10 | #define sc_muladd crypto_sign_ed25519_ref10_sc_muladd 11 | 12 | extern void sc_reduce(unsigned char *); 13 | extern void sc_muladd(unsigned char *,const unsigned char *,const unsigned char *,const unsigned char *); 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /src/crypto/crypto_ops_builder/ref10/sign.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "crypto_sign.h" 3 | #include "crypto_hash_sha512.h" 4 | #include "ge.h" 5 | #include "sc.h" 6 | 7 | int crypto_sign( 8 | unsigned char *sm,unsigned long long *smlen, 9 | const unsigned char *m,unsigned long long mlen, 10 | const unsigned char *sk 11 | ) 12 | { 13 | unsigned char pk[32]; 14 | unsigned char az[64]; 15 | unsigned char nonce[64]; 16 | unsigned char hram[64]; 17 | ge_p3 R; 18 | 19 | memmove(pk,sk + 32,32); 20 | 21 | crypto_hash_sha512(az,sk,32); 22 | az[0] &= 248; 23 | az[31] &= 63; 24 | az[31] |= 64; 25 | 26 | *smlen = mlen + 64; 27 | memmove(sm + 64,m,mlen); 28 | memmove(sm + 32,az + 32,32); 29 | crypto_hash_sha512(nonce,sm + 32,mlen + 32); 30 | memmove(sm + 32,pk,32); 31 | 32 | sc_reduce(nonce); 33 | ge_scalarmult_base(&R,nonce); 34 | ge_p3_tobytes(sm,&R); 35 | 36 | crypto_hash_sha512(hram,sm,mlen + 64); 37 | sc_reduce(hram); 38 | sc_muladd(sm + 32,hram,az,nonce); 39 | 40 | return 0; 41 | } 42 | -------------------------------------------------------------------------------- /src/crypto/crypto_ops_builder/ref10/sqrtm1.h: -------------------------------------------------------------------------------- 1 | -32595792,-7943725,9377950,3500415,12389472,-272473,-25146209,-2005654,326686,11406482 2 | -------------------------------------------------------------------------------- /src/crypto/crypto_ops_builder/ref10/sqrtm1.py: -------------------------------------------------------------------------------- 1 | q = 2**255 - 19 2 | 3 | def expmod(b,e,m): 4 | if e == 0: return 1 5 | t = expmod(b,e/2,m)**2 % m 6 | if e & 1: t = (t*b) % m 7 | return t 8 | 9 | def inv(x): 10 | return expmod(x,q-2,q) 11 | 12 | def radix255(x): 13 | x = x % q 14 | if x + x > q: x -= q 15 | x = [x,0,0,0,0,0,0,0,0,0] 16 | bits = [26,25,26,25,26,25,26,25,26,25] 17 | for i in range(9): 18 | carry = (x[i] + 2**(bits[i]-1)) / 2**bits[i] 19 | x[i] -= carry * 2**bits[i] 20 | x[i + 1] += carry 21 | result = "" 22 | for i in range(9): 23 | result = result+str(x[i])+"," 24 | result = result+str(x[9]) 25 | return result 26 | 27 | I = expmod(2,(q-1)/4,q) 28 | print radix255(I) 29 | -------------------------------------------------------------------------------- /src/crypto/crypto_ops_builder/ref10CommentedCombined/api.h: -------------------------------------------------------------------------------- 1 | #define CRYPTO_SECRETKEYBYTES 64 2 | #define CRYPTO_PUBLICKEYBYTES 32 3 | #define CRYPTO_BYTES 64 4 | #define CRYPTO_DETERMINISTIC 1 5 | -------------------------------------------------------------------------------- /src/crypto/crypto_ops_builder/ref10CommentedCombined/base.py: -------------------------------------------------------------------------------- 1 | b = 256 2 | q = 2**255 - 19 3 | l = 2**252 + 27742317777372353535851937790883648493 4 | 5 | def expmod(b,e,m): 6 | if e == 0: return 1 7 | t = expmod(b,e/2,m)**2 % m 8 | if e & 1: t = (t*b) % m 9 | return t 10 | 11 | def inv(x): 12 | return expmod(x,q-2,q) 13 | 14 | d = -121665 * inv(121666) 15 | I = expmod(2,(q-1)/4,q) 16 | 17 | def xrecover(y): 18 | xx = (y*y-1) * inv(d*y*y+1) 19 | x = expmod(xx,(q+3)/8,q) 20 | if (x*x - xx) % q != 0: x = (x*I) % q 21 | if x % 2 != 0: x = q-x 22 | return x 23 | 24 | By = 4 * inv(5) 25 | Bx = xrecover(By) 26 | B = [Bx % q,By % q] 27 | 28 | def edwards(P,Q): 29 | x1 = P[0] 30 | y1 = P[1] 31 | x2 = Q[0] 32 | y2 = Q[1] 33 | x3 = (x1*y2+x2*y1) * inv(1+d*x1*x2*y1*y2) 34 | y3 = (y1*y2+x1*x2) * inv(1-d*x1*x2*y1*y2) 35 | return [x3 % q,y3 % q] 36 | 37 | def radix255(x): 38 | x = x % q 39 | if x + x > q: x -= q 40 | x = [x,0,0,0,0,0,0,0,0,0] 41 | bits = [26,25,26,25,26,25,26,25,26,25] 42 | for i in range(9): 43 | carry = (x[i] + 2**(bits[i]-1)) / 2**bits[i] 44 | x[i] -= carry * 2**bits[i] 45 | x[i + 1] += carry 46 | result = "" 47 | for i in range(9): 48 | result = result+str(x[i])+"," 49 | result = result+str(x[9]) 50 | return result 51 | 52 | Bi = B 53 | for i in range(32): 54 | print "{" 55 | Bij = Bi 56 | for j in range(8): 57 | print " {" 58 | print " {",radix255(Bij[1]+Bij[0]),"}," 59 | print " {",radix255(Bij[1]-Bij[0]),"}," 60 | print " {",radix255(2*d*Bij[0]*Bij[1]),"}," 61 | Bij = edwards(Bij,Bi) 62 | print " }," 63 | print "}," 64 | for k in range(8): 65 | Bi = edwards(Bi,Bi) 66 | -------------------------------------------------------------------------------- /src/crypto/crypto_ops_builder/ref10CommentedCombined/base2.py: -------------------------------------------------------------------------------- 1 | b = 256 2 | q = 2**255 - 19 3 | l = 2**252 + 27742317777372353535851937790883648493 4 | 5 | def expmod(b,e,m): 6 | if e == 0: return 1 7 | t = expmod(b,e/2,m)**2 % m 8 | if e & 1: t = (t*b) % m 9 | return t 10 | 11 | def inv(x): 12 | return expmod(x,q-2,q) 13 | 14 | d = -121665 * inv(121666) 15 | I = expmod(2,(q-1)/4,q) 16 | 17 | def xrecover(y): 18 | xx = (y*y-1) * inv(d*y*y+1) 19 | x = expmod(xx,(q+3)/8,q) 20 | if (x*x - xx) % q != 0: x = (x*I) % q 21 | if x % 2 != 0: x = q-x 22 | return x 23 | 24 | By = 4 * inv(5) 25 | Bx = xrecover(By) 26 | B = [Bx % q,By % q] 27 | 28 | def edwards(P,Q): 29 | x1 = P[0] 30 | y1 = P[1] 31 | x2 = Q[0] 32 | y2 = Q[1] 33 | x3 = (x1*y2+x2*y1) * inv(1+d*x1*x2*y1*y2) 34 | y3 = (y1*y2+x1*x2) * inv(1-d*x1*x2*y1*y2) 35 | return [x3 % q,y3 % q] 36 | 37 | def radix255(x): 38 | x = x % q 39 | if x + x > q: x -= q 40 | x = [x,0,0,0,0,0,0,0,0,0] 41 | bits = [26,25,26,25,26,25,26,25,26,25] 42 | for i in range(9): 43 | carry = (x[i] + 2**(bits[i]-1)) / 2**bits[i] 44 | x[i] -= carry * 2**bits[i] 45 | x[i + 1] += carry 46 | result = "" 47 | for i in range(9): 48 | result = result+str(x[i])+"," 49 | result = result+str(x[9]) 50 | return result 51 | 52 | Bi = B 53 | 54 | for i in range(8): 55 | print " {" 56 | print " {",radix255(Bi[1]+Bi[0]),"}," 57 | print " {",radix255(Bi[1]-Bi[0]),"}," 58 | print " {",radix255(2*d*Bi[0]*Bi[1]),"}," 59 | print " }," 60 | Bi = edwards(B,edwards(B,Bi)) 61 | -------------------------------------------------------------------------------- /src/crypto/crypto_ops_builder/ref10CommentedCombined/d.h: -------------------------------------------------------------------------------- 1 | -10913610,13857413,-15372611,6949391,114729,-8787816,-6275908,-3247719,-18696448,-12055116 2 | -------------------------------------------------------------------------------- /src/crypto/crypto_ops_builder/ref10CommentedCombined/d.py: -------------------------------------------------------------------------------- 1 | q = 2**255 - 19 2 | 3 | def expmod(b,e,m): 4 | if e == 0: return 1 5 | t = expmod(b,e/2,m)**2 % m 6 | if e & 1: t = (t*b) % m 7 | return t 8 | 9 | def inv(x): 10 | return expmod(x,q-2,q) 11 | 12 | def radix255(x): 13 | x = x % q 14 | if x + x > q: x -= q 15 | x = [x,0,0,0,0,0,0,0,0,0] 16 | bits = [26,25,26,25,26,25,26,25,26,25] 17 | for i in range(9): 18 | carry = (x[i] + 2**(bits[i]-1)) / 2**bits[i] 19 | x[i] -= carry * 2**bits[i] 20 | x[i + 1] += carry 21 | result = "" 22 | for i in range(9): 23 | result = result+str(x[i])+"," 24 | result = result+str(x[9]) 25 | return result 26 | 27 | d = -121665 * inv(121666) 28 | print radix255(d) 29 | -------------------------------------------------------------------------------- /src/crypto/crypto_ops_builder/ref10CommentedCombined/d2.h: -------------------------------------------------------------------------------- 1 | -21827239,-5839606,-30745221,13898782,229458,15978800,-12551817,-6495438,29715968,9444199 2 | -------------------------------------------------------------------------------- /src/crypto/crypto_ops_builder/ref10CommentedCombined/d2.py: -------------------------------------------------------------------------------- 1 | q = 2**255 - 19 2 | 3 | def expmod(b,e,m): 4 | if e == 0: return 1 5 | t = expmod(b,e/2,m)**2 % m 6 | if e & 1: t = (t*b) % m 7 | return t 8 | 9 | def inv(x): 10 | return expmod(x,q-2,q) 11 | 12 | def radix255(x): 13 | x = x % q 14 | if x + x > q: x -= q 15 | x = [x,0,0,0,0,0,0,0,0,0] 16 | bits = [26,25,26,25,26,25,26,25,26,25] 17 | for i in range(9): 18 | carry = (x[i] + 2**(bits[i]-1)) / 2**bits[i] 19 | x[i] -= carry * 2**bits[i] 20 | x[i + 1] += carry 21 | result = "" 22 | for i in range(9): 23 | result = result+str(x[i])+"," 24 | result = result+str(x[9]) 25 | return result 26 | 27 | d = -121665 * inv(121666) 28 | print radix255(d*2) 29 | -------------------------------------------------------------------------------- /src/crypto/crypto_ops_builder/ref10CommentedCombined/description: -------------------------------------------------------------------------------- 1 | shen_ed25519_ref10 2 | MakeCryptoOps.py makes crypto-ops.c in the Monero source from the ref10 implementation 3 | 4 | EdDSA signatures using Curve25519 5 | from https://hyperelliptic.org/ebats/supercop-20141124.tar.bz2 6 | 7 | Commented / combined by Shen Noether, Monero Research Lab 8 | -------------------------------------------------------------------------------- /src/crypto/crypto_ops_builder/ref10CommentedCombined/designers: -------------------------------------------------------------------------------- 1 | ref10: 2 | Daniel J. Bernstein 3 | Niels Duif 4 | Tanja Lange 5 | Peter Schwabe 6 | Bo-Yin Yang 7 | 8 | MakeCryptoOps.py: 9 | Shen Noether, Monero Research Labs 10 | -------------------------------------------------------------------------------- /src/crypto/crypto_ops_builder/ref10CommentedCombined/fe_0.c: -------------------------------------------------------------------------------- 1 | #include "fe.h" 2 | 3 | /* 4 | h = 0 5 | */ 6 | 7 | void fe_0(fe h) 8 | { 9 | h[0] = 0; 10 | h[1] = 0; 11 | h[2] = 0; 12 | h[3] = 0; 13 | h[4] = 0; 14 | h[5] = 0; 15 | h[6] = 0; 16 | h[7] = 0; 17 | h[8] = 0; 18 | h[9] = 0; 19 | } 20 | -------------------------------------------------------------------------------- /src/crypto/crypto_ops_builder/ref10CommentedCombined/fe_1.c: -------------------------------------------------------------------------------- 1 | #include "fe.h" 2 | 3 | /* 4 | h = 1 5 | */ 6 | 7 | void fe_1(fe h) 8 | { 9 | h[0] = 1; 10 | h[1] = 0; 11 | h[2] = 0; 12 | h[3] = 0; 13 | h[4] = 0; 14 | h[5] = 0; 15 | h[6] = 0; 16 | h[7] = 0; 17 | h[8] = 0; 18 | h[9] = 0; 19 | } 20 | -------------------------------------------------------------------------------- /src/crypto/crypto_ops_builder/ref10CommentedCombined/fe_add.c: -------------------------------------------------------------------------------- 1 | #include "fe.h" 2 | 3 | /* 4 | h = f + g 5 | Can overlap h with f or g. 6 | 7 | Preconditions: 8 | |f| bounded by 1.1*2^25,1.1*2^24,1.1*2^25,1.1*2^24,etc. 9 | |g| bounded by 1.1*2^25,1.1*2^24,1.1*2^25,1.1*2^24,etc. 10 | 11 | Postconditions: 12 | |h| bounded by 1.1*2^26,1.1*2^25,1.1*2^26,1.1*2^25,etc. 13 | */ 14 | 15 | void fe_add(fe h,const fe f,const fe g) 16 | { 17 | crypto_int32 f0 = f[0]; 18 | crypto_int32 f1 = f[1]; 19 | crypto_int32 f2 = f[2]; 20 | crypto_int32 f3 = f[3]; 21 | crypto_int32 f4 = f[4]; 22 | crypto_int32 f5 = f[5]; 23 | crypto_int32 f6 = f[6]; 24 | crypto_int32 f7 = f[7]; 25 | crypto_int32 f8 = f[8]; 26 | crypto_int32 f9 = f[9]; 27 | crypto_int32 g0 = g[0]; 28 | crypto_int32 g1 = g[1]; 29 | crypto_int32 g2 = g[2]; 30 | crypto_int32 g3 = g[3]; 31 | crypto_int32 g4 = g[4]; 32 | crypto_int32 g5 = g[5]; 33 | crypto_int32 g6 = g[6]; 34 | crypto_int32 g7 = g[7]; 35 | crypto_int32 g8 = g[8]; 36 | crypto_int32 g9 = g[9]; 37 | crypto_int32 h0 = f0 + g0; 38 | crypto_int32 h1 = f1 + g1; 39 | crypto_int32 h2 = f2 + g2; 40 | crypto_int32 h3 = f3 + g3; 41 | crypto_int32 h4 = f4 + g4; 42 | crypto_int32 h5 = f5 + g5; 43 | crypto_int32 h6 = f6 + g6; 44 | crypto_int32 h7 = f7 + g7; 45 | crypto_int32 h8 = f8 + g8; 46 | crypto_int32 h9 = f9 + g9; 47 | h[0] = h0; 48 | h[1] = h1; 49 | h[2] = h2; 50 | h[3] = h3; 51 | h[4] = h4; 52 | h[5] = h5; 53 | h[6] = h6; 54 | h[7] = h7; 55 | h[8] = h8; 56 | h[9] = h9; 57 | } 58 | -------------------------------------------------------------------------------- /src/crypto/crypto_ops_builder/ref10CommentedCombined/fe_cmov.c: -------------------------------------------------------------------------------- 1 | #include "fe.h" 2 | 3 | /* 4 | Replace (f,g) with (g,g) if b == 1; 5 | replace (f,g) with (f,g) if b == 0. 6 | 7 | Preconditions: b in {0,1}. 8 | */ 9 | 10 | void fe_cmov(fe f,const fe g,unsigned int b) 11 | { 12 | crypto_int32 f0 = f[0]; 13 | crypto_int32 f1 = f[1]; 14 | crypto_int32 f2 = f[2]; 15 | crypto_int32 f3 = f[3]; 16 | crypto_int32 f4 = f[4]; 17 | crypto_int32 f5 = f[5]; 18 | crypto_int32 f6 = f[6]; 19 | crypto_int32 f7 = f[7]; 20 | crypto_int32 f8 = f[8]; 21 | crypto_int32 f9 = f[9]; 22 | crypto_int32 g0 = g[0]; 23 | crypto_int32 g1 = g[1]; 24 | crypto_int32 g2 = g[2]; 25 | crypto_int32 g3 = g[3]; 26 | crypto_int32 g4 = g[4]; 27 | crypto_int32 g5 = g[5]; 28 | crypto_int32 g6 = g[6]; 29 | crypto_int32 g7 = g[7]; 30 | crypto_int32 g8 = g[8]; 31 | crypto_int32 g9 = g[9]; 32 | crypto_int32 x0 = f0 ^ g0; 33 | crypto_int32 x1 = f1 ^ g1; 34 | crypto_int32 x2 = f2 ^ g2; 35 | crypto_int32 x3 = f3 ^ g3; 36 | crypto_int32 x4 = f4 ^ g4; 37 | crypto_int32 x5 = f5 ^ g5; 38 | crypto_int32 x6 = f6 ^ g6; 39 | crypto_int32 x7 = f7 ^ g7; 40 | crypto_int32 x8 = f8 ^ g8; 41 | crypto_int32 x9 = f9 ^ g9; 42 | b = -b; 43 | x0 &= b; 44 | x1 &= b; 45 | x2 &= b; 46 | x3 &= b; 47 | x4 &= b; 48 | x5 &= b; 49 | x6 &= b; 50 | x7 &= b; 51 | x8 &= b; 52 | x9 &= b; 53 | f[0] = f0 ^ x0; 54 | f[1] = f1 ^ x1; 55 | f[2] = f2 ^ x2; 56 | f[3] = f3 ^ x3; 57 | f[4] = f4 ^ x4; 58 | f[5] = f5 ^ x5; 59 | f[6] = f6 ^ x6; 60 | f[7] = f7 ^ x7; 61 | f[8] = f8 ^ x8; 62 | f[9] = f9 ^ x9; 63 | } 64 | -------------------------------------------------------------------------------- /src/crypto/crypto_ops_builder/ref10CommentedCombined/fe_copy.c: -------------------------------------------------------------------------------- 1 | #include "fe.h" 2 | 3 | /* 4 | h = f 5 | */ 6 | 7 | void fe_copy(fe h,const fe f) 8 | { 9 | crypto_int32 f0 = f[0]; 10 | crypto_int32 f1 = f[1]; 11 | crypto_int32 f2 = f[2]; 12 | crypto_int32 f3 = f[3]; 13 | crypto_int32 f4 = f[4]; 14 | crypto_int32 f5 = f[5]; 15 | crypto_int32 f6 = f[6]; 16 | crypto_int32 f7 = f[7]; 17 | crypto_int32 f8 = f[8]; 18 | crypto_int32 f9 = f[9]; 19 | h[0] = f0; 20 | h[1] = f1; 21 | h[2] = f2; 22 | h[3] = f3; 23 | h[4] = f4; 24 | h[5] = f5; 25 | h[6] = f6; 26 | h[7] = f7; 27 | h[8] = f8; 28 | h[9] = f9; 29 | } 30 | -------------------------------------------------------------------------------- /src/crypto/crypto_ops_builder/ref10CommentedCombined/fe_invert.c: -------------------------------------------------------------------------------- 1 | #include "fe.h" 2 | 3 | void fe_invert(fe out,const fe z) 4 | { 5 | fe t0; 6 | fe t1; 7 | fe t2; 8 | fe t3; 9 | int i; 10 | 11 | #include "pow225521.h" 12 | 13 | return; 14 | } 15 | -------------------------------------------------------------------------------- /src/crypto/crypto_ops_builder/ref10CommentedCombined/fe_isnegative.c: -------------------------------------------------------------------------------- 1 | #include "fe.h" 2 | 3 | /* 4 | return 1 if f is in {1,3,5,...,q-2} 5 | return 0 if f is in {0,2,4,...,q-1} 6 | 7 | Preconditions: 8 | |f| bounded by 1.1*2^26,1.1*2^25,1.1*2^26,1.1*2^25,etc. 9 | */ 10 | 11 | int fe_isnegative(const fe f) 12 | { 13 | unsigned char s[32]; 14 | fe_tobytes(s,f); 15 | return s[0] & 1; 16 | } 17 | -------------------------------------------------------------------------------- /src/crypto/crypto_ops_builder/ref10CommentedCombined/fe_isnonzero.c: -------------------------------------------------------------------------------- 1 | #include "fe.h" 2 | #include "crypto_verify_32.h" 3 | 4 | /* 5 | return 1 if f == 0 6 | return 0 if f != 0 7 | 8 | Preconditions: 9 | |f| bounded by 1.1*2^26,1.1*2^25,1.1*2^26,1.1*2^25,etc. 10 | */ 11 | 12 | static const unsigned char zero[32]; 13 | 14 | int fe_isnonzero(const fe f) 15 | { 16 | unsigned char s[32]; 17 | fe_tobytes(s,f); 18 | return crypto_verify_32(s,zero); 19 | } 20 | -------------------------------------------------------------------------------- /src/crypto/crypto_ops_builder/ref10CommentedCombined/fe_neg.c: -------------------------------------------------------------------------------- 1 | #include "fe.h" 2 | 3 | /* 4 | h = -f 5 | 6 | Preconditions: 7 | |f| bounded by 1.1*2^25,1.1*2^24,1.1*2^25,1.1*2^24,etc. 8 | 9 | Postconditions: 10 | |h| bounded by 1.1*2^25,1.1*2^24,1.1*2^25,1.1*2^24,etc. 11 | */ 12 | 13 | void fe_neg(fe h,const fe f) 14 | { 15 | crypto_int32 f0 = f[0]; 16 | crypto_int32 f1 = f[1]; 17 | crypto_int32 f2 = f[2]; 18 | crypto_int32 f3 = f[3]; 19 | crypto_int32 f4 = f[4]; 20 | crypto_int32 f5 = f[5]; 21 | crypto_int32 f6 = f[6]; 22 | crypto_int32 f7 = f[7]; 23 | crypto_int32 f8 = f[8]; 24 | crypto_int32 f9 = f[9]; 25 | crypto_int32 h0 = -f0; 26 | crypto_int32 h1 = -f1; 27 | crypto_int32 h2 = -f2; 28 | crypto_int32 h3 = -f3; 29 | crypto_int32 h4 = -f4; 30 | crypto_int32 h5 = -f5; 31 | crypto_int32 h6 = -f6; 32 | crypto_int32 h7 = -f7; 33 | crypto_int32 h8 = -f8; 34 | crypto_int32 h9 = -f9; 35 | h[0] = h0; 36 | h[1] = h1; 37 | h[2] = h2; 38 | h[3] = h3; 39 | h[4] = h4; 40 | h[5] = h5; 41 | h[6] = h6; 42 | h[7] = h7; 43 | h[8] = h8; 44 | h[9] = h9; 45 | } 46 | -------------------------------------------------------------------------------- /src/crypto/crypto_ops_builder/ref10CommentedCombined/fe_pow22523.c: -------------------------------------------------------------------------------- 1 | #include "fe.h" 2 | 3 | void fe_pow22523(fe out,const fe z) 4 | { 5 | fe t0; 6 | fe t1; 7 | fe t2; 8 | int i; 9 | 10 | #include "pow22523.h" 11 | 12 | return; 13 | } 14 | -------------------------------------------------------------------------------- /src/crypto/crypto_ops_builder/ref10CommentedCombined/fe_sub.c: -------------------------------------------------------------------------------- 1 | #include "fe.h" 2 | 3 | /* 4 | h = f - g 5 | Can overlap h with f or g. 6 | 7 | Preconditions: 8 | |f| bounded by 1.1*2^25,1.1*2^24,1.1*2^25,1.1*2^24,etc. 9 | |g| bounded by 1.1*2^25,1.1*2^24,1.1*2^25,1.1*2^24,etc. 10 | 11 | Postconditions: 12 | |h| bounded by 1.1*2^26,1.1*2^25,1.1*2^26,1.1*2^25,etc. 13 | */ 14 | 15 | void fe_sub(fe h,const fe f,const fe g) 16 | { 17 | crypto_int32 f0 = f[0]; 18 | crypto_int32 f1 = f[1]; 19 | crypto_int32 f2 = f[2]; 20 | crypto_int32 f3 = f[3]; 21 | crypto_int32 f4 = f[4]; 22 | crypto_int32 f5 = f[5]; 23 | crypto_int32 f6 = f[6]; 24 | crypto_int32 f7 = f[7]; 25 | crypto_int32 f8 = f[8]; 26 | crypto_int32 f9 = f[9]; 27 | crypto_int32 g0 = g[0]; 28 | crypto_int32 g1 = g[1]; 29 | crypto_int32 g2 = g[2]; 30 | crypto_int32 g3 = g[3]; 31 | crypto_int32 g4 = g[4]; 32 | crypto_int32 g5 = g[5]; 33 | crypto_int32 g6 = g[6]; 34 | crypto_int32 g7 = g[7]; 35 | crypto_int32 g8 = g[8]; 36 | crypto_int32 g9 = g[9]; 37 | crypto_int32 h0 = f0 - g0; 38 | crypto_int32 h1 = f1 - g1; 39 | crypto_int32 h2 = f2 - g2; 40 | crypto_int32 h3 = f3 - g3; 41 | crypto_int32 h4 = f4 - g4; 42 | crypto_int32 h5 = f5 - g5; 43 | crypto_int32 h6 = f6 - g6; 44 | crypto_int32 h7 = f7 - g7; 45 | crypto_int32 h8 = f8 - g8; 46 | crypto_int32 h9 = f9 - g9; 47 | h[0] = h0; 48 | h[1] = h1; 49 | h[2] = h2; 50 | h[3] = h3; 51 | h[4] = h4; 52 | h[5] = h5; 53 | h[6] = h6; 54 | h[7] = h7; 55 | h[8] = h8; 56 | h[9] = h9; 57 | } 58 | -------------------------------------------------------------------------------- /src/crypto/crypto_ops_builder/ref10CommentedCombined/ge_add.c: -------------------------------------------------------------------------------- 1 | #include "ge.h" 2 | 3 | /* 4 | r = p + q 5 | */ 6 | 7 | void ge_add(ge_p1p1 *r,const ge_p3 *p,const ge_cached *q) 8 | { 9 | fe t0; 10 | #include "ge_add.h" 11 | } 12 | -------------------------------------------------------------------------------- /src/crypto/crypto_ops_builder/ref10CommentedCombined/ge_add.q: -------------------------------------------------------------------------------- 1 | :name:fe:r->X:r->Y:r->Z:r->T:t0:t1:t2:t3:t4:t5:p->X:p->Y:p->Z:p->T:q->YplusX:q->YminusX:q->Z:q->T2d: 2 | fe r:var/r=fe: 3 | 4 | enter f:enter/f:>X1=fe#11:>Y1=fe#12:>Z1=fe#13:>T1=fe#14:>YpX2=fe#15:>YmX2=fe#16:>Z2=fe#17:>T2d2=fe#18: 5 | return:nofallthrough:h=fe:asm/fe_add(>h,h=fe:asm/fe_sub(>h,h=fe:asm/fe_mul(>h,h=fe:asm/fe_sq(>h,h=fe:asm/fe_add(>h,Y,s); 20 | fe_1(h->Z); 21 | fe_sq(u,h->Y); 22 | fe_mul(v,u,d); 23 | fe_sub(u,u,h->Z); /* u = y^2-1 */ 24 | fe_add(v,v,h->Z); /* v = dy^2+1 */ 25 | 26 | fe_sq(v3,v); 27 | fe_mul(v3,v3,v); /* v3 = v^3 */ 28 | fe_sq(h->X,v3); 29 | fe_mul(h->X,h->X,v); 30 | fe_mul(h->X,h->X,u); /* x = uv^7 */ 31 | 32 | fe_pow22523(h->X,h->X); /* x = (uv^7)^((q-5)/8) */ 33 | fe_mul(h->X,h->X,v3); 34 | fe_mul(h->X,h->X,u); /* x = uv^3(uv^7)^((q-5)/8) */ 35 | 36 | fe_sq(vxx,h->X); 37 | fe_mul(vxx,vxx,v); 38 | fe_sub(check,vxx,u); /* vx^2-u */ 39 | if (fe_isnonzero(check)) { 40 | fe_add(check,vxx,u); /* vx^2+u */ 41 | if (fe_isnonzero(check)) return -1; 42 | fe_mul(h->X,h->X,sqrtm1); 43 | } 44 | 45 | if (fe_isnegative(h->X) == (s[31] >> 7)) 46 | fe_neg(h->X,h->X); 47 | 48 | fe_mul(h->T,h->X,h->Y); 49 | return 0; 50 | } 51 | -------------------------------------------------------------------------------- /src/crypto/crypto_ops_builder/ref10CommentedCombined/ge_madd.c: -------------------------------------------------------------------------------- 1 | #include "ge.h" 2 | 3 | /* 4 | r = p + q 5 | */ 6 | 7 | void ge_madd(ge_p1p1 *r,const ge_p3 *p,const ge_precomp *q) 8 | { 9 | fe t0; 10 | #include "ge_madd.h" 11 | } 12 | -------------------------------------------------------------------------------- /src/crypto/crypto_ops_builder/ref10CommentedCombined/ge_madd.q: -------------------------------------------------------------------------------- 1 | :name:fe:r->X:r->Y:r->Z:r->T:t0:t1:t2:t3:t4:t5:p->X:p->Y:p->Z:p->T:q->yplusx:q->yminusx:q->xy2d: 2 | fe r:var/r=fe: 3 | 4 | enter f:enter/f:>X1=fe#11:>Y1=fe#12:>Z1=fe#13:>T1=fe#14:>ypx2=fe#15:>ymx2=fe#16:>xy2d2=fe#17: 5 | return:nofallthrough:h=fe:asm/fe_add(>h,h=fe:asm/fe_sub(>h,h=fe:asm/fe_mul(>h,h=fe:asm/fe_sq(>h,h=fe:asm/fe_add(>h,X:r->Y:r->Z:r->T:t0:t1:t2:t3:t4:t5:p->X:p->Y:p->Z:p->T:q->yplusx:q->yminusx:q->xy2d: 2 | fe r:var/r=fe: 3 | 4 | enter f:enter/f:>X1=fe#11:>Y1=fe#12:>Z1=fe#13:>T1=fe#14:>ypx2=fe#15:>ymx2=fe#16:>xy2d2=fe#17: 5 | return:nofallthrough:h=fe:asm/fe_add(>h,h=fe:asm/fe_sub(>h,h=fe:asm/fe_mul(>h,h=fe:asm/fe_sq(>h,h=fe:asm/fe_add(>h,X,p->X,p->T); 10 | fe_mul(r->Y,p->Y,p->Z); 11 | fe_mul(r->Z,p->Z,p->T); 12 | } 13 | -------------------------------------------------------------------------------- /src/crypto/crypto_ops_builder/ref10CommentedCombined/ge_p1p1_to_p3.c: -------------------------------------------------------------------------------- 1 | #include "ge.h" 2 | 3 | /* 4 | r = p 5 | */ 6 | 7 | extern void ge_p1p1_to_p3(ge_p3 *r,const ge_p1p1 *p) 8 | { 9 | fe_mul(r->X,p->X,p->T); 10 | fe_mul(r->Y,p->Y,p->Z); 11 | fe_mul(r->Z,p->Z,p->T); 12 | fe_mul(r->T,p->X,p->Y); 13 | } 14 | -------------------------------------------------------------------------------- /src/crypto/crypto_ops_builder/ref10CommentedCombined/ge_p2_0.c: -------------------------------------------------------------------------------- 1 | #include "ge.h" 2 | 3 | void ge_p2_0(ge_p2 *h) 4 | { 5 | fe_0(h->X); 6 | fe_1(h->Y); 7 | fe_1(h->Z); 8 | } 9 | -------------------------------------------------------------------------------- /src/crypto/crypto_ops_builder/ref10CommentedCombined/ge_p2_dbl.c: -------------------------------------------------------------------------------- 1 | #include "ge.h" 2 | 3 | /* 4 | r = 2 * p 5 | */ 6 | 7 | void ge_p2_dbl(ge_p1p1 *r,const ge_p2 *p) 8 | { 9 | fe t0; 10 | #include "ge_p2_dbl.h" 11 | } 12 | -------------------------------------------------------------------------------- /src/crypto/crypto_ops_builder/ref10CommentedCombined/ge_p2_dbl.q: -------------------------------------------------------------------------------- 1 | :name:fe:r->X:r->Y:r->Z:r->T:t0:t1:t2:t3:t4:t5:p->X:p->Y:p->Z: 2 | fe r:var/r=fe: 3 | 4 | enter f:enter/f:>X1=fe#11:>Y1=fe#12:>Z1=fe#13: 5 | return:nofallthrough:h=fe:asm/fe_add(>h,h=fe:asm/fe_sub(>h,h=fe:asm/fe_mul(>h,h=fe:asm/fe_sq(>h,h=fe:asm/fe_sq2(>h,h=fe:asm/fe_add(>h,X); 6 | fe_1(h->Y); 7 | fe_1(h->Z); 8 | fe_0(h->T); 9 | } 10 | -------------------------------------------------------------------------------- /src/crypto/crypto_ops_builder/ref10CommentedCombined/ge_p3_dbl.c: -------------------------------------------------------------------------------- 1 | #include "ge.h" 2 | 3 | /* 4 | r = 2 * p 5 | */ 6 | 7 | void ge_p3_dbl(ge_p1p1 *r,const ge_p3 *p) 8 | { 9 | ge_p2 q; 10 | ge_p3_to_p2(&q,p); 11 | ge_p2_dbl(r,&q); 12 | } 13 | -------------------------------------------------------------------------------- /src/crypto/crypto_ops_builder/ref10CommentedCombined/ge_p3_to_cached.c: -------------------------------------------------------------------------------- 1 | #include "ge.h" 2 | 3 | /* 4 | r = p 5 | */ 6 | 7 | static const fe d2 = { 8 | #include "d2.h" 9 | } ; 10 | 11 | extern void ge_p3_to_cached(ge_cached *r,const ge_p3 *p) 12 | { 13 | fe_add(r->YplusX,p->Y,p->X); 14 | fe_sub(r->YminusX,p->Y,p->X); 15 | fe_copy(r->Z,p->Z); 16 | fe_mul(r->T2d,p->T,d2); 17 | } 18 | -------------------------------------------------------------------------------- /src/crypto/crypto_ops_builder/ref10CommentedCombined/ge_p3_to_p2.c: -------------------------------------------------------------------------------- 1 | #include "ge.h" 2 | 3 | /* 4 | r = p 5 | */ 6 | 7 | extern void ge_p3_to_p2(ge_p2 *r,const ge_p3 *p) 8 | { 9 | fe_copy(r->X,p->X); 10 | fe_copy(r->Y,p->Y); 11 | fe_copy(r->Z,p->Z); 12 | } 13 | -------------------------------------------------------------------------------- /src/crypto/crypto_ops_builder/ref10CommentedCombined/ge_p3_tobytes.c: -------------------------------------------------------------------------------- 1 | #include "ge.h" 2 | 3 | void ge_p3_tobytes(unsigned char *s,const ge_p3 *h) 4 | { 5 | fe recip; 6 | fe x; 7 | fe y; 8 | 9 | fe_invert(recip,h->Z); 10 | fe_mul(x,h->X,recip); 11 | fe_mul(y,h->Y,recip); 12 | fe_tobytes(s,y); 13 | s[31] ^= fe_isnegative(x) << 7; 14 | } 15 | -------------------------------------------------------------------------------- /src/crypto/crypto_ops_builder/ref10CommentedCombined/ge_precomp_0.c: -------------------------------------------------------------------------------- 1 | #include "ge.h" 2 | 3 | void ge_precomp_0(ge_precomp *h) 4 | { 5 | fe_1(h->yplusx); 6 | fe_1(h->yminusx); 7 | fe_0(h->xy2d); 8 | } 9 | -------------------------------------------------------------------------------- /src/crypto/crypto_ops_builder/ref10CommentedCombined/ge_sub.c: -------------------------------------------------------------------------------- 1 | #include "ge.h" 2 | 3 | /* 4 | r = p - q 5 | */ 6 | 7 | void ge_sub(ge_p1p1 *r,const ge_p3 *p,const ge_cached *q) 8 | { 9 | fe t0; 10 | #include "ge_sub.h" 11 | } 12 | -------------------------------------------------------------------------------- /src/crypto/crypto_ops_builder/ref10CommentedCombined/ge_sub.q: -------------------------------------------------------------------------------- 1 | :name:fe:r->X:r->Y:r->Z:r->T:t0:t1:t2:t3:t4:t5:p->X:p->Y:p->Z:p->T:q->YplusX:q->YminusX:q->Z:q->T2d: 2 | fe r:var/r=fe: 3 | 4 | enter f:enter/f:>X1=fe#11:>Y1=fe#12:>Z1=fe#13:>T1=fe#14:>YpX2=fe#15:>YmX2=fe#16:>Z2=fe#17:>T2d2=fe#18: 5 | return:nofallthrough:h=fe:asm/fe_add(>h,h=fe:asm/fe_sub(>h,h=fe:asm/fe_mul(>h,h=fe:asm/fe_sq(>h,h=fe:asm/fe_add(>h,Z); 10 | fe_mul(x,h->X,recip); 11 | fe_mul(y,h->Y,recip); 12 | fe_tobytes(s,y); 13 | s[31] ^= fe_isnegative(x) << 7; 14 | } 15 | -------------------------------------------------------------------------------- /src/crypto/crypto_ops_builder/ref10CommentedCombined/keypair.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "randombytes.h" 3 | #include "crypto_sign.h" 4 | #include "crypto_hash_sha512.h" 5 | #include "ge.h" 6 | 7 | int crypto_sign_keypair(unsigned char *pk,unsigned char *sk) 8 | { 9 | unsigned char az[64]; 10 | ge_p3 A; 11 | 12 | randombytes(sk,32); 13 | crypto_hash_sha512(az,sk,32); 14 | az[0] &= 248; 15 | az[31] &= 63; 16 | az[31] |= 64; 17 | 18 | ge_scalarmult_base(&A,az); 19 | ge_p3_tobytes(pk,&A); 20 | 21 | memmove(sk + 32,pk,32); 22 | return 0; 23 | } 24 | -------------------------------------------------------------------------------- /src/crypto/crypto_ops_builder/ref10CommentedCombined/open.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "crypto_sign.h" 3 | #include "crypto_hash_sha512.h" 4 | #include "crypto_verify_32.h" 5 | #include "ge.h" 6 | #include "sc.h" 7 | 8 | int crypto_sign_open( 9 | unsigned char *m,unsigned long long *mlen, 10 | const unsigned char *sm,unsigned long long smlen, 11 | const unsigned char *pk 12 | ) 13 | { 14 | unsigned char pkcopy[32]; 15 | unsigned char rcopy[32]; 16 | unsigned char scopy[32]; 17 | unsigned char h[64]; 18 | unsigned char rcheck[32]; 19 | ge_p3 A; 20 | ge_p2 R; 21 | 22 | if (smlen < 64) goto badsig; 23 | if (sm[63] & 224) goto badsig; 24 | if (ge_frombytes_negate_vartime(&A,pk) != 0) goto badsig; 25 | 26 | memmove(pkcopy,pk,32); 27 | memmove(rcopy,sm,32); 28 | memmove(scopy,sm + 32,32); 29 | 30 | memmove(m,sm,smlen); 31 | memmove(m + 32,pkcopy,32); 32 | crypto_hash_sha512(h,m,smlen); 33 | sc_reduce(h); 34 | 35 | ge_double_scalarmult_vartime(&R,h,&A,scopy); 36 | ge_tobytes(rcheck,&R); 37 | if (crypto_verify_32(rcheck,rcopy) == 0) { 38 | memmove(m,m + 64,smlen - 64); 39 | memset(m + smlen - 64,0,64); 40 | *mlen = smlen - 64; 41 | return 0; 42 | } 43 | 44 | badsig: 45 | *mlen = -1; 46 | memset(m,0,smlen); 47 | return -1; 48 | } 49 | -------------------------------------------------------------------------------- /src/crypto/crypto_ops_builder/ref10CommentedCombined/pow22523.q: -------------------------------------------------------------------------------- 1 | :name:fe:t0:t1:t2:t3:t4:t5:t6:t7:t8:t9:z:out: 2 | fe r:var/r=fe: 3 | 4 | enter f:enter/f:>z1=fe#11: 5 | return:nofallthrough:h=fe:asm/fe_mul(>h,h=fe:#k:asm/fe_sq(>h,h,>h);: 9 | 10 | : 11 | 12 | fe z1 13 | fe z2 14 | fe z8 15 | fe z9 16 | fe z11 17 | fe z22 18 | fe z_5_0 19 | fe z_10_5 20 | fe z_10_0 21 | fe z_20_10 22 | fe z_20_0 23 | fe z_40_20 24 | fe z_40_0 25 | fe z_50_10 26 | fe z_50_0 27 | fe z_100_50 28 | fe z_100_0 29 | fe z_200_100 30 | fe z_200_0 31 | fe z_250_50 32 | fe z_250_0 33 | fe z_252_2 34 | fe z_252_3 35 | 36 | enter pow22523 37 | 38 | z2 = z1^2^1 39 | z8 = z2^2^2 40 | z9 = z1*z8 41 | z11 = z2*z9 42 | z22 = z11^2^1 43 | z_5_0 = z9*z22 44 | z_10_5 = z_5_0^2^5 45 | z_10_0 = z_10_5*z_5_0 46 | z_20_10 = z_10_0^2^10 47 | z_20_0 = z_20_10*z_10_0 48 | z_40_20 = z_20_0^2^20 49 | z_40_0 = z_40_20*z_20_0 50 | z_50_10 = z_40_0^2^10 51 | z_50_0 = z_50_10*z_10_0 52 | z_100_50 = z_50_0^2^50 53 | z_100_0 = z_100_50*z_50_0 54 | z_200_100 = z_100_0^2^100 55 | z_200_0 = z_200_100*z_100_0 56 | z_250_50 = z_200_0^2^50 57 | z_250_0 = z_250_50*z_50_0 58 | z_252_2 = z_250_0^2^2 59 | z_252_3 = z_252_2*z1 60 | 61 | return 62 | -------------------------------------------------------------------------------- /src/crypto/crypto_ops_builder/ref10CommentedCombined/pow225521.q: -------------------------------------------------------------------------------- 1 | :name:fe:t0:t1:t2:t3:t4:t5:t6:t7:t8:t9:z:out: 2 | fe r:var/r=fe: 3 | 4 | enter f:enter/f:>z1=fe#11: 5 | return:nofallthrough:h=fe:asm/fe_mul(>h,h=fe:#k:asm/fe_sq(>h,h,>h);: 9 | 10 | : 11 | 12 | fe z1 13 | fe z2 14 | fe z8 15 | fe z9 16 | fe z11 17 | fe z22 18 | fe z_5_0 19 | fe z_10_5 20 | fe z_10_0 21 | fe z_20_10 22 | fe z_20_0 23 | fe z_40_20 24 | fe z_40_0 25 | fe z_50_10 26 | fe z_50_0 27 | fe z_100_50 28 | fe z_100_0 29 | fe z_200_100 30 | fe z_200_0 31 | fe z_250_50 32 | fe z_250_0 33 | fe z_255_5 34 | fe z_255_21 35 | 36 | enter pow225521 37 | 38 | z2 = z1^2^1 39 | z8 = z2^2^2 40 | z9 = z1*z8 41 | z11 = z2*z9 42 | z22 = z11^2^1 43 | z_5_0 = z9*z22 44 | z_10_5 = z_5_0^2^5 45 | z_10_0 = z_10_5*z_5_0 46 | z_20_10 = z_10_0^2^10 47 | z_20_0 = z_20_10*z_10_0 48 | z_40_20 = z_20_0^2^20 49 | z_40_0 = z_40_20*z_20_0 50 | z_50_10 = z_40_0^2^10 51 | z_50_0 = z_50_10*z_10_0 52 | z_100_50 = z_50_0^2^50 53 | z_100_0 = z_100_50*z_50_0 54 | z_200_100 = z_100_0^2^100 55 | z_200_0 = z_200_100*z_100_0 56 | z_250_50 = z_200_0^2^50 57 | z_250_0 = z_250_50*z_50_0 58 | z_255_5 = z_250_0^2^5 59 | z_255_21 = z_255_5*z11 60 | 61 | return 62 | -------------------------------------------------------------------------------- /src/crypto/crypto_ops_builder/ref10CommentedCombined/q2h.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | sed 's/^#.*//' \ 3 | | qhasm-generic \ 4 | | sed 's_//\(.*\)$_/*\1 */_' 5 | -------------------------------------------------------------------------------- /src/crypto/crypto_ops_builder/ref10CommentedCombined/sc.h: -------------------------------------------------------------------------------- 1 | #ifndef SC_H 2 | #define SC_H 3 | 4 | /* 5 | The set of scalars is \Z/l 6 | where l = 2^252 + 27742317777372353535851937790883648493. 7 | */ 8 | 9 | #define sc_reduce crypto_sign_ed25519_ref10_sc_reduce 10 | #define sc_muladd crypto_sign_ed25519_ref10_sc_muladd 11 | 12 | extern void sc_reduce(unsigned char *); 13 | extern void sc_muladd(unsigned char *,const unsigned char *,const unsigned char *,const unsigned char *); 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /src/crypto/crypto_ops_builder/ref10CommentedCombined/scrap.txt: -------------------------------------------------------------------------------- 1 | #include "ge.h" 2 | 3 | /* 4 | r = p + q 5 | */ 6 | 7 | void ge_add(ge_p1p1 *r,const ge_p3 *p,const ge_cached *q) 8 | { 9 | fe t0; 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | fe_add(r->X,p->Y,p->X); 32 | 33 | fe_sub(r->Y,p->Y,p->X); 34 | 35 | fe_mul(r->Z,r->X,q->YplusX); 36 | 37 | fe_mul(r->Y,r->Y,q->YminusX); 38 | 39 | fe_mul(r->T,q->T2d,p->T); 40 | 41 | fe_mul(r->X,p->Z,q->Z); 42 | 43 | fe_add(t0,r->X,r->X); 44 | 45 | fe_sub(r->X,r->Z,r->Y); 46 | 47 | fe_add(r->Y,r->Z,r->Y); 48 | 49 | fe_add(r->Z,t0,r->T); 50 | 51 | fe_sub(r->T,t0,r->T); 52 | 53 | } 54 | -------------------------------------------------------------------------------- /src/crypto/crypto_ops_builder/ref10CommentedCombined/sign.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "crypto_sign.h" 3 | #include "crypto_hash_sha512.h" 4 | #include "ge.h" 5 | #include "sc.h" 6 | 7 | int crypto_sign( 8 | unsigned char *sm,unsigned long long *smlen, 9 | const unsigned char *m,unsigned long long mlen, 10 | const unsigned char *sk 11 | ) 12 | { 13 | unsigned char pk[32]; 14 | unsigned char az[64]; 15 | unsigned char nonce[64]; 16 | unsigned char hram[64]; 17 | ge_p3 R; 18 | 19 | memmove(pk,sk + 32,32); 20 | 21 | crypto_hash_sha512(az,sk,32); 22 | az[0] &= 248; 23 | az[31] &= 63; 24 | az[31] |= 64; 25 | 26 | *smlen = mlen + 64; 27 | memmove(sm + 64,m,mlen); 28 | memmove(sm + 32,az + 32,32); 29 | crypto_hash_sha512(nonce,sm + 32,mlen + 32); 30 | memmove(sm + 32,pk,32); 31 | 32 | sc_reduce(nonce); 33 | ge_scalarmult_base(&R,nonce); 34 | ge_p3_tobytes(sm,&R); 35 | 36 | crypto_hash_sha512(hram,sm,mlen + 64); 37 | sc_reduce(hram); 38 | sc_muladd(sm + 32,hram,az,nonce); 39 | 40 | return 0; 41 | } 42 | -------------------------------------------------------------------------------- /src/crypto/crypto_ops_builder/ref10CommentedCombined/sqrtm1.h: -------------------------------------------------------------------------------- 1 | -32595792,-7943725,9377950,3500415,12389472,-272473,-25146209,-2005654,326686,11406482 2 | -------------------------------------------------------------------------------- /src/crypto/crypto_ops_builder/ref10CommentedCombined/sqrtm1.py: -------------------------------------------------------------------------------- 1 | q = 2**255 - 19 2 | 3 | def expmod(b,e,m): 4 | if e == 0: return 1 5 | t = expmod(b,e/2,m)**2 % m 6 | if e & 1: t = (t*b) % m 7 | return t 8 | 9 | def inv(x): 10 | return expmod(x,q-2,q) 11 | 12 | def radix255(x): 13 | x = x % q 14 | if x + x > q: x -= q 15 | x = [x,0,0,0,0,0,0,0,0,0] 16 | bits = [26,25,26,25,26,25,26,25,26,25] 17 | for i in range(9): 18 | carry = (x[i] + 2**(bits[i]-1)) / 2**bits[i] 19 | x[i] -= carry * 2**bits[i] 20 | x[i + 1] += carry 21 | result = "" 22 | for i in range(9): 23 | result = result+str(x[i])+"," 24 | result = result+str(x[9]) 25 | return result 26 | 27 | I = expmod(2,(q-1)/4,q) 28 | print radix255(I) 29 | -------------------------------------------------------------------------------- /src/crypto/crypto_ops_builder/ref10CommentedCombined/test.py: -------------------------------------------------------------------------------- 1 | import os 2 | l = "(((int) (s[0] | s[1] | s[2] | s[3] | s[4] | s[5] | s[6] | s[7] | s[8] | s[9] | s[10] | s[11] | s[12] | s[13] | s[14] | s[15] | s[16] | s[17] | s[18] | s[19] | s[20] | s[21] | s[22] | s[23] | s[24] | s[25] | s[26] | s[27] | s[28] | s[29] | s[30] | s[31]) - 1) >> 8) + 1;" 3 | 4 | os.system("sed -i 's/crypto_verify_32(s, zero)/"+l+"/' crypto-ops.c") 5 | 6 | -------------------------------------------------------------------------------- /src/crypto/crypto_ops_builder/sha512.h: -------------------------------------------------------------------------------- 1 | extern int crypto_hashblocks(unsigned char *statebytes,const unsigned char *in,unsigned long long inlen); 2 | extern int crypto_hash_sha512(unsigned char *out,const unsigned char *in,unsigned long long inlen); 3 | 4 | #define crypto_hash_sha512_BYTES 64 5 | -------------------------------------------------------------------------------- /src/crypto/crypto_ops_builder/verify.c: -------------------------------------------------------------------------------- 1 | #include "crypto_verify_32.h" 2 | 3 | int crypto_verify_32(const unsigned char *x,const unsigned char *y) 4 | { 5 | unsigned int differentbits = 0; 6 | #define F(i) differentbits |= x[i] ^ y[i]; 7 | F(0) 8 | F(1) 9 | F(2) 10 | F(3) 11 | F(4) 12 | F(5) 13 | F(6) 14 | F(7) 15 | F(8) 16 | F(9) 17 | F(10) 18 | F(11) 19 | F(12) 20 | F(13) 21 | F(14) 22 | F(15) 23 | F(16) 24 | F(17) 25 | F(18) 26 | F(19) 27 | F(20) 28 | F(21) 29 | F(22) 30 | F(23) 31 | F(24) 32 | F(25) 33 | F(26) 34 | F(27) 35 | F(28) 36 | F(29) 37 | F(30) 38 | F(31) 39 | return (1 & ((differentbits - 1) >> 8)) - 1; 40 | } 41 | -------------------------------------------------------------------------------- /src/crypto/jh.h: -------------------------------------------------------------------------------- 1 | /*This program gives the 64-bit optimized bitslice implementation of JH using ANSI C 2 | 3 | -------------------------------- 4 | Performance 5 | 6 | Microprocessor: Intel CORE 2 processor (Core 2 Duo Mobile T6600 2.2GHz) 7 | Operating System: 64-bit Ubuntu 10.04 (Linux kernel 2.6.32-22-generic) 8 | Speed for long message: 9 | 1) 45.8 cycles/byte compiler: Intel C++ Compiler 11.1 compilation option: icc -O2 10 | 2) 56.8 cycles/byte compiler: gcc 4.4.3 compilation option: gcc -O3 11 | 12 | -------------------------------- 13 | Last Modified: January 16, 2011 14 | */ 15 | #pragma once 16 | 17 | typedef unsigned char BitSequence; 18 | typedef unsigned long long DataLength; 19 | typedef enum {SUCCESS = 0, FAIL = 1, BAD_HASHLEN = 2} HashReturn; 20 | 21 | HashReturn jh_hash(int hashbitlen, const BitSequence *data, DataLength databitlen, BitSequence *hashval); 22 | -------------------------------------------------------------------------------- /src/crypto/k12/KeccakP-1600-reference.h: -------------------------------------------------------------------------------- 1 | /* 2 | Implementation by the Keccak Team, namely, Guido Bertoni, Joan Daemen, 3 | Michaël Peeters, Gilles Van Assche and Ronny Van Keer, 4 | hereby denoted as "the implementer". 5 | 6 | For more information, feedback or questions, please refer to our website: 7 | https://keccak.team/ 8 | 9 | To the extent possible under law, the implementer has waived all copyright 10 | and related or neighboring rights to the source code in this file. 11 | http://creativecommons.org/publicdomain/zero/1.0/ 12 | */ 13 | 14 | #ifndef _KeccakP_1600_reference_h_ 15 | #define _KeccakP_1600_reference_h_ 16 | 17 | void KeccakP1600_DisplayRoundConstants(FILE *f); 18 | void KeccakP1600_DisplayRhoOffsets(FILE *f); 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /src/crypto/k12/KeccakSponge-common.h: -------------------------------------------------------------------------------- 1 | /* 2 | Implementation by the Keccak Team, namely, Guido Bertoni, Joan Daemen, 3 | Michaël Peeters, Gilles Van Assche and Ronny Van Keer, 4 | hereby denoted as "the implementer". 5 | 6 | For more information, feedback or questions, please refer to our website: 7 | https://keccak.team/ 8 | 9 | To the extent possible under law, the implementer has waived all copyright 10 | and related or neighboring rights to the source code in this file. 11 | http://creativecommons.org/publicdomain/zero/1.0/ 12 | */ 13 | 14 | #ifndef _KeccakSpongeCommon_h_ 15 | #define _KeccakSpongeCommon_h_ 16 | 17 | #include 18 | #include "align.h" 19 | 20 | #define KCP_DeclareSpongeStructure(prefix, size, alignment) \ 21 | ALIGN(alignment) typedef struct prefix##_SpongeInstanceStruct { \ 22 | unsigned char state[size]; \ 23 | unsigned int rate; \ 24 | unsigned int byteIOIndex; \ 25 | int squeezing; \ 26 | } prefix##_SpongeInstance; 27 | 28 | #define KCP_DeclareSpongeFunctions(prefix) \ 29 | int prefix##_Sponge(unsigned int rate, unsigned int capacity, const unsigned char *input, size_t inputByteLen, unsigned char suffix, unsigned char *output, size_t outputByteLen); \ 30 | int prefix##_SpongeInitialize(prefix##_SpongeInstance *spongeInstance, unsigned int rate, unsigned int capacity); \ 31 | int prefix##_SpongeAbsorb(prefix##_SpongeInstance *spongeInstance, const unsigned char *data, size_t dataByteLen); \ 32 | int prefix##_SpongeAbsorbLastFewBits(prefix##_SpongeInstance *spongeInstance, unsigned char delimitedData); \ 33 | int prefix##_SpongeSqueeze(prefix##_SpongeInstance *spongeInstance, unsigned char *data, size_t dataByteLen); 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /src/crypto/k12/KeccakSpongeWidth1600.c: -------------------------------------------------------------------------------- 1 | /* 2 | Implementation by the Keccak Team, namely, Guido Bertoni, Joan Daemen, 3 | Michaël Peeters, Gilles Van Assche and Ronny Van Keer, 4 | hereby denoted as "the implementer". 5 | 6 | For more information, feedback or questions, please refer to our website: 7 | https://keccak.team/ 8 | 9 | To the extent possible under law, the implementer has waived all copyright 10 | and related or neighboring rights to the source code in this file. 11 | http://creativecommons.org/publicdomain/zero/1.0/ 12 | */ 13 | 14 | #include "KeccakSpongeWidth1600.h" 15 | 16 | #ifdef KeccakReference 17 | #include "displayIntermediateValues.h" 18 | #endif 19 | 20 | #ifndef KeccakP1600_excluded 21 | #include "KeccakP-1600-SnP.h" 22 | 23 | #define prefix KeccakWidth1600 24 | #define SnP KeccakP1600 25 | #define SnP_width 1600 26 | #define SnP_Permute KeccakP1600_Permute_24rounds 27 | #if defined(KeccakF1600_FastLoop_supported) 28 | #define SnP_FastLoop_Absorb KeccakF1600_FastLoop_Absorb 29 | #endif 30 | #include "KeccakSponge.inc" 31 | #undef prefix 32 | #undef SnP 33 | #undef SnP_width 34 | #undef SnP_Permute 35 | #undef SnP_FastLoop_Absorb 36 | #endif 37 | 38 | #ifndef KeccakP1600_excluded 39 | #include "KeccakP-1600-SnP.h" 40 | 41 | #define prefix KeccakWidth1600_12rounds 42 | #define SnP KeccakP1600 43 | #define SnP_width 1600 44 | #define SnP_Permute KeccakP1600_Permute_12rounds 45 | #if defined(KeccakP1600_12rounds_FastLoop_supported) 46 | #define SnP_FastLoop_Absorb KeccakP1600_12rounds_FastLoop_Absorb 47 | #endif 48 | #include "KeccakSponge.inc" 49 | #undef prefix 50 | #undef SnP 51 | #undef SnP_width 52 | #undef SnP_Permute 53 | #undef SnP_FastLoop_Absorb 54 | #endif 55 | -------------------------------------------------------------------------------- /src/crypto/k12/KeccakSpongeWidth1600.h: -------------------------------------------------------------------------------- 1 | /* 2 | Implementation by the Keccak Team, namely, Guido Bertoni, Joan Daemen, 3 | Michaël Peeters, Gilles Van Assche and Ronny Van Keer, 4 | hereby denoted as "the implementer". 5 | 6 | For more information, feedback or questions, please refer to our website: 7 | https://keccak.team/ 8 | 9 | To the extent possible under law, the implementer has waived all copyright 10 | and related or neighboring rights to the source code in this file. 11 | http://creativecommons.org/publicdomain/zero/1.0/ 12 | */ 13 | 14 | #ifndef _KeccakSpongeWidth1600_h_ 15 | #define _KeccakSpongeWidth1600_h_ 16 | 17 | #include "KeccakSponge-common.h" 18 | 19 | #ifndef KeccakP1600_excluded 20 | #include "KeccakP-1600-SnP.h" 21 | KCP_DeclareSpongeStructure(KeccakWidth1600, KeccakP1600_stateSizeInBytes, KeccakP1600_stateAlignment) 22 | KCP_DeclareSpongeFunctions(KeccakWidth1600) 23 | #endif 24 | 25 | #ifndef KeccakP1600_excluded 26 | #include "KeccakP-1600-SnP.h" 27 | KCP_DeclareSpongeStructure(KeccakWidth1600_12rounds, KeccakP1600_stateSizeInBytes, KeccakP1600_stateAlignment) 28 | KCP_DeclareSpongeFunctions(KeccakWidth1600_12rounds) 29 | #endif 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /src/crypto/k12/Phases.h: -------------------------------------------------------------------------------- 1 | /* 2 | Implementation by Ronny Van Keer, hereby denoted as "the implementer". 3 | 4 | For more information, feedback or questions, please refer to our website: 5 | https://keccak.team/ 6 | 7 | To the extent possible under law, the implementer has waived all copyright 8 | and related or neighboring rights to the source code in this file. 9 | http://creativecommons.org/publicdomain/zero/1.0/ 10 | */ 11 | 12 | #ifndef _Phases_h_ 13 | #define _Phases_h_ 14 | 15 | typedef enum { 16 | NOT_INITIALIZED, 17 | ABSORBING, 18 | FINAL, 19 | SQUEEZING 20 | } KCP_Phases; 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /src/crypto/k12/align.h: -------------------------------------------------------------------------------- 1 | /* 2 | Implementation by the Keccak Team, namely, Guido Bertoni, Joan Daemen, 3 | Michaël Peeters, Gilles Van Assche and Ronny Van Keer, 4 | hereby denoted as "the implementer". 5 | 6 | For more information, feedback or questions, please refer to our website: 7 | https://keccak.team/ 8 | 9 | To the extent possible under law, the implementer has waived all copyright 10 | and related or neighboring rights to the source code in this file. 11 | http://creativecommons.org/publicdomain/zero/1.0/ 12 | */ 13 | 14 | #ifndef _align_h_ 15 | #define _align_h_ 16 | 17 | /* on Mac OS-X and possibly others, ALIGN(x) is defined in param.h, and -Werror chokes on the redef. */ 18 | #ifdef ALIGN 19 | #undef ALIGN 20 | #endif 21 | 22 | #if defined(__GNUC__) 23 | #define ALIGN(x) __attribute__ ((aligned(x))) 24 | #elif defined(_MSC_VER) 25 | #define ALIGN(x) __declspec(align(x)) 26 | #elif defined(__ARMCC_VERSION) 27 | #define ALIGN(x) __align(x) 28 | #else 29 | #define ALIGN(x) 30 | #endif 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /src/crypto/keccak.h: -------------------------------------------------------------------------------- 1 | // keccak.h 2 | // 19-Nov-11 Markku-Juhani O. Saarinen 3 | 4 | #ifndef KECCAK_H 5 | #define KECCAK_H 6 | 7 | #include 8 | #include 9 | 10 | #ifndef KECCAK_ROUNDS 11 | #define KECCAK_ROUNDS 24 12 | #endif 13 | 14 | #ifndef ROTL64 15 | #define ROTL64(x, y) (((x) << (y)) | ((x) >> (64 - (y)))) 16 | #endif 17 | 18 | // SHA3 Algorithm context. 19 | typedef struct KECCAK_CTX 20 | { 21 | // 1600 bits algorithm hashing state 22 | uint64_t hash[25]; 23 | // 1088-bit buffer for leftovers, block size = 136 B for 256-bit keccak 24 | uint64_t message[17]; 25 | // count of bytes in the message[] buffer 26 | size_t rest; 27 | } KECCAK_CTX; 28 | 29 | // compute a keccak hash (md) of given byte length from "in" 30 | void keccak(const uint8_t *in, size_t inlen, uint8_t *md, int mdlen); 31 | 32 | // update the state 33 | void keccakf(uint64_t st[25], int norounds); 34 | 35 | void keccak1600(const uint8_t *in, size_t inlen, uint8_t *md); 36 | 37 | void keccak_init(KECCAK_CTX * ctx); 38 | void keccak_update(KECCAK_CTX * ctx, const uint8_t *in, size_t inlen); 39 | void keccak_finish(KECCAK_CTX * ctx, uint8_t *md); 40 | #endif 41 | -------------------------------------------------------------------------------- /src/version.cpp.in: -------------------------------------------------------------------------------- 1 | #define DEF_MONERO_VERSION_TAG "@VERSIONTAG@" 2 | #define DEF_MONERO_VERSION "0.14.2.2" 3 | #define DEF_MONERO_RELEASE_NAME "Chronos" 4 | #define DEF_MONERO_VERSION_FULL DEF_MONERO_VERSION "-" DEF_MONERO_VERSION_TAG 5 | #define DEF_MONERO_VERSION_IS_RELEASE @VERSION_IS_RELEASE@ 6 | 7 | #include "version.h" 8 | 9 | const char* const MONERO_VERSION_TAG = DEF_MONERO_VERSION_TAG; 10 | const char* const MONERO_VERSION = DEF_MONERO_VERSION; 11 | const char* const MONERO_RELEASE_NAME = DEF_MONERO_RELEASE_NAME; 12 | const char* const MONERO_VERSION_FULL = DEF_MONERO_VERSION_FULL; 13 | const bool MONERO_VERSION_IS_RELEASE = DEF_MONERO_VERSION_IS_RELEASE; 14 | -------------------------------------------------------------------------------- /src/version.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | extern const char* const MONERO_VERSION_TAG; 4 | extern const char* const MONERO_VERSION; 5 | extern const char* const MONERO_RELEASE_NAME; 6 | extern const char* const MONERO_VERSION_FULL; 7 | extern const bool MONERO_VERSION_IS_RELEASE; 8 | -------------------------------------------------------------------------------- /src/wallet/api/common_defines.h: -------------------------------------------------------------------------------- 1 | #ifndef WALLET_API_COMMON_DEFINES_H__ 2 | #define WALLET_API_COMMON_DEFINES_H__ 3 | 4 | #define tr(x) (x) 5 | 6 | #endif 7 | 8 | -------------------------------------------------------------------------------- /src/wallet/trezor_link_flags.txt: -------------------------------------------------------------------------------- 1 | -lprotobuf -lusb-1.0 -------------------------------------------------------------------------------- /tests/block_weight/compare.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | from __future__ import print_function 4 | import sys 5 | import subprocess 6 | 7 | if len(sys.argv) == 4: 8 | first = [sys.argv[1], sys.argv[2]] 9 | second = [sys.argv[3]] 10 | else: 11 | first = [sys.argv[1]] 12 | second = [sys.argv[2]] 13 | 14 | print('running: ', first) 15 | S0 = subprocess.check_output(first, stderr=subprocess.STDOUT) 16 | print('running: ', second) 17 | S1 = subprocess.check_output(second, stderr=subprocess.STDOUT) 18 | print('comparing') 19 | if S0 != S1: 20 | sys.exit(1) 21 | sys.exit(0) 22 | -------------------------------------------------------------------------------- /tests/data/account-002bee2f8e16f5de4db0d3b8ce9227c8c0b7f9688348b028e022cb43f210968b40a69cdc8531fd4a2e7c9e144eec48bb477733d70ce5f9b85338a07cb10b849ad8fb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aeonix/aeon/c1ebcc640e486cf72d9c2517a0e1b9b1384c51e4/tests/data/account-002bee2f8e16f5de4db0d3b8ce9227c8c0b7f9688348b028e022cb43f210968b40a69cdc8531fd4a2e7c9e144eec48bb477733d70ce5f9b85338a07cb10b849ad8fb -------------------------------------------------------------------------------- /tests/data/account-007af2d7c5ffd8f69005debae820207820805e28c7d7a16714591143f56fb51e2b91ad0c1a535567e6292b321773df5e5aaace00fe767c4f09de452838575357ca9f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aeonix/aeon/c1ebcc640e486cf72d9c2517a0e1b9b1384c51e4/tests/data/account-007af2d7c5ffd8f69005debae820207820805e28c7d7a16714591143f56fb51e2b91ad0c1a535567e6292b321773df5e5aaace00fe767c4f09de452838575357ca9f -------------------------------------------------------------------------------- /tests/data/account-009b82d66dfaaba55a581913fa09d6c5bebe179cd73731781265c96e9e630dcd27fd5d20e7f1d0fa42619de9ca8fe4c0659f6959b2bebb15079cdaed07a442a78486: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aeonix/aeon/c1ebcc640e486cf72d9c2517a0e1b9b1384c51e4/tests/data/account-009b82d66dfaaba55a581913fa09d6c5bebe179cd73731781265c96e9e630dcd27fd5d20e7f1d0fa42619de9ca8fe4c0659f6959b2bebb15079cdaed07a442a78486 -------------------------------------------------------------------------------- /tests/data/account-00aff84db50d6a54dd56051379f6c336fdd330d1cb11e7523bbf71f30b1ae760fa47ace8679b6486f79429980fd2331715a631f5729db284eb1fc6f108aeb7a7f4fe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aeonix/aeon/c1ebcc640e486cf72d9c2517a0e1b9b1384c51e4/tests/data/account-00aff84db50d6a54dd56051379f6c336fdd330d1cb11e7523bbf71f30b1ae760fa47ace8679b6486f79429980fd2331715a631f5729db284eb1fc6f108aeb7a7f4fe -------------------------------------------------------------------------------- /tests/data/fuzz/base58/ENC1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aeonix/aeon/c1ebcc640e486cf72d9c2517a0e1b9b1384c51e4/tests/data/fuzz/base58/ENC1 -------------------------------------------------------------------------------- /tests/data/fuzz/base58/ENC2: -------------------------------------------------------------------------------- 1 | 9zZBkWRgMNPEnVofRFqWK9MKBwgXNyKELBJSttxb1t2UhDM114URntt5iYcXzXusoHZygfSojsbviXZhnP9pJ4p2SDcv81L -------------------------------------------------------------------------------- /tests/data/fuzz/block/BLOCK1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aeonix/aeon/c1ebcc640e486cf72d9c2517a0e1b9b1384c51e4/tests/data/fuzz/block/BLOCK1 -------------------------------------------------------------------------------- /tests/data/fuzz/block/BLOCK2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aeonix/aeon/c1ebcc640e486cf72d9c2517a0e1b9b1384c51e4/tests/data/fuzz/block/BLOCK2 -------------------------------------------------------------------------------- /tests/data/fuzz/bulletproof/BP0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aeonix/aeon/c1ebcc640e486cf72d9c2517a0e1b9b1384c51e4/tests/data/fuzz/bulletproof/BP0 -------------------------------------------------------------------------------- /tests/data/fuzz/cold-outputs/OUTPUTS1: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /tests/data/fuzz/cold-outputs/OUTPUTS2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aeonix/aeon/c1ebcc640e486cf72d9c2517a0e1b9b1384c51e4/tests/data/fuzz/cold-outputs/OUTPUTS2 -------------------------------------------------------------------------------- /tests/data/fuzz/cold-transaction/CTX1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aeonix/aeon/c1ebcc640e486cf72d9c2517a0e1b9b1384c51e4/tests/data/fuzz/cold-transaction/CTX1 -------------------------------------------------------------------------------- /tests/data/fuzz/http-client/RESP1: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 Ok 2 | Server: Epee-based 3 | Content-Length: 5 4 | Content-Type: text/plain 5 | Last-Modified: Mon, 11 Dec 2017 09:03:03 GMT 6 | Accept-Ranges: bytes 7 | 8 | foo 9 | -------------------------------------------------------------------------------- /tests/data/fuzz/levin/LEVIN1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aeonix/aeon/c1ebcc640e486cf72d9c2517a0e1b9b1384c51e4/tests/data/fuzz/levin/LEVIN1 -------------------------------------------------------------------------------- /tests/data/fuzz/load-from-binary/BINARY1: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /tests/data/fuzz/load-from-json/JSON1: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /tests/data/fuzz/parse-url/URL1: -------------------------------------------------------------------------------- 1 | 127.0.0.1 -------------------------------------------------------------------------------- /tests/data/fuzz/parse-url/URL2: -------------------------------------------------------------------------------- 1 | iframe_test.html?api_url=https://api.vk.com/api.php&api_id=3289090&api_settings=1&viewer_id=562964060&viewer_type=0&sid=0aad8d1c5713130f9ca0076f2b7b47e532877424961367d81e7fa92455f069be7e21bc3193cbd0be11895&secret=368ebbc0ef&access_token=668bc03f43981d883f73876ffff4aa8564254b359cc745dfa1b3cde7bdab2e94105d8f6d8250717569c0a7&user_id=0&group_id=0&is_app_user=1&auth_key=d2f7a895ca5ff3fdb2a2a8ae23fe679a&language=0&parent_language=0&ad_info=ElsdCQBaQlxiAQRdFUVUXiN2AVBzBx5pU1BXIgZUJlIEAWcgAUoLQg==&referrer=unknown&lc_name=9834b6a3&hash= -------------------------------------------------------------------------------- /tests/data/fuzz/signature/SIG1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aeonix/aeon/c1ebcc640e486cf72d9c2517a0e1b9b1384c51e4/tests/data/fuzz/signature/SIG1 -------------------------------------------------------------------------------- /tests/data/fuzz/signature/SIG2: -------------------------------------------------------------------------------- 1 | SigV1WbMcLkLKXz3Su9iFUp9aYF5vSfpVetcytVWAgqhn3KNe1kidn7M2KfTRpuK8G1ba1w2u5mbyoWbkLPy2Gm97BM4W -------------------------------------------------------------------------------- /tests/data/fuzz/transaction/TX1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aeonix/aeon/c1ebcc640e486cf72d9c2517a0e1b9b1384c51e4/tests/data/fuzz/transaction/TX1 -------------------------------------------------------------------------------- /tests/data/fuzz/transaction/TX2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aeonix/aeon/c1ebcc640e486cf72d9c2517a0e1b9b1384c51e4/tests/data/fuzz/transaction/TX2 -------------------------------------------------------------------------------- /tests/data/outputs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aeonix/aeon/c1ebcc640e486cf72d9c2517a0e1b9b1384c51e4/tests/data/outputs -------------------------------------------------------------------------------- /tests/data/signed_monero_tx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aeonix/aeon/c1ebcc640e486cf72d9c2517a0e1b9b1384c51e4/tests/data/signed_monero_tx -------------------------------------------------------------------------------- /tests/data/unsigned_monero_tx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aeonix/aeon/c1ebcc640e486cf72d9c2517a0e1b9b1384c51e4/tests/data/unsigned_monero_tx -------------------------------------------------------------------------------- /tests/data/wallet_WmsMW3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aeonix/aeon/c1ebcc640e486cf72d9c2517a0e1b9b1384c51e4/tests/data/wallet_WmsMW3 -------------------------------------------------------------------------------- /tests/data/wallet_WmsMW3.keys: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aeonix/aeon/c1ebcc640e486cf72d9c2517a0e1b9b1384c51e4/tests/data/wallet_WmsMW3.keys -------------------------------------------------------------------------------- /tests/difficulty/wide_difficulty.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | from __future__ import print_function 4 | import sys 5 | import subprocess 6 | 7 | python = sys.argv[1] 8 | py = sys.argv[2] 9 | c = sys.argv[3] 10 | data = sys.argv[4] 11 | 12 | first = python + " " + py + " > " + data 13 | second = [c, '--wide', '--filename', data] 14 | 15 | try: 16 | print('running: ', first) 17 | subprocess.check_call(first, shell=True) 18 | print('running: ', second) 19 | subprocess.check_call(second) 20 | except: 21 | sys.exit(1) 22 | 23 | -------------------------------------------------------------------------------- /tests/functional_tests/test_framework/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aeonix/aeon/c1ebcc640e486cf72d9c2517a0e1b9b1384c51e4/tests/functional_tests/test_framework/__init__.py -------------------------------------------------------------------------------- /tests/gtest/CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | # This file contains a list of people who've made non-trivial 2 | # contribution to the Google C++ Testing Framework project. People 3 | # who commit code to the project are encouraged to add their names 4 | # here. Please keep the list sorted by first names. 5 | 6 | Ajay Joshi 7 | Balázs Dán 8 | Bharat Mediratta 9 | Chandler Carruth 10 | Chris Prince 11 | Chris Taylor 12 | Dan Egnor 13 | Eric Roman 14 | Hady Zalek 15 | Jeffrey Yasskin 16 | Jói Sigurðsson 17 | Keir Mierle 18 | Keith Ray 19 | Kenton Varda 20 | Manuel Klimek 21 | Markus Heule 22 | Mika Raento 23 | Miklós Fazekas 24 | Pasi Valminen 25 | Patrick Hanna 26 | Patrick Riley 27 | Peter Kaminski 28 | Preston Jackson 29 | Rainer Klaffenboeck 30 | Russ Cox 31 | Russ Rufer 32 | Sean Mcafee 33 | Sigurður Ásgeirsson 34 | Tracy Bialik 35 | Vadim Berman 36 | Vlad Losev 37 | Zhanyong Wan 38 | -------------------------------------------------------------------------------- /tests/gtest/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2008, Google Inc. 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are 6 | met: 7 | 8 | * Redistributions of source code must retain the above copyright 9 | notice, this list of conditions and the following disclaimer. 10 | * Redistributions in binary form must reproduce the above 11 | copyright notice, this list of conditions and the following disclaimer 12 | in the documentation and/or other materials provided with the 13 | distribution. 14 | * Neither the name of Google Inc. nor the names of its 15 | contributors may be used to endorse or promote products derived from 16 | this software without specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | -------------------------------------------------------------------------------- /tests/hash/tests-slow-1m-1.txt: -------------------------------------------------------------------------------- 1 | 5655313715525895d2312bfba9b7f5e45f441b8b8d3957eaea0b6039d1bc0713 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000 2 | 173c9db34c9643ba689e16044f5c273c4c5543b210a4d5248352ac536064a850 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 3 | bb196c4c0c9dc1c4e44c2a6f9e61200fe3c8b4ef232134e65c3c7862c7d3df6a 8519e039172b0d70e5ca7b3383d6b3167315a422747b73f019cf9528f0fde341fd0f2a63030ba6450525cf6de31837669af6f1df8131faf50aaab8d3a7405589 4 | 452103731dd8d70ce32f726b8e71fcd91005fb3cb2abd78f2b7357bb07f8c8bc 37a636d7dafdf259b7287eddca2f58099e98619d2f99bdb8969d7b14498102cc065201c8be90bd777323f449848b215d2977c92c4c1c2da36ab46b2e389689ed97c18fec08cd3b03235c5e4c62a37ad88c7b67932495a71090e85dd4020a9300 5 | 4e785376ed2733262d83cc25321a9d0003f5395315de919acf1b97f0a84fbd2d 38274c97c45a172cfc97679870422e3a1ab0784960c60514d816271415c306ee3a3ed1a77e31f6a885c3cb 6 | -------------------------------------------------------------------------------- /tests/hash/tests-slow-1m.txt: -------------------------------------------------------------------------------- 1 | 1b73647a792df8724ce28fddc1e4b6f348dc39e6aa47c434fe400cec98ec2b91 6465206f6d6e69627573206475626974616e64756d 2 | 058293a2279aa3e3816c9e06bef3c0b3e4de8850f251a195ca4c2e35a1eebf58 6162756e64616e732063617574656c61206e6f6e206e6f636574 3 | afffe6c3084b0de799f6851389619bfe36be4705e4fb9e5039f8044b0decf8ea 63617665617420656d70746f72 4 | e1af332e932c1eda3bd13c44ea9daba9b38e4b517b2ecd21b704b090d165430a 6578206e6968696c6f206e6968696c20666974 5 | -------------------------------------------------------------------------------- /tests/hash/tests-slow-2m-1.txt: -------------------------------------------------------------------------------- 1 | b5a7f63abb94d07d1a6445c36c07c7e8327fe61b1647e391b4c7edae5de57a3d 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000 2 | 80563c40ed46575a9e44820d93ee095e2851aa22483fd67837118c6cd951ba61 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 3 | 5bb40c5880cef2f739bdb6aaaf16161eaae55530e7b10d7ea996b751a299e949 8519e039172b0d70e5ca7b3383d6b3167315a422747b73f019cf9528f0fde341fd0f2a63030ba6450525cf6de31837669af6f1df8131faf50aaab8d3a7405589 4 | 613e638505ba1fd05f428d5c9f8e08f8165614342dac419adc6a47dce257eb3e 37a636d7dafdf259b7287eddca2f58099e98619d2f99bdb8969d7b14498102cc065201c8be90bd777323f449848b215d2977c92c4c1c2da36ab46b2e389689ed97c18fec08cd3b03235c5e4c62a37ad88c7b67932495a71090e85dd4020a9300 5 | ed082e49dbd5bbe34a3726a0d1dad981146062b39d36d62c71eb1ed8ab49459b 38274c97c45a172cfc97679870422e3a1ab0784960c60514d816271415c306ee3a3ed1a77e31f6a885c3cb 6 | -------------------------------------------------------------------------------- /tests/hash/tests-slow-2m.txt: -------------------------------------------------------------------------------- 1 | 2f8e3df40bd11f9ac90c743ca8e32bb391da4fb98612aa3b6cdc639ee00b31f5 6465206f6d6e69627573206475626974616e64756d 2 | 722fa8ccd594d40e4a41f3822734304c8d5eff7e1b528408e2229da38ba553c4 6162756e64616e732063617574656c61206e6f6e206e6f636574 3 | bbec2cacf69866a8e740380fe7b818fc78f8571221742d729d9d02d7f8989b87 63617665617420656d70746f72 4 | b1257de4efc5ce28c6b40ceb1c6c8f812a64634eb3e81c5220bee9b2b76a6f05 6578206e6968696c6f206e6968696c20666974 5 | -------------------------------------------------------------------------------- /tests/libwallet_api_tests/scripts/README.md: -------------------------------------------------------------------------------- 1 | # Running libwallet_api tests 2 | 3 | ## Environment for the tests 4 | * Running monero node, linked to private/public testnet. 5 | By default, tests expect daemon running at ```localhost:38081```, 6 | can be overridden with environment variable ```TESTNET_DAEMON_ADDRESS=``` 7 | [Manual](https://github.com/moneroexamples/private-testnet) explaining how to run private testnet. 8 | 9 | * Directory with pre-generated wallets 10 | (wallet_01.bin, wallet_02.bin,...,wallet_06.bin, some of these wallets might not be used in the tests currently). 11 | By default, tests expect these wallets to be in ```/var/monero/testnet_pvt```. 12 | Directory can be overriden with environment variable ```WALLETS_ROOT_DIR=```. 13 | Directory and files should be writable for the user running tests. 14 | 15 | 16 | ## Generating test wallets 17 | * ```create_wallets.sh``` - this script will create wallets (wallet_01.bin, wallet_02.bin,...,wallet_06.bin) in current directory. 18 | when running first time, please uncomment line ```#create_wallet wallet_m``` to create miner wallet as well. 19 | This wallet should be used for mining and all test wallets supposed to be seed from this miner wallet 20 | 21 | * ```mining_start.sh``` and ```mining_stop.sh``` - helper scripts to start and stop mining on miner wallet 22 | 23 | * ```send_funds.sh``` - script for seeding test wallets. Please run this script when you have enough money on miner wallet 24 | 25 | -------------------------------------------------------------------------------- /tests/libwallet_api_tests/scripts/create_wallets.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function create_wallet { 4 | wallet_name=$1 5 | echo 0 | monero-wallet-cli --testnet --trusted-daemon --daemon-address localhost:38081 --generate-new-wallet $wallet_name --password "" --restore-height=1 6 | } 7 | 8 | 9 | create_wallet wallet_01.bin 10 | create_wallet wallet_02.bin 11 | create_wallet wallet_03.bin 12 | create_wallet wallet_04.bin 13 | create_wallet wallet_05.bin 14 | create_wallet wallet_06.bin 15 | 16 | # create_wallet wallet_m 17 | 18 | 19 | -------------------------------------------------------------------------------- /tests/libwallet_api_tests/scripts/mining_start.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | rlwrap monero-wallet-cli --wallet-file wallet_m --password "" --testnet --trusted-daemon --daemon-address localhost:38081 --log-file wallet_m.log start_mining 4 | 5 | -------------------------------------------------------------------------------- /tests/libwallet_api_tests/scripts/mining_stop.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | rlwrap monero-wallet-cli --wallet-file wallet_m --password "" --testnet --trusted-daemon --daemon-address localhost:38081 --log-file wallet_miner.log stop_mining 4 | 5 | -------------------------------------------------------------------------------- /tests/libwallet_api_tests/scripts/open_wallet_1.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | rlwrap monero-wallet-cli --wallet-file wallet_01.bin --password "" --testnet --trusted-daemon --daemon-address localhost:38081 --log-file wallet_01.log 5 | 6 | -------------------------------------------------------------------------------- /tests/libwallet_api_tests/scripts/open_wallet_2.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | rlwrap monero-wallet-cli --wallet-file wallet_02.bin --password "" --testnet --trusted-daemon --daemon-address localhost:38081 --log-file wallet_01.log 5 | 6 | -------------------------------------------------------------------------------- /tests/libwallet_api_tests/scripts/open_wallet_3.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | rlwrap monero-wallet-cli --wallet-file wallet_03.bin --password "" --testnet --trusted-daemon --daemon-address localhost:38081 --log-file wallet_03.log 4 | 5 | -------------------------------------------------------------------------------- /tests/libwallet_api_tests/scripts/open_wallet_4.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | rlwrap monero-wallet-cli --wallet-file wallet_04.bin --password "" --testnet --trusted-daemon --daemon-address localhost:38081 --log-file wallet_04.log 4 | 5 | -------------------------------------------------------------------------------- /tests/libwallet_api_tests/scripts/open_wallet_5.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | rlwrap monero-wallet-cli --wallet-file wallet_05.bin --password "" --testnet --trusted-daemon --daemon-address localhost:38081 --log-file wallet_05.log 4 | 5 | -------------------------------------------------------------------------------- /tests/libwallet_api_tests/scripts/open_wallet_miner.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | rlwrap monero-wallet-cli --wallet-file wallet_m --password "" --testnet --trusted-daemon --daemon-address 127.0.0.1:38081 --log-file wallet_m.log 4 | 5 | -------------------------------------------------------------------------------- /tests/libwallet_api_tests/scripts/send_funds.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function send_funds { 4 | local amount=$1 5 | local dest=$(cat "$2.address.txt") 6 | 7 | monero-wallet-cli --wallet-file wallet_m --password "" \ 8 | --testnet --trusted-daemon --daemon-address localhost:38081 --log-file wallet_m.log \ 9 | --command transfer $dest $amount 10 | } 11 | 12 | 13 | function seed_wallets { 14 | local amount=$1 15 | send_funds $amount wallet_01.bin 16 | send_funds $amount wallet_02.bin 17 | send_funds $amount wallet_03.bin 18 | send_funds $amount wallet_04.bin 19 | send_funds $amount wallet_05.bin 20 | send_funds $amount wallet_06.bin 21 | } 22 | 23 | seed_wallets 1 24 | seed_wallets 2 25 | seed_wallets 5 26 | seed_wallets 10 27 | seed_wallets 20 28 | seed_wallets 50 29 | seed_wallets 100 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /tests/unit_tests/is_hdd.cpp: -------------------------------------------------------------------------------- 1 | #include "common/util.h" 2 | #include 3 | #include 4 | 5 | #if defined(__GLIBC__) 6 | TEST(is_hdd, linux_os_root) 7 | { 8 | std::string path = "/"; 9 | EXPECT_TRUE(tools::is_hdd(path.c_str()) != boost::none); 10 | } 11 | #else 12 | TEST(is_hdd, unknown_os) 13 | { 14 | std::string path = ""; 15 | EXPECT_FALSE(tools::is_hdd(path.c_str()) != boost::none); 16 | } 17 | #endif 18 | -------------------------------------------------------------------------------- /utils/conf/aeond.conf: -------------------------------------------------------------------------------- 1 | # Configuration for aeond 2 | # Syntax: any command line option may be specified as 'clioptionname=value'. 3 | # Boolean options such as 'no-igd' are specified as 'no-igd=1'. 4 | # See 'aeond --help' for all available options. 5 | 6 | data-dir=/var/lib/aeon 7 | log-file=/var/log/aeon/aeon.log 8 | log-level=0 9 | -------------------------------------------------------------------------------- /utils/doxygen-publish.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | 3 | # maintainer (ask me any questions): rfree 4 | 5 | if [[ ! -r "Doxyfile" ]] ; then 6 | echo "Error, can not read the Doxyfile - make sure to run this script from top of monero project, where the Doxyfile file is located" 7 | exit 1 8 | fi 9 | 10 | wwwdir="$HOME/monero-www/" 11 | if [[ ! -w "$wwwdir" ]] ; then 12 | echo "Error, can not write into wwwdir=$wwwdir. It should be a directory readable/connected to your webserver, or a symlink to such directory" 13 | exit 1 14 | fi 15 | 16 | if [[ ! -d "$wwwdir/doc" ]] ; then 17 | echo "Creating subdirs" 18 | mkdir "$wwwdir/doc" 19 | fi 20 | 21 | echo "Generating:" 22 | doxygen Doxyfile && echo "Backup previous version:" && rm -rf ~/monero-www-previous && mv "$wwwdir/doc" ~/monero-www-previous && cp -ar doc/ "$wwwdir/" && echo "Done, builded and copied to public - the doxygen docs" && echo "size:" && du -Dsh "$wwwdir/" && echo "files:" && find "$wwwdir/" | wc -l 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /utils/gpg_keys/guzzi.asc: -------------------------------------------------------------------------------- 1 | -----BEGIN PGP PUBLIC KEY BLOCK----- 2 | Version: GnuPG v1 3 | 4 | mQENBFed+r8BCADScb2cSXAk7v0+tbEUDOf6VuhKc26C2Kfwk/Ei2iWC7Vaa/bru 5 | aNLpM1nVuWKdNnfX3MZo38yItvxS4HlkI29pXcrzyqd3sfPklPgLliaayKkqh1Xx 6 | jl6T5NM9VVJ5dMo0pMzns49xFknOsBXdSH/ziZVD0SuSNctNb5XraCrfuDPw0fn0 7 | lLZ4a6WwUXL9+4Y+xbvNmYHjlnAB7xjvOpprSuJ769zDGpQlV2UXeRqjjMPzVbH4 8 | PYgmNAItbhvog2UfKeQK8K0Fwj1uNsZ5fnqvoa9lsgsbyV4x4DbQu/W5NVP1ylDC 9 | MnHKABa8Rg8zzjp0G7YuBGPy/JPffwZBoEuhABEBAAG0I2d1enppam9uZXMgPGd1 10 | enppam9uZXMxMkBnbWFpbC5jb20+iQE5BBMBCAAjBQJXnfq/AhsDBwsJCAcDAgEG 11 | FQgCCQoLBBYCAwECHgECF4AACgkQXNw+OlijFbIhbggAt6pEz8g++3vHXFaEsOiK 12 | fSJYheSuY2NGOgmS2WBWdPp6z7nobSScYzCeF4pOnCFxM99O7i9/kfDzVp4W7lXL 13 | VIvLiLvKwWLkVhHhgOlerLRYNR+TjS+GtGhhL6Y2Yj1AkG2pJd59SBhbhdkqdNo0 14 | D614GjnyK8SGlz9xjV9ZE4csTPH2p9xOqJoRCoUuEGWHNoox0vJTuJuKhCHta1y8 15 | T84uFcGCagxHxqv5eqgype32iueSMfsbyyFJ2WaLaCyYKcPGbXG9iFFLqtvJU9xv 16 | 46oPYd1HYjtXVaRnbtiDljlokEiXiQ7WPsYEgZy76KMJ30fEyXICPYvTDR1aFLYI 17 | 1LkBDQRXnfq/AQgA2JHleHFNtQM1ECeEGAYoGzt+IyPKzuT43ZgwuxK4t0kfKNN4 18 | KvihBcmFqjJAwwmS+9oNPeU4BgZ4k8DX2JP3JoGzFF7MK+i8OFW0ckZ4kbNZhtq3 19 | e8a1fkWnkA6pQA1JppiZqqI+VNLTTPvsH8pG2UA4rL4XvxeJ7jrFnQMCfiOiuIsd 20 | C+MeUAHthNeLreq1LXx0s0GfPMwMM5ckKdtEKmMVCw1zZ/J2RyBzkyWdyMVPSRRV 21 | lCDtgSivCSG+Y+ub4tgV8ast2/wKxCV92oRaeMQVsWZ9PHdVq0tUn4I98UtCwOh7 22 | reMPi6a8eWJcQ/s07schqXt2iTssv/1V3PTjZQARAQABiQEfBBgBCAAJBQJXnfq/ 23 | AhsMAAoJEFzcPjpYoxWydDsH/2sLAtzKVgbeZFF/0e+6r/P0R3Fgkv6N9o+w4A5N 24 | pMDXCNjFjWVkYRgyON8Y8ijkkbIkBcXmp+01HxZjrQI0WavQaLj2tavz9Np/8wPb 25 | UXZYc0zjxki9mdFdNDW1vgoT9nSctB4bp0xf/NnYmkPMQfDzruVkf8bW6YQzkZRP 26 | apjY9IxUPKFx9hQcDAsov1xXww2uQPwEGHfeSMkeCU9zfPBNmaFCvBfFTFu5UHsl 27 | g2hw95UUsDlpYcMs7YdqYw40EXcTQJk1aoWT7kjO1KCQWF5EDc0YRhw/REXN9fJe 28 | S77oEy23Q/RtJQBXzHw3chyhe4/XMQQbmuY9+OfmhHVAbF4= 29 | =lOXz 30 | -----END PGP PUBLIC KEY BLOCK----- 31 | -------------------------------------------------------------------------------- /utils/gpg_keys/jaquee.asc: -------------------------------------------------------------------------------- 1 | -----BEGIN PGP PUBLIC KEY BLOCK----- 2 | Version: GnuPG v2 3 | 4 | mQENBFg14koBCACxrLtcmKK1X9haFa90Vr04PfHK9hXDeUrwUS8xIhCojj2WccdR 5 | 6hJLUCR27G03gb36xadQhQVCYk2tAwOKLjZVlsUtJ5rLASjPv9mcmgZnL5nU66Qi 6 | 9lHFKBD/Mrf7X6Bg89nWT2dUshIUuvkmbAAh9o9i8CoA/P62/9TG4uWc+vbNGEzV 7 | jb6UtPQc6DHgZ8HeagC9WLE4bTx8tIxNmimwyLc5fow0G0LE0eb3V8jPMUZkdG1h 8 | byHOLeqbSkFJd8GVYz96o/XNzFPPv/60bihn5wDMZqL9J64odoCqzligP1OprhhF 9 | wEsbt0QQ60R9AlCjCgz7pgH8QIJSeX1a121HABEBAAG0IEphcXVlZSA8amFxdWVl 10 | Lm1vbmVyb0BnbWFpbC5jb20+iQE5BBMBCAAjBQJYNeJKAhsDBwsJCAcDAgEGFQgC 11 | CQoLBBYCAwECHgECF4AACgkQOE5SsJ9F3DmyqggArNrQzE4jopaDzxNy+VKTKf7z 12 | chMk9zzY6TSKQ9YfQe0zHKcL7GyfQ/plVmoPMZQglVvC54Vw0aLA8PGt1a/ZU0mD 13 | KWLTGbdIHasGatkY7J3B/vjDsPxfWMKai4Bpesk+gI4/nb2V8/CVsSuVlX5PrQD4 14 | buXhv7S7Mn6ezzzRZD/oYN5WaokgAxu8rnTlJN8yQP3uat71ply+JN3u3TwFxMeX 15 | WcrDTwq/XqJD7OUWrBm378v7M1Dd8kWQTwyWMPCDZhaYgiSlSwKfbDsq4e7d55jv 16 | 2ucKL1AOGnpn6hJ7ip0sn9rLr53qD7eqHl7yzsrrRZkYH6AYiXvk45Srx76DSbkB 17 | DQRYNeJKAQgAvMTf6cGiBTJzj9DfATqQlLEPWJHbqfoFTIbRlHmYdCBbLH2M/GCr 18 | HK4YdhF+9i+Wnq5E9fxnxJzhm22dfSWgw9GuyX8LxBanVhhQiE+9eH/H0ULHjokN 19 | PVQOg90XdAQWahvl5YCOmqt7H7z6+HxHIhCHzo688+lPC4zol0PYNEWcHYBrVsax 20 | cEQ2LObD9J7bBY1BqLXppzHATTwxuO/bp9Bd9LmCaFBinLyF34oDYttEVOq2RNko 21 | vNeWbHWpmdzoagHxLGMU1ae+yCMuGHSdfLnLWTUdVLepVLmzblXxgTd7SS4Bm3Y0 22 | 1jBgBni8msSTR1ICvyMcQuRZnK/yAgM+TQARAQABiQEfBBgBCAAJBQJYNeJKAhsM 23 | AAoJEDhOUrCfRdw5hmsH/0Moh1Z4kPXbvfincDarDDDe5wUImey/7WwOrSsiPwTI 24 | 8AkRts496o3XHcsSWLXZ5Ab+cGKnys5TRfX+RqMrG4p+TXMt2vWDnF5gjeRcwpcz 25 | UI/TCFkCg+x3QAEvlNFNLK4APd2fwR/KQJjmn4a4/0boqrrn09vLSx7/+bdsfYbZ 26 | eKSuF58aYVROY9FUNhFsvgjGI/sYNQFj0DoexLe28f4/cFFVpZvb/kJYqm4QauyK 27 | 5SMyvTTu8PD+pZpLM9MFoQ+Jk+EmDzSUlarwnt75O6kMLNLPFJ8hCOiN2RNK2PKk 28 | iTpY5CQtKsGQDRA7sT6ZaiWO7kkQGO0HSBfmWnZq2G0= 29 | =Ky09 30 | -----END PGP PUBLIC KEY BLOCK----- 31 | -------------------------------------------------------------------------------- /utils/gpg_keys/luigi1111.asc: -------------------------------------------------------------------------------- 1 | -----BEGIN PGP PUBLIC KEY BLOCK----- 2 | Version: GnuPG v1 3 | 4 | mQENBFdodc4BCAC02POyrMUol+nTXeZ2nCKM9G1Q2oU5jQLaQLNLUU88PHLdOVGd 5 | nKh0QA4Uc4CA2wWU5zdIVFEzowUUNyKeSLJZhvOXbpN+pm6n9XiyNSZSDJhvMtAs 6 | FEcyWyAjPAQT7MFS2SJgG7HhcoMAgr3ypp8FpAK2YwbfjfPqs5VFVdrYrVPfiSVJ 7 | NTSoJMW+2oOUdTR/L6z8lzUZu0CH8aJK1Qqr0yyxbJelayPsos3aRQ9TQAu6u/zQ 8 | PxURHaLTe8RsB6oa6wXnpZtXcl1xaigvlkNVpeHPbroBvhJoCbAFHC/edaBNBLiP 9 | I3WCRGiCvvP2kIfuZlyv48gFX+E3NWSB10Q1ABEBAAG0IGx1aWdpMTExMSA8bHVp 10 | Z2kxMTExd0BnbWFpbC5jb20+iQE4BBMBAgAiBQJXaHXOAhsDBgsJCAcDAgYVCAIJ 11 | CgsEFgIDAQIeAQIXgAAKCRD0rKAYNkHgEAyoB/9agBv/xdNUgTVheW/O6kWG4DYG 12 | /1mMfuTF1xi8CSFbUID3dRhnjXtncuSCaY7030CSLtnC/Pl8MnKHmcBZcoCiARzI 13 | bNFK4dEdJjDU8yiqD+M0IAe58xCYQ7I/RX5TXJJ+WTS3lwi1zBqf9D4XVTQxSm+u 14 | 3tVH5mUu35pRWVCg1OSwWo1IGkSDkeGq8ySdYUJdM535caKf8L1ICNir1H7pWNCa 15 | Jya/b3PRtSefw4tNHcsFtndl4S52iMdXwNUdwRKTP/hDa9KYxQqTGDtJ6nKjTy6p 16 | dgZxAiF2mL9dVYg6c+GHlrtZMUZd5NQZcIwu9jXzAiQKZMmtL6/RauzXRuz9uQEN 17 | BFdodc4BCADACy78WJBKCR4MrUcy4L0G4P5n+cqao2Lf+oc53xJudhcgufowsvzs 18 | nixKG9HC+6SoZCZwKYfglu0JxjvqpZC5U9nCwIWuf52Qu4pDO4xYTeuhVr+Lcjvg 19 | tqtJf5M9QaVJwAz8jTKaEAWUSXuKnljVC76zU8LTprYrTEdOyHO9E6Z94MrBUwS3 20 | 6IVNlJ+q5wZyoj9noWbm7X0SIRER9/shr/UlfkSx0Kpnyj3ludkdg7TQR7jp9rGy 21 | GqRmOKH3eGv2aFO1fo+RDacn+R9Fh1vHIdUX6FZil+yft9lXg5jtxcNXvhIJtsoC 22 | NuVIWEYaQuzSFqtblTrM6IwJ8HrimEBPABEBAAGJAR8EGAECAAkFAldodc4CGwwA 23 | CgkQ9KygGDZB4BBnEAf+OSvWLNJs0VtKRIO5oHP7Ia6oS8v0IyXFLx2/p/JW7jMR 24 | 3LVor2wvao52omW+JzoIj4J8cnaEEt2ptHpmzZApSQydZhHO+108hPDYbeWPrXa8 25 | aSXCtI++s2occAemsMvgrnzI7yuMFaAwOWOYL5bmR5pJnnuQQUj1vfXkqBEYYFyF 26 | u7dvJ3hLHLbxBFvIbDBMfzev+g6wOGkhT2/7osUACoLwTwzkbXZNSoQHiZ72YA/P 27 | 9f3SA5Zc5hGopft96sAAnzk6sm/xCfFO1uj6Yk/H/fd/ZjVzQW+XBUvwM/jIqpuX 28 | Ftwy4Ulp0YZT5BpXkHDhosL6o4GelJULMbxreh7nNQ== 29 | =j0V6 30 | -----END PGP PUBLIC KEY BLOCK----- 31 | -------------------------------------------------------------------------------- /utils/gpg_keys/tewinget.asc: -------------------------------------------------------------------------------- 1 | -----BEGIN PGP PUBLIC KEY BLOCK----- 2 | Version: GnuPG v1 3 | 4 | mQENBFQZzOoBCACidWQPdZTfNsJqQs7mTJQSH6IHlaZuDuFFXvnnD5c+FEdHInib 5 | a3BgISAsZ9k54F+duJbel8GLJSu+/DfdFVkdLoIRIpiVTicvrQkh/a4cm+5Zmg/Z 6 | R4Syo4VQFJK52CVu0nGFWISYVSoXalEbSna9AjoLPJ/ZSCyhTw1+LvjH6te5hoQP 7 | VGuDj7ZxbQX5I1qT4QtuGxKRqSGf/ISSyWmbVjzarPv3Mzqqvza26cxksnvxVmib 8 | o6ITmbp51ZncLyw/QRwQIdl28C4He6/CQgWZccuOVbO2T9aCT5toSkoyG8wYbBTH 9 | AnV/IxogjFkLZIaq4HXjEvhJsMfSsNDftwl7ABEBAAG0O1Rob21hcyBXaW5nZXQg 10 | KFNpZ25pbmcga2V5IGZvciBNb25lcm8pIDx0ZXdpbmdldEBnbWFpbC5jb20+iQE4 11 | BBMBAgAiBQJUGczqAhsDBgsJCAcDAgYVCAIJCgsEFgIDAQIeAQIXgAAKCRBYExoW 12 | B4nmMOTaB/952ZSgf0FdOeUNma2gI9Ipz5tFk73fvvVQ5YXZASIroAVWDJ7e6jTk 13 | ESrrubrQnuiVSj5GHjPfqyWEcA0EJ2OKtKi3f1sM0j+aBsR1yfyC9tuWJvIC1E60 14 | 4BTXXlK1q3tMXhnxBvrqOnNiuLouxWdx6q+R17xu3kguPkXrsrl8ZDEjUl9JaoXi 15 | OKlmCmujB2IVCf5If44ZoRANoF6MdvlBq5TZv1p2etzz+sJ8cWrcalRlUdA8DcdJ 16 | ENfsqndAsm8ID8fYokiCr49jE1QSypWElE65JDsVgX6Yjzz98BYy/9s15YbE5McG 17 | Wvg1RzElvwv588XbqxJhEhDZTQW8Dx0z 18 | =3FSH 19 | -----END PGP PUBLIC KEY BLOCK----- 20 | -------------------------------------------------------------------------------- /utils/gpg_keys/tomerkon.asc: -------------------------------------------------------------------------------- 1 | -----BEGIN PGP PUBLIC KEY BLOCK----- 2 | Version: GnuPG v1 3 | 4 | mQENBFQi1rkBCAC/hoa6yhCpPG3tZINuGBbY/dJWIlKECJ/3dgDN/LMumHqEH91X 5 | goS6Ulw0R+fwDWna/bYMWHNbw9mBujHfaZDBCmMzfbcMgAt1jC/+rnd39rNPcvh+ 6 | 4gpRx6Wt20hxqtkNAnND+5ce9t4RA9wXjZA2/M5R9EYXX/Xna0Z6tWkB51aKkxm4 7 | N5Wz6PmUjScmhCd1IP7P/yDv6Aen6M8Lu8ogCfui1C3a6Cel8MevfkC9fGCkMvoq 8 | 3v5NhEVop8Q8Am4Ts+DOcDNXSp8GPUlhyBy1cK7NelxLADM+TFtkPapEJZedW1KR 9 | +V/nn3L1pKoT2XJAWWi0VXwpLIwrYQJuqrK1ABEBAAG0IXRvbWVyIGtvbmZvcnR5 10 | IDx0b21lcmtAa29uNDAuY29tPokBOAQTAQIAIgUCVCLWuQIbAwYLCQgHAwIGFQgC 11 | CQoLBBYCAwECHgECF4AACgkQlqdxPzlO6quNRQgAratbsWbgSphSaBgLHrRYpO2D 12 | 8TWsK5Qy9ZxGVud2ynmXKcUZukqWRyw9+X22wpNTCeZNHI7srGohF7SeyfIemSx9 13 | 7OfN6Tu2hxz1zi1lq7hMnCNoI9UQSdZaGDm+loI07OnMHugit7ojn9lcW3CKUYzP 14 | AfTc1IAV5ZQpwPmPN0yf6SKnFIkD3X9SZRWhGeoUOZKr2KEMvBpNWoFfee91cCR2 15 | eTiTkaIE8P6Cfdv6rdlQFNqsj7TuBq6Zfru1DtUOdHYs089KR0av81W+U2RpGXc2 16 | AfOmn4kzVffZXdh6D/i4oTg8D6YcVvOZzVtAJVshayYSjD09kjNw+uKAO0nyebkB 17 | DQRUIta5AQgA23KCSdFdnvTJK+kOcMD/99zZz1XMcqpjBc2aP8+zdilC6XjZDjcg 18 | 8+NSdOCYCCHeO80Zd16yynrjvUW4D+PnaM3thdoigYJjEelx7wJls7C4U8hKfcFs 19 | U3YhZEKm2vXqomgrpCT5NExHcOjzi5yMUQ7ocUct79jui0XRhzkmj0vu67rSRWpT 20 | fSpvBwrhCUnC71aNy2QgbadxziLw2Gm983cpdO/wd3wnoz3JTXAYntJOg+7Q8VDg 21 | fiYesuPpCiAJLKZ3z/b5kQXMnK82Oi8H5FTFb10OEDhbgyIqABWOXmds2Uj211ux 22 | Ui5IIH4AScKvo+iKRbgWCs1kCkXQaD9OvQARAQABiQEfBBgBAgAJBQJUIta5AhsM 23 | AAoJEJancT85TuqrSCwH/Rpnp+35opS9b1MvfhUBuJAjIPy9tVwMuz4+NyUfh+g6 24 | M3ksbtGbzZ8EWZi3KJ3iQVdcwvzzMYZxFPXeLmH/FLu37uFtLTlBg7SDEzoHV6dE 25 | /dvGtYRFM7/QdCu9rrWt7zaEDjH7UnasGoZ6mY/v78UK7Q506w7fG8rtMFFupq7D 26 | rWfuA8Dbq31FJ0hdbkezGEF55+jsRwIqmVGHaNvdTm+GyiFibwkc7p6+ynBco8xv 27 | zr98VSNx5fM50XBc+pzhAHxzxhIgrmwx5zsQxMmd8pAh4deZUKIyk40XKrwikjoy 28 | KLjUdEc73bEjhr1rlVGj6tBVNspHVx5XbUvmDtD1s7E= 29 | =EaRm 30 | -----END PGP PUBLIC KEY BLOCK----- 31 | -------------------------------------------------------------------------------- /utils/systemd/aeond.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Aeon Full Node 3 | After=network.target 4 | 5 | [Service] 6 | User=aeon 7 | Group=aeon 8 | WorkingDirectory=~ 9 | RuntimeDirectory=aeon 10 | 11 | # Clearnet config 12 | # 13 | Type=forking 14 | PIDFile=/run/aeon/aeond.pid 15 | ExecStart=/usr/bin/aeond --config-file /etc/aeond.conf \ 16 | --detach --pidfile /run/aeon/aeond.pid 17 | 18 | # Tor config 19 | # 20 | ## We have to use simple, not forking, because we cannot pass --detach 21 | ## because stderr/stdout is not available when detached, but torsocks 22 | ## attempts to write to it, and fails with 'invalid argument', causing 23 | ## aeond to fail. 24 | #Type=simple 25 | #Environment=DNS_PUBLIC=tcp 26 | ## The following is needed only when accessing wallet from a different 27 | ## host in the LAN, VPN, etc, the RPC must bind to 0.0.0.0, but 28 | ## by default torsocks only allows binding to localhost. 29 | #Environment=TORSOCKS_ALLOW_INBOUND=1 30 | #ExecStart=/usr/bin/torsocks /usr/bin/aeond --config-file /etc/aeond.conf \ 31 | # --non-interactive 32 | 33 | Restart=always 34 | 35 | [Install] 36 | WantedBy=multi-user.target 37 | -------------------------------------------------------------------------------- /utils/translations/build-translations.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | lrelease=`which lrelease 2> /dev/null` 4 | if test -z "$lrelease" 5 | then 6 | lrelease=`which lrelease-qt4 2> /dev/null` 7 | fi 8 | if test -z "$lrelease" 9 | then 10 | echo "lrelease not found" 11 | exit 1 12 | fi 13 | 14 | echo "using $lrelease" 15 | "$lrelease" translations/*.ts 16 | 17 | -------------------------------------------------------------------------------- /utils/translations/update-translations.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | lupdate=`which lupdate 2> /dev/null` 4 | if test -z "$lupdate" 5 | then 6 | lupdate=`which lupdate-qt4 2> /dev/null` 7 | fi 8 | if test -z "$lupdate" 9 | then 10 | echo "lupdate not found" 11 | exit 1 12 | fi 13 | 14 | echo "using $lupdate" 15 | "$lupdate" `find src -name \*.cpp` -ts translations/*.ts 16 | 17 | --------------------------------------------------------------------------------