├── .dockerignore ├── CMakeLists.txt ├── CMakeLists_IOS.txt ├── CONTRIBUTING.md ├── Dockerfile ├── Doxyfile ├── LICENSE ├── Makefile ├── README.i18n.md ├── README.md ├── VULNERABILITY_RESPONSE_PROCESS.md ├── cmake ├── 32-bit-toolchain.cmake ├── 64-bit-toolchain.cmake ├── Doxyfile.in ├── Doxygen.extra.css.in ├── FindBerkeleyDB.cmake ├── FindLibunwind.cmake ├── FindMiniupnpc.cmake ├── FindReadline.cmake ├── FindUnbound.cmake ├── test-static-assert.c └── test-static-assert.cpp ├── contrib ├── CMakeLists.txt ├── 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 │ │ ├── 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 │ │ ├── misc_language.h │ │ ├── misc_log_ex.h │ │ ├── misc_os_dependent.h │ │ ├── net │ │ │ ├── abstract_tcp_server.h │ │ │ ├── abstract_tcp_server2.h │ │ │ ├── abstract_tcp_server2.inl │ │ │ ├── abstract_tcp_server_cp.h │ │ │ ├── abstract_tcp_server_cp.inl │ │ │ ├── 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 │ │ │ ├── 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 │ │ ├── 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 │ │ └── zlib_helper.h │ ├── src │ │ ├── CMakeLists.txt │ │ ├── hex.cpp │ │ ├── http_auth.cpp │ │ ├── mlog.cpp │ │ ├── readline_buffer.cpp │ │ └── string_tools.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 ├── 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_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 ├── miniupnpc │ ├── CMakeLists.txt │ ├── Changelog.txt │ ├── LICENSE │ ├── MANIFEST.in │ ├── Makefile │ ├── Makefile.mingw │ ├── README │ ├── VERSION │ ├── apiversions.txt │ ├── codelength.h │ ├── connecthostport.c │ ├── connecthostport.h │ ├── external-ip.sh │ ├── igd_desc_parse.c │ ├── igd_desc_parse.h │ ├── java │ │ ├── JavaBridgeTest.java │ │ ├── testjava.bat │ │ └── testjava.sh │ ├── listdevices.c │ ├── man3 │ │ └── miniupnpc.3 │ ├── mingw32make.bat │ ├── minihttptestserver.c │ ├── minisoap.c │ ├── minisoap.h │ ├── minissdpc.c │ ├── minissdpc.h │ ├── miniupnpc.c │ ├── miniupnpc.def │ ├── miniupnpc.h │ ├── miniupnpc_declspec.h │ ├── miniupnpcmodule.c │ ├── miniupnpcstrings.h.cmake │ ├── miniupnpcstrings.h.in │ ├── miniupnpctypes.h │ ├── miniwget.c │ ├── miniwget.h │ ├── minixml.c │ ├── minixml.h │ ├── minixmlvalid.c │ ├── msvc │ │ ├── miniupnpc.sln │ │ ├── miniupnpc.vcproj │ │ └── upnpc-static.vcproj │ ├── portlistingparse.c │ ├── portlistingparse.h │ ├── pymoduletest.py │ ├── pymoduletest3.py │ ├── receivedata.c │ ├── receivedata.h │ ├── setup.py │ ├── setupmingw32.py │ ├── testdesc │ │ ├── linksys_WAG200G_desc.values │ │ ├── linksys_WAG200G_desc.xml │ │ ├── new_LiveBox_desc.values │ │ └── new_LiveBox_desc.xml │ ├── testigddescparse.c │ ├── testminiwget.c │ ├── testminiwget.sh │ ├── testminixml.c │ ├── testportlistingparse.c │ ├── testreplyparse │ │ ├── DeletePortMapping.namevalue │ │ ├── DeletePortMapping.xml │ │ ├── GetExternalIPAddress.namevalue │ │ ├── GetExternalIPAddress.xml │ │ ├── GetSpecificPortMappingEntryReq.namevalue │ │ ├── GetSpecificPortMappingEntryReq.xml │ │ ├── GetSpecificPortMappingEntryResp.namevalue │ │ ├── GetSpecificPortMappingEntryResp.xml │ │ ├── SetDefaultConnectionService.namevalue │ │ ├── SetDefaultConnectionService.xml │ │ └── readme.txt │ ├── testupnpigd.py │ ├── testupnpreplyparse.c │ ├── testupnpreplyparse.sh │ ├── updateminiupnpcstrings.sh │ ├── upnpc.c │ ├── upnpcommands.c │ ├── upnpcommands.h │ ├── upnpdev.c │ ├── upnpdev.h │ ├── upnperrors.c │ ├── upnperrors.h │ ├── upnpreplyparse.c │ ├── upnpreplyparse.h │ └── wingenminiupnpcstrings.c ├── rapidjson │ ├── allocators.h │ ├── document.h │ ├── encodedstream.h │ ├── encodings.h │ ├── error │ │ ├── en.h │ │ └── error.h │ ├── filereadstream.h │ ├── filewritestream.h │ ├── fwd.h │ ├── internal │ │ ├── biginteger.h │ │ ├── diyfp.h │ │ ├── dtoa.h │ │ ├── ieee754.h │ │ ├── itoa.h │ │ ├── meta.h │ │ ├── pow10.h │ │ ├── regex.h │ │ ├── stack.h │ │ ├── strfunc.h │ │ ├── strtod.h │ │ └── swap.h │ ├── istreamwrapper.h │ ├── memorybuffer.h │ ├── memorystream.h │ ├── msinttypes │ │ ├── inttypes.h │ │ └── stdint.h │ ├── ostreamwrapper.h │ ├── pointer.h │ ├── prettywriter.h │ ├── rapidjson.h │ ├── reader.h │ ├── schema.h │ ├── stream.h │ ├── stringbuffer.h │ └── writer.h └── unbound │ ├── CMakeLists.txt │ ├── LICENSE │ ├── Makefile.in │ ├── README │ ├── ac_pkg_swig.m4 │ ├── aclocal.m4 │ ├── acx_nlnetlabs.m4 │ ├── acx_python.m4 │ ├── ax_pthread.m4 │ ├── compat │ ├── arc4_lock.c │ ├── arc4random.c │ ├── arc4random_uniform.c │ ├── chacha_private.h │ ├── ctime_r.c │ ├── explicit_bzero.c │ ├── fake-rfc2553.c │ ├── fake-rfc2553.h │ ├── getentropy_linux.c │ ├── getentropy_osx.c │ ├── getentropy_solaris.c │ ├── getentropy_win.c │ ├── gmtime_r.c │ ├── inet_aton.c │ ├── inet_ntop.c │ ├── inet_pton.c │ ├── isblank.c │ ├── malloc.c │ ├── memcmp.c │ ├── memcmp.h │ ├── memmove.c │ ├── reallocarray.c │ ├── sha512.c │ ├── snprintf.c │ ├── strlcat.c │ ├── strlcpy.c │ ├── strptime.c │ └── strsep.c │ ├── config.guess │ ├── config.h.cmake.in │ ├── config.h.in │ ├── config.sub │ ├── configure │ ├── configure.ac │ ├── configure_checks.cmake │ ├── contrib │ ├── README │ ├── aaaa-filter-iterator.patch │ ├── build-unbound-localzone-from-hosts.pl │ ├── create_unbound_ad_servers.cmd │ ├── create_unbound_ad_servers.sh │ ├── parseunbound.pl │ ├── patch_rsamd5_enable.diff │ ├── rc_d_unbound │ ├── selinux │ │ ├── unbound.fc │ │ └── unbound.te │ ├── unbound-host.nagios.patch │ ├── unbound.init │ ├── unbound.init_fedora │ ├── unbound.plist │ ├── unbound.spec │ ├── unbound.spec_fedora │ ├── unbound_cache.cmd │ ├── unbound_cache.sh │ ├── unbound_cacti.tar.gz │ ├── unbound_munin_ │ ├── unbound_smf22.tar.gz │ ├── update-anchor.sh │ ├── validation-reporter.sh │ ├── warmup.cmd │ └── warmup.sh │ ├── daemon │ ├── acl_list.c │ ├── acl_list.h │ ├── cachedump.c │ ├── cachedump.h │ ├── daemon.c │ ├── daemon.h │ ├── remote.c │ ├── remote.h │ ├── stats.c │ ├── stats.h │ ├── unbound.c │ ├── worker.c │ └── worker.h │ ├── dns64 │ ├── dns64.c │ └── dns64.h │ ├── dnscrypt │ ├── cert.h │ ├── dnscrypt.c │ ├── dnscrypt.h │ ├── dnscrypt.m4 │ └── dnscrypt_config.h │ ├── dnstap │ ├── dnstap.c │ ├── dnstap.h │ ├── dnstap.m4 │ ├── dnstap.proto │ └── dnstap_config.h.in │ ├── doc │ ├── CREDITS │ ├── Changelog │ ├── FEATURES │ ├── LICENSE │ ├── README │ ├── README.DNS64 │ ├── README.svn │ ├── README.tests │ ├── TODO │ ├── control_proto_spec.txt │ ├── example.conf.in │ ├── ietf67-design-02.odp │ ├── ietf67-design-02.pdf │ ├── libunbound.3.in │ ├── requirements.txt │ ├── unbound-anchor.8.in │ ├── unbound-checkconf.8.in │ ├── unbound-control.8.in │ ├── unbound-host.1.in │ ├── unbound.8.in │ ├── unbound.conf.5.in │ └── unbound.doxygen │ ├── install-sh │ ├── iterator │ ├── iter_delegpt.c │ ├── iter_delegpt.h │ ├── iter_donotq.c │ ├── iter_donotq.h │ ├── iter_fwd.c │ ├── iter_fwd.h │ ├── iter_hints.c │ ├── iter_hints.h │ ├── iter_priv.c │ ├── iter_priv.h │ ├── iter_resptype.c │ ├── iter_resptype.h │ ├── iter_scrub.c │ ├── iter_scrub.h │ ├── iter_utils.c │ ├── iter_utils.h │ ├── iterator.c │ └── iterator.h │ ├── libunbound │ ├── context.c │ ├── context.h │ ├── libunbound.c │ ├── libworker.c │ ├── libworker.h │ ├── python │ │ ├── LICENSE │ │ ├── Makefile │ │ ├── doc │ │ │ ├── _static │ │ │ │ └── readme │ │ │ ├── conf.py │ │ │ ├── examples │ │ │ │ ├── example1a.rst │ │ │ │ ├── example1b.rst │ │ │ │ ├── example2.rst │ │ │ │ ├── example3.rst │ │ │ │ ├── example4.rst │ │ │ │ ├── example5.rst │ │ │ │ ├── example6-1.py │ │ │ │ ├── example6.rst │ │ │ │ ├── example7-1.py │ │ │ │ ├── example7-2.py │ │ │ │ ├── example7.rst │ │ │ │ ├── example8-1.py │ │ │ │ ├── example8.rst │ │ │ │ └── index.rst │ │ │ ├── index.rst │ │ │ ├── install.rst │ │ │ ├── intro.rst │ │ │ └── modules │ │ │ │ └── unbound.rst │ │ ├── examples │ │ │ ├── async-lookup.py │ │ │ ├── dns-lookup.py │ │ │ ├── dnssec-valid.py │ │ │ ├── dnssec_test.py │ │ │ ├── example8-1.py │ │ │ ├── idn-lookup.py │ │ │ ├── mx-lookup.py │ │ │ ├── ns-lookup.py │ │ │ └── reverse-lookup.py │ │ ├── file_py3.i │ │ └── libunbound.i │ ├── ubsyms.def │ ├── unbound-event.h │ ├── unbound.h │ └── worker.h │ ├── ltmain.sh │ ├── makedist.sh │ ├── pythonmod │ ├── LICENSE │ ├── Makefile │ ├── doc │ │ ├── _static │ │ │ └── readme │ │ ├── conf.py │ │ ├── examples │ │ │ ├── example0-1.py │ │ │ ├── example0.rst │ │ │ ├── example1.rst │ │ │ ├── example2.rst │ │ │ ├── example3.rst │ │ │ ├── example4.rst │ │ │ ├── example5.rst │ │ │ ├── example6.rst │ │ │ └── index.rst │ │ ├── index.rst │ │ ├── install.rst │ │ ├── modules │ │ │ ├── config.rst │ │ │ ├── env.rst │ │ │ ├── functions.rst │ │ │ ├── index.rst │ │ │ └── struct.rst │ │ └── usecase.rst │ ├── examples │ │ ├── calc.py │ │ ├── dict.py │ │ ├── dict_data.txt │ │ ├── log.py │ │ ├── resgen.py │ │ ├── resip.py │ │ └── resmod.py │ ├── interface.i │ ├── pythonmod.c │ ├── pythonmod.h │ ├── pythonmod_utils.c │ ├── pythonmod_utils.h │ ├── test-calc.conf │ ├── test-dict.conf │ ├── test-edns.conf │ ├── test-inplace_callbacks.conf │ ├── test-log.conf │ ├── test-resgen.conf │ ├── test-resip.conf │ ├── test-resmod.conf │ ├── ubmodule-msg.py │ └── ubmodule-tst.py │ ├── respip │ ├── respip.c │ └── respip.h │ ├── services │ ├── cache │ │ ├── dns.c │ │ ├── dns.h │ │ ├── infra.c │ │ ├── infra.h │ │ ├── rrset.c │ │ └── rrset.h │ ├── listen_dnsport.c │ ├── listen_dnsport.h │ ├── localzone.c │ ├── localzone.h │ ├── mesh.c │ ├── mesh.h │ ├── modstack.c │ ├── modstack.h │ ├── outbound_list.c │ ├── outbound_list.h │ ├── outside_network.c │ ├── outside_network.h │ ├── view.c │ └── view.h │ ├── sldns │ ├── keyraw.c │ ├── keyraw.h │ ├── parse.c │ ├── parse.h │ ├── parseutil.c │ ├── parseutil.h │ ├── pkthdr.h │ ├── rrdef.c │ ├── rrdef.h │ ├── sbuffer.c │ ├── sbuffer.h │ ├── str2wire.c │ ├── str2wire.h │ ├── wire2str.c │ └── wire2str.h │ ├── smallapp │ ├── unbound-anchor.c │ ├── unbound-checkconf.c │ ├── unbound-control-setup.sh.in │ ├── unbound-control.c │ ├── unbound-host.c │ └── worker_cb.c │ ├── testcode │ ├── asynclook.c │ ├── checklocks.c │ ├── checklocks.h │ ├── delayer.c │ ├── do-tests.sh │ ├── fake_event.c │ ├── fake_event.h │ ├── lock_verify.c │ ├── memstats.c │ ├── mini_tpkg.sh │ ├── perf.c │ ├── petal.c │ ├── pktview.c │ ├── readhex.c │ ├── readhex.h │ ├── replay.c │ ├── replay.h │ ├── run_vm.sh │ ├── signit.c │ ├── streamtcp.1 │ ├── streamtcp.c │ ├── testbound.c │ ├── testpkts.c │ ├── testpkts.h │ ├── unitanchor.c │ ├── unitdname.c │ ├── unitecs.c │ ├── unitldns.c │ ├── unitlruhash.c │ ├── unitmain.c │ ├── unitmain.h │ ├── unitmsgparse.c │ ├── unitneg.c │ ├── unitregional.c │ ├── unitslabhash.c │ └── unitverify.c │ ├── util │ ├── alloc.c │ ├── alloc.h │ ├── as112.c │ ├── as112.h │ ├── config_file.c │ ├── config_file.h │ ├── configlexer.c │ ├── configlexer.lex │ ├── configparser.c │ ├── configparser.h │ ├── configparser.y │ ├── configyyrename.h │ ├── data │ │ ├── dname.c │ │ ├── dname.h │ │ ├── msgencode.c │ │ ├── msgencode.h │ │ ├── msgparse.c │ │ ├── msgparse.h │ │ ├── msgreply.c │ │ ├── msgreply.h │ │ ├── packed_rrset.c │ │ └── packed_rrset.h │ ├── fptr_wlist.c │ ├── fptr_wlist.h │ ├── iana_ports.inc │ ├── locks.c │ ├── locks.h │ ├── log.c │ ├── log.h │ ├── mini_event.c │ ├── mini_event.h │ ├── module.c │ ├── module.h │ ├── net_help.c │ ├── net_help.h │ ├── netevent.c │ ├── netevent.h │ ├── random.c │ ├── random.h │ ├── rbtree.c │ ├── rbtree.h │ ├── regional.c │ ├── regional.h │ ├── rtt.c │ ├── rtt.h │ ├── shm_side │ │ ├── shm_main.c │ │ └── shm_main.h │ ├── storage │ │ ├── dnstree.c │ │ ├── dnstree.h │ │ ├── lookup3.c │ │ ├── lookup3.h │ │ ├── lruhash.c │ │ ├── lruhash.h │ │ ├── slabhash.c │ │ └── slabhash.h │ ├── timehist.c │ ├── timehist.h │ ├── tube.c │ ├── tube.h │ ├── ub_event.c │ ├── ub_event.h │ ├── ub_event_pluggable.c │ ├── winsock_event.c │ └── winsock_event.h │ ├── validator │ ├── autotrust.c │ ├── autotrust.h │ ├── val_anchor.c │ ├── val_anchor.h │ ├── val_kcache.c │ ├── val_kcache.h │ ├── val_kentry.c │ ├── val_kentry.h │ ├── val_neg.c │ ├── val_neg.h │ ├── val_nsec.c │ ├── val_nsec.h │ ├── val_nsec3.c │ ├── val_nsec3.h │ ├── val_secalgo.c │ ├── val_secalgo.h │ ├── val_sigcrypt.c │ ├── val_sigcrypt.h │ ├── val_utils.c │ ├── val_utils.h │ ├── validator.c │ └── validator.h │ └── winrc │ ├── README.txt │ ├── anchor-update.c │ ├── combined.ico │ ├── gen_msg.bin │ ├── gen_msg.mc │ ├── rsrc_anchorupd.rc │ ├── rsrc_svcinst.rc │ ├── rsrc_svcuninst.rc │ ├── rsrc_unbound.rc │ ├── rsrc_unbound_anchor.rc │ ├── rsrc_unbound_checkconf.rc │ ├── rsrc_unbound_control.rc │ ├── rsrc_unbound_host.rc │ ├── service.conf │ ├── setup.nsi │ ├── setup_left.bmp │ ├── setup_top.bmp │ ├── unbound-control-setup.cmd │ ├── unbound-service-install.c │ ├── unbound-service-remove.c │ ├── unbound-website.url │ ├── unbound16.ico │ ├── unbound32.ico │ ├── unbound48.ico │ ├── unbound64.ico │ ├── unbound64.png │ ├── vista_admin.manifest │ ├── vista_user.manifest │ ├── w_inst.c │ ├── w_inst.h │ ├── win_svc.c │ └── win_svc.h ├── include ├── INode.h └── IWallet.h ├── install_dependencies.sh ├── 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 ├── blockchain_utilities │ ├── CMakeLists.txt │ ├── README.md │ ├── blockchain_export.cpp │ ├── blockchain_import.cpp │ ├── blockchain_utilities.h │ ├── blocksdat_file.cpp │ ├── blocksdat_file.h │ ├── bootstrap_file.cpp │ ├── bootstrap_file.h │ └── bootstrap_serialization.h ├── blocks │ ├── CMakeLists.txt │ ├── blockexports.c │ ├── blocks.dat │ ├── blocks.h │ ├── checkpoints.dat │ └── testnet_blocks.dat ├── common │ ├── CMakeLists.txt │ ├── base58.cpp │ ├── base58.h │ ├── boost_serialization_helper.h │ ├── command_line.cpp │ ├── command_line.h │ ├── common_fwd.h │ ├── dns_utils.cpp │ ├── dns_utils.h │ ├── download.cpp │ ├── download.h │ ├── http_connection.h │ ├── i18n.cpp │ ├── i18n.h │ ├── int-util.h │ ├── json_util.h │ ├── password.cpp │ ├── password.h │ ├── perf_timer.cpp │ ├── perf_timer.h │ ├── pod-class.h │ ├── rpc_client.h │ ├── scoped_message_writer.h │ ├── stack_trace.cpp │ ├── stack_trace.h │ ├── task_region.cpp │ ├── task_region.h │ ├── thread_group.cpp │ ├── thread_group.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 │ ├── chacha8.c │ ├── chacha8.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 │ │ │ ├── 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 │ ├── 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 │ ├── checkpoints.cpp │ ├── checkpoints.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 │ ├── 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 │ ├── blobdatatype.h │ ├── 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 ├── 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 │ ├── portuguese.h │ ├── russian.h │ ├── singleton.h │ └── spanish.h ├── p2p │ ├── CMakeLists.txt │ ├── connection_basic.cpp │ ├── connection_basic.hpp │ ├── net_node.h │ ├── net_node.inl │ ├── net_node_common.h │ ├── net_peerlist.h │ ├── net_peerlist_boost_serialization.h │ ├── network_throttle-detail.cpp │ ├── network_throttle-detail.hpp │ ├── network_throttle.cpp │ ├── network_throttle.hpp │ ├── p2p_protocol_defs.h │ └── stdafx.h ├── platform │ ├── mingw │ │ └── alloca.h │ └── msc │ │ ├── alloca.h │ │ ├── inline_c.h │ │ ├── stdbool.h │ │ └── sys │ │ └── param.h ├── ringct │ ├── CMakeLists.txt │ ├── 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 │ ├── rpc_args.cpp │ └── rpc_args.h ├── serialization │ ├── binary_archive.h │ ├── binary_utils.h │ ├── crypto.h │ ├── debug_archive.h │ ├── json_archive.h │ ├── json_utils.h │ ├── list.h │ ├── pair.h │ ├── serialization.h │ ├── string.h │ ├── variant.h │ └── vector.h ├── simplewallet │ ├── CMakeLists.txt │ ├── simplewallet.cpp │ └── simplewallet.h ├── version.cmake ├── version.h.in └── wallet │ ├── CMakeLists.txt │ ├── api │ ├── address_book.cpp │ ├── address_book.h │ ├── common_defines.h │ ├── pending_transaction.cpp │ ├── pending_transaction.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 │ ├── wallet_manager.cpp │ └── wallet_manager.h │ ├── node_rpc_proxy.cpp │ ├── node_rpc_proxy.h │ ├── wallet2.cpp │ ├── wallet2.h │ ├── wallet2_api.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 ├── 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 │ ├── 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 │ ├── 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 │ │ ├── block │ │ │ ├── BLOCK1 │ │ │ └── BLOCK2 │ │ ├── cold-outputs │ │ │ ├── OUTPUTS1 │ │ │ └── OUTPUTS2 │ │ ├── cold-transaction │ │ │ └── CTX1 │ │ ├── signature │ │ │ ├── SIG1 │ │ │ └── SIG2 │ │ └── transaction │ │ │ ├── TX1 │ │ │ └── TX2 │ ├── outputs │ ├── signed_monero_tx │ ├── unsigned_monero_tx │ ├── wallet_9svHk1 │ └── wallet_9svHk1.keys ├── difficulty │ ├── CMakeLists.txt │ ├── data.txt │ ├── difficulty.cpp │ └── generate-data ├── functional_tests │ ├── CMakeLists.txt │ ├── main.cpp │ ├── transactions_flow_test.cpp │ ├── transactions_flow_test.h │ ├── transactions_generation_from_blockchain.cpp │ └── transactions_generation_from_blockchain.h ├── fuzz │ ├── CMakeLists.txt │ ├── block.cpp │ ├── cold-outputs.cpp │ ├── cold-transaction.cpp │ ├── fuzzer.cpp │ ├── fuzzer.h │ ├── 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-slow.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 │ ├── check_tx_signature.h │ ├── cn_fast_hash.h │ ├── cn_slow_hash.h │ ├── construct_tx.h │ ├── derive_public_key.h │ ├── derive_secret_key.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 │ ├── performance_tests.h │ ├── performance_utils.h │ ├── sc_reduce32.h │ └── single_tx_test_base.h └── unit_tests │ ├── CMakeLists.txt │ ├── address_from_url.cpp │ ├── ban.cpp │ ├── base58.cpp │ ├── block_queue.cpp │ ├── block_reward.cpp │ ├── blockchain_db.cpp │ ├── canonical_amounts.cpp │ ├── chacha8.cpp │ ├── checkpoints.cpp │ ├── command_line.cpp │ ├── crypto.cpp │ ├── decompose_amount_into_digits.cpp │ ├── dns_resolver.cpp │ ├── epee_boosted_tcp_server.cpp │ ├── epee_levin_protocol_handler_async.cpp │ ├── epee_utils.cpp │ ├── fee.cpp │ ├── get_xtype_from_string.cpp │ ├── hardfork.cpp │ ├── http.cpp │ ├── main.cpp │ ├── mnemonics.cpp │ ├── mul_div.cpp │ ├── output_selection.cpp │ ├── parse_amount.cpp │ ├── ringct.cpp │ ├── serialization.cpp │ ├── slow_memmem.cpp │ ├── test_peerlist.cpp │ ├── test_protocol_pack.cpp │ ├── test_tx_utils.cpp │ ├── thread_group.cpp │ ├── unbound.cpp │ ├── unit_tests_utils.h │ ├── uri.cpp │ ├── varint.cpp │ └── vercmp.cpp ├── translations ├── monero.ts ├── monero_fr.ts └── monero_it.ts ├── utils ├── build_scripts │ ├── android32.Dockerfile │ ├── android64.Dockerfile │ └── windows.bat ├── conf │ └── monerod.conf ├── doxygen-publish.sh ├── gpg_keys │ ├── anonimal.asc │ ├── fluffypony.asc │ ├── guzzi.asc │ ├── hyc.asc │ ├── iDunk.asc │ ├── jaquee.asc │ ├── kenshi84.asc │ ├── luigi1111.asc │ ├── mikezackles.asc │ ├── moneromooo.asc │ ├── nanoakron.asc │ ├── oranjuice.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 │ └── monerod.service └── translations │ ├── build-translations.sh │ └── update-translations.sh └── version.cmake /.dockerignore: -------------------------------------------------------------------------------- 1 | * 2 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:16.04 2 | 3 | ENV SRC_DIR /usr/local/src/monero 4 | 5 | RUN set -x \ 6 | && buildDeps=' \ 7 | ca-certificates \ 8 | cmake \ 9 | g++ \ 10 | git \ 11 | libboost1.58-all-dev \ 12 | libssl-dev \ 13 | make \ 14 | pkg-config \ 15 | ' \ 16 | && apt-get -qq update \ 17 | && apt-get -qq --no-install-recommends install $buildDeps 18 | 19 | RUN git clone https://github.com/monero-project/monero.git $SRC_DIR 20 | WORKDIR $SRC_DIR 21 | RUN make -j$(nproc) release-static 22 | 23 | RUN cp build/release/bin/* /usr/local/bin/ \ 24 | \ 25 | && rm -r $SRC_DIR \ 26 | && apt-get -qq --auto-remove purge $buildDeps 27 | 28 | # Contains the blockchain 29 | VOLUME /root/.bitmonero 30 | 31 | # Generate your wallet via accessing the container and run: 32 | # cd /wallet 33 | # chutoken-wallet-cli 34 | VOLUME /wallet 35 | 36 | ENV LOG_LEVEL 0 37 | ENV P2P_BIND_IP 0.0.0.0 38 | ENV P2P_BIND_PORT 18080 39 | ENV RPC_BIND_IP 127.0.0.1 40 | ENV RPC_BIND_PORT 18081 41 | 42 | EXPOSE 18080 43 | EXPOSE 18081 44 | 45 | CMD chutokend --log-level=$LOG_LEVEL --p2p-bind-ip=$P2P_BIND_IP --p2p-bind-port=$P2P_BIND_PORT --rpc-bind-ip=$RPC_BIND_IP --rpc-bind-port=$RPC_BIND_PORT 46 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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/BitChute/chutoken/845742c60c2211eb5f03dcabf9437f3a223ce543/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/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/BitChute/chutoken/845742c60c2211eb5f03dcabf9437f3a223ce543/contrib/epee/include/net/levin_client_async.inl -------------------------------------------------------------------------------- /contrib/epee/include/net/local_ip.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BitChute/chutoken/845742c60c2211eb5f03dcabf9437f3a223ce543/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 | #include 7 | #include 8 | 9 | namespace rdln 10 | { 11 | typedef enum { empty, partial, full } linestatus; 12 | class readline_buffer : public std::stringbuf 13 | { 14 | public: 15 | readline_buffer(); 16 | void start(); 17 | void stop(); 18 | bool is_running() const 19 | { 20 | return m_cout_buf != NULL; 21 | } 22 | linestatus get_line(std::string& line) const; 23 | void set_prompt(const std::string& prompt); 24 | static void add_completion(const std::string& command); 25 | static const std::vector& get_completions(); 26 | 27 | protected: 28 | virtual int sync(); 29 | 30 | private: 31 | std::streambuf* m_cout_buf; 32 | static std::vector& completion_commands(); 33 | }; 34 | 35 | class suspend_readline 36 | { 37 | public: 38 | suspend_readline(); 39 | ~suspend_readline(); 40 | private: 41 | readline_buffer* m_buffer; 42 | bool m_restart; 43 | }; 44 | } 45 | 46 | -------------------------------------------------------------------------------- /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/BitChute/chutoken/845742c60c2211eb5f03dcabf9437f3a223ce543/contrib/epee/tests/data/storages/invalid_storage_1.bin -------------------------------------------------------------------------------- /contrib/epee/tests/data/storages/invalid_storage_2.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BitChute/chutoken/845742c60c2211eb5f03dcabf9437f3a223ce543/contrib/epee/tests/data/storages/invalid_storage_2.bin -------------------------------------------------------------------------------- /contrib/epee/tests/data/storages/invalid_storage_3.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BitChute/chutoken/845742c60c2211eb5f03dcabf9437f3a223ce543/contrib/epee/tests/data/storages/invalid_storage_3.bin -------------------------------------------------------------------------------- /contrib/epee/tests/data/storages/invalid_storage_4.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BitChute/chutoken/845742c60c2211eb5f03dcabf9437f3a223ce543/contrib/epee/tests/data/storages/invalid_storage_4.bin -------------------------------------------------------------------------------- /contrib/epee/tests/data/storages/valid_storage.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BitChute/chutoken/845742c60c2211eb5f03dcabf9437f3a223ce543/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 -Werror") 18 | SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Werror -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" 14 | exit 1 15 | fi 16 | case "$type" in 17 | block|transaction|signature|cold-outputs|cold-transaction) ;; 18 | *) echo "usage: $0 block|transaction|signature|cold-outputs|cold-transaction"; exit 1 ;; 19 | esac 20 | 21 | afl-fuzz -i tests/data/fuzz/$type -m 150 -t 250 -o fuzz-out/$type build/fuzz/tests/fuzz/${type}_fuzz_tests 22 | -------------------------------------------------------------------------------- /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/chutokend.conf $SNAP_USER_DATA/etc/chutokend.conf 6 | fi 7 | 8 | exec "$SNAP/bin/chutokend" "$@" 9 | -------------------------------------------------------------------------------- /contrib/snap/monerod.conf: -------------------------------------------------------------------------------- 1 | # Configuration for chutokend 2 | # Syntax: any command line option may be specified as 'clioptionname=value'. 3 | # See 'chutokend --help' for all available options. 4 | 5 | # Overrided by snap: 6 | # data-dir=/var/lib/monero 7 | # log-file=/var/log/monero/monero.log 8 | 9 | log-level=0 10 | -------------------------------------------------------------------------------- /contrib/snap/setup/gui/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BitChute/chutoken/845742c60c2211eb5f03dcabf9437f3a223ce543/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/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/tooltag: -------------------------------------------------------------------------------- 1 | 2 | 3 | mdb_copy_1 4 | mdb_copy - environment copy tool 5 | mdb_copy.1 6 | 7 | 8 | mdb_dump_1 9 | mdb_dump - environment export tool 10 | mdb_dump.1 11 | 12 | 13 | mdb_load_1 14 | mdb_load - environment import tool 15 | mdb_load.1 16 | 17 | 18 | mdb_stat_1 19 | mdb_stat - environment status tool 20 | mdb_stat.1 21 | 22 | 23 | -------------------------------------------------------------------------------- /external/easylogging++/ea_config.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #define ELPP_THREAD_SAFE 4 | #define ELPP_DEFAULT_LOG_FILE "" 5 | #if !defined __GNUC__ || defined __MINGW32__ || defined __MINGW64__ || defined __ANDROID__ 6 | #else 7 | #define ELPP_FEATURE_CRASH_LOG 1 8 | #endif 9 | #define ELPP_DISABLE_DEFAULT_CRASH_HANDLING 10 | #define ELPP_NO_CHECK_MACROS 11 | -------------------------------------------------------------------------------- /external/miniupnpc/LICENSE: -------------------------------------------------------------------------------- 1 | MiniUPnPc 2 | Copyright (c) 2005-2015, Thomas BERNARD 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | 8 | * Redistributions of source code must retain the above copyright notice, 9 | this list of conditions and the following disclaimer. 10 | * Redistributions in binary form must reproduce the above copyright notice, 11 | this list of conditions and the following disclaimer in the documentation 12 | and/or other materials provided with the distribution. 13 | * The name of the author may not be used to endorse or promote products 14 | derived from this software without specific prior written permission. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 17 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 20 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 23 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 24 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 25 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 26 | POSSIBILITY OF SUCH DAMAGE. 27 | 28 | -------------------------------------------------------------------------------- /external/miniupnpc/MANIFEST.in: -------------------------------------------------------------------------------- 1 | include README 2 | include miniupnpcmodule.c 3 | include setup.py 4 | include *.h 5 | include libminiupnpc.a 6 | -------------------------------------------------------------------------------- /external/miniupnpc/VERSION: -------------------------------------------------------------------------------- 1 | 2.0 2 | -------------------------------------------------------------------------------- /external/miniupnpc/connecthostport.h: -------------------------------------------------------------------------------- 1 | /* $Id: connecthostport.h,v 1.2 2012/06/23 22:32:33 nanard Exp $ */ 2 | /* Project: miniupnp 3 | * http://miniupnp.free.fr/ 4 | * Author: Thomas Bernard 5 | * Copyright (c) 2010-2012 Thomas Bernard 6 | * This software is subjects to the conditions detailed 7 | * in the LICENCE file provided within this distribution */ 8 | #ifndef CONNECTHOSTPORT_H_INCLUDED 9 | #define CONNECTHOSTPORT_H_INCLUDED 10 | 11 | /* connecthostport() 12 | * return a socket connected (TCP) to the host and port 13 | * or -1 in case of error */ 14 | int connecthostport(const char * host, unsigned short port, 15 | unsigned int scope_id); 16 | 17 | #endif 18 | 19 | -------------------------------------------------------------------------------- /external/miniupnpc/external-ip.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # $Id: external-ip.sh,v 1.1 2010/08/05 12:57:41 nanard Exp $ 3 | # (c) 2010 Reuben Hawkins 4 | upnpc -s | grep ExternalIPAddress | sed 's/[^0-9\.]//g' 5 | -------------------------------------------------------------------------------- /external/miniupnpc/java/testjava.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | set JAVA=java 3 | set JAVAC=javac 4 | REM notice the semicolon for Windows. Write once, run ... oh nevermind 5 | set CP=miniupnpc_win32.jar;. 6 | 7 | %JAVAC% -cp "%CP%" JavaBridgeTest.java || exit 1 8 | %JAVA% -cp "%CP%" JavaBridgeTest 12345 UDP || exit 1 9 | -------------------------------------------------------------------------------- /external/miniupnpc/java/testjava.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | JAVA=java 4 | JAVAC=javac 5 | CP=$(for i in *.jar; do echo -n $i:; done). 6 | 7 | $JAVAC -cp $CP JavaBridgeTest.java || exit 1 8 | $JAVA -cp $CP JavaBridgeTest 12345 UDP || exit 1 9 | -------------------------------------------------------------------------------- /external/miniupnpc/mingw32make.bat: -------------------------------------------------------------------------------- 1 | @mingw32-make -f Makefile.mingw %1 2 | @if errorlevel 1 goto end 3 | @if not exist upnpc-static.exe goto end 4 | @strip upnpc-static.exe 5 | @upx --best upnpc-static.exe 6 | @strip upnpc-shared.exe 7 | @upx --best upnpc-shared.exe 8 | :end 9 | -------------------------------------------------------------------------------- /external/miniupnpc/minisoap.h: -------------------------------------------------------------------------------- 1 | /* $Id: minisoap.h,v 1.4 2010/04/12 20:39:41 nanard Exp $ */ 2 | /* Project : miniupnp 3 | * Author : Thomas Bernard 4 | * Copyright (c) 2005 Thomas Bernard 5 | * This software is subject to the conditions detailed in the 6 | * LICENCE file provided in this distribution. */ 7 | #ifndef MINISOAP_H_INCLUDED 8 | #define MINISOAP_H_INCLUDED 9 | 10 | /*int httpWrite(int, const char *, int, const char *);*/ 11 | int soapPostSubmit(int, const char *, const char *, unsigned short, 12 | const char *, const char *, const char *); 13 | 14 | #endif 15 | 16 | -------------------------------------------------------------------------------- /external/miniupnpc/miniupnpc.def: -------------------------------------------------------------------------------- 1 | LIBRARY 2 | ; miniupnpc library 3 | miniupnpc 4 | 5 | EXPORTS 6 | ; miniupnpc 7 | upnpDiscover 8 | freeUPNPDevlist 9 | parserootdesc 10 | UPNP_GetValidIGD 11 | UPNP_GetIGDFromUrl 12 | GetUPNPUrls 13 | FreeUPNPUrls 14 | ; miniwget 15 | miniwget 16 | miniwget_getaddr 17 | ; upnpcommands 18 | UPNP_GetTotalBytesSent 19 | UPNP_GetTotalBytesReceived 20 | UPNP_GetTotalPacketsSent 21 | UPNP_GetTotalPacketsReceived 22 | UPNP_GetStatusInfo 23 | UPNP_GetConnectionTypeInfo 24 | UPNP_GetExternalIPAddress 25 | UPNP_GetLinkLayerMaxBitRates 26 | UPNP_AddPortMapping 27 | UPNP_AddAnyPortMapping 28 | UPNP_DeletePortMapping 29 | UPNP_DeletePortMappingRange 30 | UPNP_GetPortMappingNumberOfEntries 31 | UPNP_GetSpecificPortMappingEntry 32 | UPNP_GetGenericPortMappingEntry 33 | UPNP_GetListOfPortMappings 34 | UPNP_AddPinhole 35 | UPNP_CheckPinholeWorking 36 | UPNP_UpdatePinhole 37 | UPNP_GetPinholePackets 38 | UPNP_DeletePinhole 39 | UPNP_GetFirewallStatus 40 | UPNP_GetOutboundPinholeTimeout 41 | ; upnperrors 42 | strupnperror 43 | ; portlistingparse 44 | ParsePortListing 45 | FreePortListing 46 | -------------------------------------------------------------------------------- /external/miniupnpc/miniupnpc_declspec.h: -------------------------------------------------------------------------------- 1 | #ifndef MINIUPNPC_DECLSPEC_H_INCLUDED 2 | #define MINIUPNPC_DECLSPEC_H_INCLUDED 3 | 4 | #if defined(_WIN32) && !defined(MINIUPNP_STATICLIB) 5 | /* for windows dll */ 6 | #ifdef MINIUPNP_EXPORTS 7 | #define MINIUPNP_LIBSPEC __declspec(dllexport) 8 | #else 9 | #define MINIUPNP_LIBSPEC __declspec(dllimport) 10 | #endif 11 | #else 12 | #if defined(__GNUC__) && __GNUC__ >= 4 13 | /* fix dynlib for OS X 10.9.2 and Apple LLVM version 5.0 */ 14 | #define MINIUPNP_LIBSPEC __attribute__ ((visibility ("default"))) 15 | #else 16 | #define MINIUPNP_LIBSPEC 17 | #endif 18 | #endif 19 | 20 | #endif /* MINIUPNPC_DECLSPEC_H_INCLUDED */ 21 | 22 | -------------------------------------------------------------------------------- /external/miniupnpc/miniupnpcstrings.h.cmake: -------------------------------------------------------------------------------- 1 | #ifndef MINIUPNPCSTRINGS_H_INCLUDED 2 | #define MINIUPNPCSTRINGS_H_INCLUDED 3 | 4 | #define OS_STRING "${CMAKE_SYSTEM_NAME}" 5 | #define MINIUPNPC_VERSION_STRING "${MINIUPNPC_VERSION}" 6 | 7 | #if 0 8 | /* according to "UPnP Device Architecture 1.0" */ 9 | #define UPNP_VERSION_STRING "UPnP/1.0" 10 | #else 11 | /* according to "UPnP Device Architecture 1.1" */ 12 | #define UPNP_VERSION_STRING "UPnP/1.1" 13 | #endif 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /external/miniupnpc/miniupnpcstrings.h.in: -------------------------------------------------------------------------------- 1 | /* $Id: miniupnpcstrings.h.in,v 1.6 2014/11/04 22:31:55 nanard Exp $ */ 2 | /* Project: miniupnp 3 | * http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/ 4 | * Author: Thomas Bernard 5 | * Copyright (c) 2005-2014 Thomas Bernard 6 | * This software is subjects to the conditions detailed 7 | * in the LICENCE file provided within this distribution */ 8 | #ifndef MINIUPNPCSTRINGS_H_INCLUDED 9 | #define MINIUPNPCSTRINGS_H_INCLUDED 10 | 11 | #define OS_STRING "OS/version" 12 | #define MINIUPNPC_VERSION_STRING "version" 13 | 14 | #if 0 15 | /* according to "UPnP Device Architecture 1.0" */ 16 | #define UPNP_VERSION_STRING "UPnP/1.0" 17 | #else 18 | /* according to "UPnP Device Architecture 1.1" */ 19 | #define UPNP_VERSION_STRING "UPnP/1.1" 20 | #endif 21 | 22 | #endif 23 | 24 | -------------------------------------------------------------------------------- /external/miniupnpc/miniupnpctypes.h: -------------------------------------------------------------------------------- 1 | /* $Id: miniupnpctypes.h,v 1.1 2011/02/15 11:10:40 nanard Exp $ */ 2 | /* Miniupnp project : http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org 3 | * Author : Thomas Bernard 4 | * Copyright (c) 2011 Thomas Bernard 5 | * This software is subject to the conditions detailed in the 6 | * LICENCE file provided within this distribution */ 7 | #ifndef MINIUPNPCTYPES_H_INCLUDED 8 | #define MINIUPNPCTYPES_H_INCLUDED 9 | 10 | #if (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L) 11 | #define UNSIGNED_INTEGER unsigned long long 12 | #define STRTOUI strtoull 13 | #else 14 | #define UNSIGNED_INTEGER unsigned int 15 | #define STRTOUI strtoul 16 | #endif 17 | 18 | #endif 19 | 20 | -------------------------------------------------------------------------------- /external/miniupnpc/miniwget.h: -------------------------------------------------------------------------------- 1 | /* $Id: miniwget.h,v 1.12 2016/01/24 17:24:36 nanard Exp $ */ 2 | /* Project : miniupnp 3 | * Author : Thomas Bernard 4 | * Copyright (c) 2005-2016 Thomas Bernard 5 | * This software is subject to the conditions detailed in the 6 | * LICENCE file provided in this distribution. 7 | * */ 8 | #ifndef MINIWGET_H_INCLUDED 9 | #define MINIWGET_H_INCLUDED 10 | 11 | #include "miniupnpc_declspec.h" 12 | 13 | #ifdef __cplusplus 14 | extern "C" { 15 | #endif 16 | 17 | MINIUPNP_LIBSPEC void * getHTTPResponse(int s, int * size, int * status_code); 18 | 19 | MINIUPNP_LIBSPEC void * miniwget(const char *, int *, unsigned int, int *); 20 | 21 | MINIUPNP_LIBSPEC void * miniwget_getaddr(const char *, int *, char *, int, unsigned int, int *); 22 | 23 | int parseURL(const char *, char *, unsigned short *, char * *, unsigned int *); 24 | 25 | #ifdef __cplusplus 26 | } 27 | #endif 28 | 29 | #endif 30 | 31 | -------------------------------------------------------------------------------- /external/miniupnpc/minixml.h: -------------------------------------------------------------------------------- 1 | /* $Id: minixml.h,v 1.6 2006/11/30 11:47:21 nanard Exp $ */ 2 | /* minimal xml parser 3 | * 4 | * Project : miniupnp 5 | * Website : http://miniupnp.free.fr/ 6 | * Author : Thomas Bernard 7 | * Copyright (c) 2005 Thomas Bernard 8 | * This software is subject to the conditions detailed in the 9 | * LICENCE file provided in this distribution. 10 | * */ 11 | #ifndef MINIXML_H_INCLUDED 12 | #define MINIXML_H_INCLUDED 13 | #define IS_WHITE_SPACE(c) ((c==' ') || (c=='\t') || (c=='\r') || (c=='\n')) 14 | 15 | /* if a callback function pointer is set to NULL, 16 | * the function is not called */ 17 | struct xmlparser { 18 | const char *xmlstart; 19 | const char *xmlend; 20 | const char *xml; /* pointer to current character */ 21 | int xmlsize; 22 | void * data; 23 | void (*starteltfunc) (void *, const char *, int); 24 | void (*endeltfunc) (void *, const char *, int); 25 | void (*datafunc) (void *, const char *, int); 26 | void (*attfunc) (void *, const char *, int, const char *, int); 27 | }; 28 | 29 | /* parsexml() 30 | * the xmlparser structure must be initialized before the call 31 | * the following structure members have to be initialized : 32 | * xmlstart, xmlsize, data, *func 33 | * xml is for internal usage, xmlend is computed automatically */ 34 | void parsexml(struct xmlparser *); 35 | 36 | #endif 37 | 38 | -------------------------------------------------------------------------------- /external/miniupnpc/msvc/miniupnpc.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 10.00 3 | # Visual C++ Express 2008 4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "miniupnpc", "miniupnpc.vcproj", "{D28CE435-CB33-4BAE-8A52-C6EF915956F5}" 5 | EndProject 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "upnpc-static", "upnpc-static.vcproj", "{469E1CF6-08A2-4B7B-A2AA-5BDB089857C1}" 7 | ProjectSection(ProjectDependencies) = postProject 8 | {D28CE435-CB33-4BAE-8A52-C6EF915956F5} = {D28CE435-CB33-4BAE-8A52-C6EF915956F5} 9 | EndProjectSection 10 | EndProject 11 | Global 12 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 13 | Debug|Win32 = Debug|Win32 14 | Release|Win32 = Release|Win32 15 | EndGlobalSection 16 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 17 | {D28CE435-CB33-4BAE-8A52-C6EF915956F5}.Debug|Win32.ActiveCfg = Debug|Win32 18 | {D28CE435-CB33-4BAE-8A52-C6EF915956F5}.Debug|Win32.Build.0 = Debug|Win32 19 | {D28CE435-CB33-4BAE-8A52-C6EF915956F5}.Release|Win32.ActiveCfg = Release|Win32 20 | {D28CE435-CB33-4BAE-8A52-C6EF915956F5}.Release|Win32.Build.0 = Release|Win32 21 | {469E1CF6-08A2-4B7B-A2AA-5BDB089857C1}.Debug|Win32.ActiveCfg = Debug|Win32 22 | {469E1CF6-08A2-4B7B-A2AA-5BDB089857C1}.Debug|Win32.Build.0 = Debug|Win32 23 | {469E1CF6-08A2-4B7B-A2AA-5BDB089857C1}.Release|Win32.ActiveCfg = Release|Win32 24 | {469E1CF6-08A2-4B7B-A2AA-5BDB089857C1}.Release|Win32.Build.0 = Release|Win32 25 | EndGlobalSection 26 | GlobalSection(SolutionProperties) = preSolution 27 | HideSolutionNode = FALSE 28 | EndGlobalSection 29 | EndGlobal 30 | -------------------------------------------------------------------------------- /external/miniupnpc/msvc/miniupnpc.vcproj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BitChute/chutoken/845742c60c2211eb5f03dcabf9437f3a223ce543/external/miniupnpc/msvc/miniupnpc.vcproj -------------------------------------------------------------------------------- /external/miniupnpc/msvc/upnpc-static.vcproj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BitChute/chutoken/845742c60c2211eb5f03dcabf9437f3a223ce543/external/miniupnpc/msvc/upnpc-static.vcproj -------------------------------------------------------------------------------- /external/miniupnpc/receivedata.h: -------------------------------------------------------------------------------- 1 | /* $Id: receivedata.h,v 1.3 2012/06/23 22:34:47 nanard Exp $ */ 2 | /* Project: miniupnp 3 | * http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/ 4 | * Author: Thomas Bernard 5 | * Copyright (c) 2011-2012 Thomas Bernard 6 | * This software is subjects to the conditions detailed 7 | * in the LICENCE file provided within this distribution */ 8 | #ifndef RECEIVEDATA_H_INCLUDED 9 | #define RECEIVEDATA_H_INCLUDED 10 | 11 | /* Reads data from the specified socket. 12 | * Returns the number of bytes read if successful, zero if no bytes were 13 | * read or if we timed out. Returns negative if there was an error. */ 14 | int receivedata(int socket, 15 | char * data, int length, 16 | int timeout, unsigned int * scope_id); 17 | 18 | #endif 19 | 20 | -------------------------------------------------------------------------------- /external/miniupnpc/setup.py: -------------------------------------------------------------------------------- 1 | #! /usr/bin/python 2 | # vim: tabstop=8 shiftwidth=8 expandtab 3 | # $Id: setup.py,v 1.9 2012/05/23 08:50:10 nanard Exp $ 4 | # the MiniUPnP Project (c) 2007-2014 Thomas Bernard 5 | # http://miniupnp.tuxfamily.org/ or http://miniupnp.free.fr/ 6 | # 7 | # python script to build the miniupnpc module under unix 8 | # 9 | # replace libminiupnpc.a by libminiupnpc.so for shared library usage 10 | try: 11 | from setuptools import setup, Extension 12 | except ImportError: 13 | from distutils.core import setup, Extension 14 | from distutils import sysconfig 15 | sysconfig.get_config_vars()["OPT"] = '' 16 | sysconfig.get_config_vars()["CFLAGS"] = '' 17 | setup(name="miniupnpc", 18 | version=open('VERSION').read().strip(), 19 | author='Thomas BERNARD', 20 | author_email='miniupnp@free.fr', 21 | license=open('LICENSE').read(), 22 | url='http://miniupnp.free.fr/', 23 | description='miniUPnP client', 24 | ext_modules=[ 25 | Extension(name="miniupnpc", sources=["miniupnpcmodule.c"], 26 | extra_objects=["libminiupnpc.a"]) 27 | ]) 28 | 29 | -------------------------------------------------------------------------------- /external/miniupnpc/setupmingw32.py: -------------------------------------------------------------------------------- 1 | #! /usr/bin/python 2 | # vim: tabstop=8 shiftwidth=8 expandtab 3 | # $Id: setupmingw32.py,v 1.8 2012/05/23 08:50:10 nanard Exp $ 4 | # the MiniUPnP Project (c) 2007-2014 Thomas Bernard 5 | # http://miniupnp.tuxfamily.org/ or http://miniupnp.free.fr/ 6 | # 7 | # python script to build the miniupnpc module under windows (using mingw32) 8 | # 9 | try: 10 | from setuptools import setup, Extension 11 | except ImportError: 12 | from distutils.core import setup, Extension 13 | from distutils import sysconfig 14 | sysconfig.get_config_vars()["OPT"] = '' 15 | sysconfig.get_config_vars()["CFLAGS"] = '' 16 | setup(name="miniupnpc", 17 | version=open('VERSION').read().strip(), 18 | author='Thomas BERNARD', 19 | author_email='miniupnp@free.fr', 20 | license=open('LICENSE').read(), 21 | url='http://miniupnp.free.fr/', 22 | description='miniUPnP client', 23 | ext_modules=[ 24 | Extension(name="miniupnpc", sources=["miniupnpcmodule.c"], 25 | libraries=["ws2_32", "iphlpapi"], 26 | extra_objects=["libminiupnpc.a"]) 27 | ]) 28 | 29 | -------------------------------------------------------------------------------- /external/miniupnpc/testdesc/linksys_WAG200G_desc.values: -------------------------------------------------------------------------------- 1 | # values for linksys_WAG200G_desc.xml 2 | 3 | CIF: 4 | servicetype = urn:schemas-upnp-org:service:WANCommonInterfaceConfig:1 5 | controlurl = /upnp/control/WANCommonIFC1 6 | eventsuburl = /upnp/event/WANCommonIFC1 7 | scpdurl = /cmnicfg.xml 8 | 9 | first: 10 | servicetype = urn:schemas-upnp-org:service:WANPPPConnection:1 11 | controlurl = /upnp/control/WANPPPConn1 12 | eventsuburl = /upnp/event/WANPPPConn1 13 | scpdurl = /pppcfg.xml 14 | 15 | -------------------------------------------------------------------------------- /external/miniupnpc/testdesc/new_LiveBox_desc.values: -------------------------------------------------------------------------------- 1 | # values for new_LiveBox_desc.xml 2 | 3 | CIF: 4 | servicetype = urn:schemas-upnp-org:service:WANCommonInterfaceConfig:1 5 | controlurl = /87895a19/upnp/control/WANCommonIFC1 6 | eventsuburl = /87895a19/upnp/control/WANCommonIFC1 7 | scpdurl = /87895a19/gateicfgSCPD.xml 8 | 9 | first: 10 | servicetype = urn:schemas-upnp-org:service:WANPPPConnection:2 11 | controlurl = /87895a19/upnp/control/WANIPConn1 12 | eventsuburl = /87895a19/upnp/control/WANIPConn1 13 | scpdurl = /87895a19/gateconnSCPD_PPP.xml 14 | 15 | IPv6FC: 16 | servicetype = urn:schemas-upnp-org:service:WANIPv6FirewallControl:1 17 | controlurl = /87895a19/upnp/control/WANIPv6FwCtrl1 18 | eventsuburl = /87895a19/upnp/control/WANIPv6FwCtrl1 19 | scpdurl = /87895a19/wanipv6fwctrlSCPD.xml 20 | 21 | -------------------------------------------------------------------------------- /external/miniupnpc/testreplyparse/DeletePortMapping.namevalue: -------------------------------------------------------------------------------- 1 | NewRemoteHost= 2 | NewExternalPort=123 3 | NewProtocol=TCP 4 | -------------------------------------------------------------------------------- /external/miniupnpc/testreplyparse/DeletePortMapping.xml: -------------------------------------------------------------------------------- 1 | 2 | 123 3 | TCP 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /external/miniupnpc/testreplyparse/GetExternalIPAddress.namevalue: -------------------------------------------------------------------------------- 1 | NewExternalIPAddress=1.2.3.4 2 | 3 | -------------------------------------------------------------------------------- /external/miniupnpc/testreplyparse/GetExternalIPAddress.xml: -------------------------------------------------------------------------------- 1 | 1.2.3.4 2 | 3 | -------------------------------------------------------------------------------- /external/miniupnpc/testreplyparse/GetSpecificPortMappingEntryReq.namevalue: -------------------------------------------------------------------------------- 1 | NewProtocol=UDP 2 | NewExternalPort=12345 3 | NewRemoteHost= 4 | -------------------------------------------------------------------------------- /external/miniupnpc/testreplyparse/GetSpecificPortMappingEntryReq.xml: -------------------------------------------------------------------------------- 1 | 2 | 12345UDP 3 | 4 | -------------------------------------------------------------------------------- /external/miniupnpc/testreplyparse/GetSpecificPortMappingEntryResp.namevalue: -------------------------------------------------------------------------------- 1 | NewInternalPort=12345 2 | NewInternalClient=192.168.10.110 3 | NewEnabled=1 4 | NewPortMappingDescription=libminiupnpc 5 | NewLeaseDuration=0 6 | -------------------------------------------------------------------------------- /external/miniupnpc/testreplyparse/GetSpecificPortMappingEntryResp.xml: -------------------------------------------------------------------------------- 1 | 12345192.168.10.1101libminiupnpc0 2 | 3 | -------------------------------------------------------------------------------- /external/miniupnpc/testreplyparse/SetDefaultConnectionService.namevalue: -------------------------------------------------------------------------------- 1 | NewDefaultConnectionService=uuid:c6c05a33-f704-48df-9910-e099b3471d81:WANConnectionDevice:1,INVALID_SERVICE_ID 2 | -------------------------------------------------------------------------------- /external/miniupnpc/testreplyparse/SetDefaultConnectionService.xml: -------------------------------------------------------------------------------- 1 | uuid:c6c05a33-f704-48df-9910-e099b3471d81:WANConnectionDevice:1,INVALID_SERVICE_ID 2 | -------------------------------------------------------------------------------- /external/miniupnpc/testreplyparse/readme.txt: -------------------------------------------------------------------------------- 1 | This directory contains files used for validation of upnpreplyparse.c code. 2 | 3 | Each .xml file to parse should give the results which are in the .namevalue 4 | file. 5 | 6 | A .namevalue file contain name=value lines. 7 | 8 | -------------------------------------------------------------------------------- /external/miniupnpc/testupnpreplyparse.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | for f in testreplyparse/*.xml ; do 4 | bf="`dirname $f`/`basename $f .xml`" 5 | if ./testupnpreplyparse $f $bf.namevalue ; then 6 | echo "$f : passed" 7 | else 8 | echo "$f : FAILED" 9 | exit 1 10 | fi 11 | done 12 | 13 | exit 0 14 | 15 | -------------------------------------------------------------------------------- /external/miniupnpc/upnpdev.c: -------------------------------------------------------------------------------- 1 | /* $Id: upnpdev.c,v 1.1 2015/08/28 12:14:19 nanard Exp $ */ 2 | /* Project : miniupnp 3 | * Web : http://miniupnp.free.fr/ 4 | * Author : Thomas BERNARD 5 | * copyright (c) 2005-2015 Thomas Bernard 6 | * This software is subjet to the conditions detailed in the 7 | * provided LICENSE file. */ 8 | #include 9 | #include "upnpdev.h" 10 | 11 | /* freeUPNPDevlist() should be used to 12 | * free the chained list returned by upnpDiscover() */ 13 | void freeUPNPDevlist(struct UPNPDev * devlist) 14 | { 15 | struct UPNPDev * next; 16 | while(devlist) 17 | { 18 | next = devlist->pNext; 19 | free(devlist); 20 | devlist = next; 21 | } 22 | } 23 | 24 | -------------------------------------------------------------------------------- /external/miniupnpc/upnpdev.h: -------------------------------------------------------------------------------- 1 | /* $Id: upnpdev.h,v 1.1 2015/08/28 12:14:19 nanard Exp $ */ 2 | /* Project : miniupnp 3 | * Web : http://miniupnp.free.fr/ 4 | * Author : Thomas BERNARD 5 | * copyright (c) 2005-2015 Thomas Bernard 6 | * This software is subjet to the conditions detailed in the 7 | * provided LICENSE file. */ 8 | #ifndef UPNPDEV_H_INCLUDED 9 | #define UPNPDEV_H_INCLUDED 10 | 11 | #include "miniupnpc_declspec.h" 12 | 13 | #ifdef __cplusplus 14 | extern "C" { 15 | #endif 16 | 17 | struct UPNPDev { 18 | struct UPNPDev * pNext; 19 | char * descURL; 20 | char * st; 21 | unsigned int scope_id; 22 | char * usn; 23 | char buffer[3]; 24 | }; 25 | 26 | /* freeUPNPDevlist() 27 | * free list returned by upnpDiscover() */ 28 | MINIUPNP_LIBSPEC void freeUPNPDevlist(struct UPNPDev * devlist); 29 | 30 | 31 | #ifdef __cplusplus 32 | } 33 | #endif 34 | 35 | 36 | #endif /* UPNPDEV_H_INCLUDED */ 37 | -------------------------------------------------------------------------------- /external/miniupnpc/upnperrors.h: -------------------------------------------------------------------------------- 1 | /* $Id: upnperrors.h,v 1.2 2008/07/02 23:31:15 nanard Exp $ */ 2 | /* (c) 2007-2015 Thomas Bernard 3 | * All rights reserved. 4 | * MiniUPnP Project. 5 | * http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/ 6 | * This software is subjet to the conditions detailed in the 7 | * provided LICENCE file. */ 8 | #ifndef UPNPERRORS_H_INCLUDED 9 | #define UPNPERRORS_H_INCLUDED 10 | 11 | #include "miniupnpc_declspec.h" 12 | 13 | #ifdef __cplusplus 14 | extern "C" { 15 | #endif 16 | 17 | /* strupnperror() 18 | * Return a string description of the UPnP error code 19 | * or NULL for undefinded errors */ 20 | MINIUPNP_LIBSPEC const char * strupnperror(int err); 21 | 22 | #ifdef __cplusplus 23 | } 24 | #endif 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /external/unbound/README: -------------------------------------------------------------------------------- 1 | Unbound README 2 | * ./configure && make && make install 3 | * You can use libevent if you want. libevent is useful when using 4 | many (10000) outgoing ports. By default max 256 ports are opened at 5 | the same time and the builtin alternative is equally capable and a 6 | little faster. 7 | * More detailed README, README.svn, README.tests in doc directory 8 | * manual pages can be found in doc directory, and are installed, unbound(8). 9 | * example configuration file doc/example.conf 10 | 11 | -------------------------------------------------------------------------------- /external/unbound/compat/ctime_r.c: -------------------------------------------------------------------------------- 1 | /* taken from ldns 1.6.1 */ 2 | #include "config.h" 3 | #ifdef HAVE_TIME_H 4 | #include 5 | #endif 6 | #include "util/locks.h" 7 | 8 | /** the lock for ctime buffer */ 9 | static lock_basic_type ctime_lock; 10 | /** has it been inited */ 11 | static int ctime_r_init = 0; 12 | 13 | /** cleanup ctime_r on exit */ 14 | static void 15 | ctime_r_cleanup(void) 16 | { 17 | if(ctime_r_init) { 18 | ctime_r_init = 0; 19 | lock_basic_destroy(&ctime_lock); 20 | } 21 | } 22 | 23 | char *ctime_r(const time_t *timep, char *buf) 24 | { 25 | char* result; 26 | if(!ctime_r_init) { 27 | /* still small race where this init can be done twice, 28 | * which is mostly harmless */ 29 | ctime_r_init = 1; 30 | lock_basic_init(&ctime_lock); 31 | atexit(&ctime_r_cleanup); 32 | } 33 | lock_basic_lock(&ctime_lock); 34 | result = ctime(timep); 35 | if(buf && result) { 36 | if(strlen(result) > 10 && result[7]==' ' && result[8]=='0') 37 | result[8]=' '; /* fix error in windows ctime */ 38 | strcpy(buf, result); 39 | } 40 | lock_basic_unlock(&ctime_lock); 41 | return result; 42 | } 43 | -------------------------------------------------------------------------------- /external/unbound/compat/explicit_bzero.c: -------------------------------------------------------------------------------- 1 | /* $OpenBSD: explicit_bzero.c,v 1.3 2014/06/21 02:34:26 matthew Exp $ */ 2 | /* 3 | * Public domain. 4 | * Written by Matthew Dempsky. 5 | */ 6 | #include "config.h" 7 | #include 8 | 9 | #ifdef HAVE_ATTR_WEAK 10 | __attribute__((weak)) void 11 | #else 12 | void 13 | #endif 14 | __explicit_bzero_hook(void *ATTR_UNUSED(buf), size_t ATTR_UNUSED(len)) 15 | { 16 | } 17 | 18 | void 19 | explicit_bzero(void *buf, size_t len) 20 | { 21 | #ifdef UB_ON_WINDOWS 22 | SecureZeroMemory(buf, len); 23 | #endif 24 | memset(buf, 0, len); 25 | __explicit_bzero_hook(buf, len); 26 | } 27 | -------------------------------------------------------------------------------- /external/unbound/compat/malloc.c: -------------------------------------------------------------------------------- 1 | /* Just a replacement, if the original malloc is not 2 | GNU-compliant. See autoconf documentation. */ 3 | 4 | #include "config.h" 5 | #undef malloc 6 | #include 7 | 8 | void *malloc (); 9 | 10 | /* Allocate an N-byte block of memory from the heap. 11 | If N is zero, allocate a 1-byte block. */ 12 | 13 | void * 14 | rpl_malloc_unbound (size_t n) 15 | { 16 | if (n == 0) 17 | n = 1; 18 | return malloc (n); 19 | } 20 | -------------------------------------------------------------------------------- /external/unbound/compat/memcmp.c: -------------------------------------------------------------------------------- 1 | /* 2 | * memcmp.c: memcmp compat implementation. 3 | * 4 | * Copyright (c) 2010, NLnet Labs. All rights reserved. 5 | * 6 | * See LICENSE for the license. 7 | */ 8 | 9 | #include 10 | 11 | int memcmp(const void *x, const void *y, size_t n); 12 | 13 | int memcmp(const void *x, const void *y, size_t n) 14 | { 15 | const uint8_t* x8 = (const uint8_t*)x; 16 | const uint8_t* y8 = (const uint8_t*)y; 17 | size_t i; 18 | for(i=0; i y8[i]) 22 | return 1; 23 | } 24 | return 0; 25 | } 26 | -------------------------------------------------------------------------------- /external/unbound/compat/memcmp.h: -------------------------------------------------------------------------------- 1 | /* 2 | * memcmp.h: undef memcmp for compat. 3 | * 4 | * Copyright (c) 2012, NLnet Labs. All rights reserved. 5 | * 6 | * See LICENSE for the license. 7 | */ 8 | #ifndef COMPAT_MEMCMP_H 9 | #define COMPAT_MEMCMP_H 10 | 11 | #ifdef memcmp 12 | /* undef here otherwise autoheader messes it up in config.h */ 13 | # undef memcmp 14 | #endif 15 | 16 | #endif /* COMPAT_MEMCMP_H */ 17 | -------------------------------------------------------------------------------- /external/unbound/compat/memmove.c: -------------------------------------------------------------------------------- 1 | /* 2 | * memmove.c: memmove compat implementation. 3 | * 4 | * Copyright (c) 2001-2006, NLnet Labs. All rights reserved. 5 | * 6 | * See LICENSE for the license. 7 | */ 8 | 9 | #include 10 | #include 11 | 12 | void *memmove(void *dest, const void *src, size_t n); 13 | 14 | void *memmove(void *dest, const void *src, size_t n) 15 | { 16 | uint8_t* from = (uint8_t*) src; 17 | uint8_t* to = (uint8_t*) dest; 18 | 19 | if (from == to || n == 0) 20 | return dest; 21 | if (to > from && to-from < (int)n) { 22 | /* to overlaps with from */ 23 | /* */ 24 | /* */ 25 | /* copy in reverse, to avoid overwriting from */ 26 | int i; 27 | for(i=n-1; i>=0; i--) 28 | to[i] = from[i]; 29 | return dest; 30 | } 31 | if (from > to && from-to < (int)n) { 32 | /* to overlaps with from */ 33 | /* */ 34 | /* */ 35 | /* copy forwards, to avoid overwriting from */ 36 | size_t i; 37 | for(i=0; i${localzonefile}" ) or die( "Could not open ${localzonefile}: $!" ); 13 | 14 | print ZONE "server:\n\n"; 15 | print ZONE "local-zone: \"${localzone}\" transparent\n\n"; 16 | 17 | my %ptrhash; 18 | 19 | while ( my $hostline = ) { 20 | 21 | # Skip comments 22 | if ( $hostline !~ "^#" and $hostline !~ '^\s+$' ) { 23 | 24 | my @entries = split( /\s+/, $hostline ); 25 | 26 | my $ip; 27 | 28 | my $count = 0; 29 | foreach my $entry ( @entries ) { 30 | if ( $count == 0 ) { 31 | $ip = $entry; 32 | } else { 33 | 34 | if ( $count == 1) { 35 | 36 | # Only return localhost for 127.0.0.1 and ::1 37 | if ( ($ip ne '127.0.0.1' and $ip ne '::1') or $entry =~ 'localhost' ) { 38 | if ( ! defined $ptrhash{$ip} ) { 39 | $ptrhash{$ip} = $entry; 40 | print ZONE "local-data-ptr: \"$ip $entry\"\n"; 41 | } 42 | } 43 | 44 | } 45 | 46 | # Use AAAA for IPv6 addresses 47 | my $a = 'A'; 48 | if ( $ip =~ ':' ) { 49 | $a = 'AAAA'; 50 | } 51 | 52 | print ZONE "local-data: \"$entry ${a} $ip\"\n"; 53 | 54 | } 55 | $count++; 56 | } 57 | print ZONE "\n"; 58 | 59 | 60 | } 61 | } 62 | 63 | 64 | 65 | 66 | __END__ 67 | 68 | -------------------------------------------------------------------------------- /external/unbound/contrib/create_unbound_ad_servers.cmd: -------------------------------------------------------------------------------- 1 | @Echo off 2 | rem Convert the Yoyo.org anti-ad server listing 3 | rem into an unbound dns spoof redirection list. 4 | rem Written by Y.Voinov (c) 2014 5 | 6 | rem Note: Wget required! 7 | 8 | rem Variables 9 | set prefix="C:\Program Files (x86)" 10 | set dst_dir=%prefix%\Unbound 11 | set work_dir=%TEMP% 12 | set list_addr="http://pgl.yoyo.org/adservers/serverlist.php?hostformat=nohtml&showintro=1&startdate%5Bday%5D=&startdate%5Bmonth%5D=&startdate%5Byear%5D=" 13 | 14 | rem Check Wget installed 15 | for /f "delims=" %%a in ('where wget') do @set wget=%%a 16 | if /I "%wget%"=="" echo Wget not found. If installed, add path to PATH environment variable. & exit 1 17 | echo Wget found: %wget% 18 | 19 | "%wget%" -O %work_dir%\yoyo_ad_servers %list_addr% 20 | 21 | del /Q /F /S %dst_dir%\unbound_ad_servers 22 | 23 | for /F "eol=; tokens=*" %%a in (%work_dir%\yoyo_ad_servers) do ( 24 | echo local-zone: %%a redirect>>%dst_dir%\unbound_ad_servers 25 | echo local-data: "%%a A 127.0.0.1">>%dst_dir%\unbound_ad_servers 26 | ) 27 | 28 | echo Done. 29 | rem then add an include line to your unbound.conf pointing to the full path of 30 | rem the unbound_ad_servers file: 31 | rem 32 | rem include: $dst_dir/unbound_ad_servers 33 | rem 34 | -------------------------------------------------------------------------------- /external/unbound/contrib/create_unbound_ad_servers.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Convert the Yoyo.org anti-ad server listing 4 | # into an unbound dns spoof redirection list. 5 | # Modified by Y.Voinov (c) 2014 6 | 7 | # Note: Wget required! 8 | 9 | # Variables 10 | dst_dir="/etc/opt/csw/unbound" 11 | work_dir="/tmp" 12 | list_addr="http://pgl.yoyo.org/adservers/serverlist.php?hostformat=nohtml&showintro=1&startdate%5Bday%5D=&startdate%5Bmonth%5D=&startdate%5Byear%5D=" 13 | 14 | # OS commands 15 | CAT=`which cat` 16 | ECHO=`which echo` 17 | WGET=`which wget` 18 | 19 | # Check Wget installed 20 | if [ ! -f $WGET ]; then 21 | echo "Wget not found. Exiting..." 22 | exit 1 23 | fi 24 | 25 | $WGET -O $work_dir/yoyo_ad_servers "$list_addr" && \ 26 | $CAT $work_dir/yoyo_ad_servers | \ 27 | while read line ; \ 28 | do \ 29 | $ECHO "local-zone: \"$line\" redirect" ;\ 30 | $ECHO "local-data: \"$line A 127.0.0.1\"" ;\ 31 | done > \ 32 | $dst_dir/unbound_ad_servers 33 | 34 | echo "Done." 35 | # then add an include line to your unbound.conf pointing to the full path of 36 | # the unbound_ad_servers file: 37 | # 38 | # include: $dst_dir/unbound_ad_servers 39 | # 40 | -------------------------------------------------------------------------------- /external/unbound/contrib/patch_rsamd5_enable.diff: -------------------------------------------------------------------------------- 1 | Index: validator/val_secalgo.c 2 | =================================================================== 3 | --- validator/val_secalgo.c (revision 2759) 4 | +++ validator/val_secalgo.c (working copy) 5 | @@ -153,7 +153,7 @@ 6 | switch(id) { 7 | case LDNS_RSAMD5: 8 | /* RFC 6725 deprecates RSAMD5 */ 9 | - return 0; 10 | + return 1; 11 | case LDNS_DSA: 12 | case LDNS_DSA_NSEC3: 13 | case LDNS_RSASHA1: 14 | @@ -617,7 +617,7 @@ 15 | switch(id) { 16 | case LDNS_RSAMD5: 17 | /* RFC 6725 deprecates RSAMD5 */ 18 | - return 0; 19 | + return 1; 20 | case LDNS_DSA: 21 | case LDNS_DSA_NSEC3: 22 | case LDNS_RSASHA1: 23 | -------------------------------------------------------------------------------- /external/unbound/contrib/rc_d_unbound: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # unbound freebsd startup rc.d script, modified from the named script. 4 | # uses the default unbound installation path and pidfile location. 5 | # copy this to /etc/rc.d/unbound 6 | # and put unbound_enable="YES" into rc.conf 7 | # 8 | 9 | # PROVIDE: unbound 10 | # REQUIRE: SERVERS cleanvar 11 | # KEYWORD: shutdown 12 | 13 | . /etc/rc.subr 14 | 15 | name="unbound" 16 | rcvar=`set_rcvar` 17 | 18 | load_rc_config $name 19 | 20 | command="/usr/local/sbin/unbound" 21 | pidfile=${unbound_pidfile:-"/usr/local/etc/unbound/unbound.pid"} 22 | command_args=${unbound_flags:-"-c /usr/local/etc/unbound/unbound.conf"} 23 | extra_commands="reload" 24 | 25 | run_rc_command "$1" 26 | -------------------------------------------------------------------------------- /external/unbound/contrib/selinux/unbound.fc: -------------------------------------------------------------------------------- 1 | /etc/unbound(/.*)? system_u:object_r:unbound_conf_t:s0 2 | /etc/rc\.d/init\.d/unbound -- system_u:object_r:unbound_initrc_exec_t:s0 3 | /usr/sbin/unbound -- system_u:object_r:unbound_exec_t:s0 4 | /var/run/unbound(/.*)? system_u:object_r:unbound_var_run_t:s0 5 | -------------------------------------------------------------------------------- /external/unbound/contrib/selinux/unbound.te: -------------------------------------------------------------------------------- 1 | policy_module(unbound, 0.1.0) 2 | 3 | type unbound_t; 4 | type unbound_conf_t; 5 | type unbound_exec_t; 6 | type unbound_initrc_exec_t; 7 | type unbound_var_run_t; 8 | 9 | init_daemon_domain(unbound_t, unbound_exec_t) 10 | init_script_file(unbound_initrc_exec_t) 11 | 12 | role system_r types unbound_t; 13 | 14 | # XXX 15 | # unbound-{checkconf,control} are not protected. Do we need protect them? 16 | 17 | # Unbound daemon 18 | 19 | auth_use_nsswitch(unbound_t) 20 | dev_read_urand(unbound_t) 21 | corenet_all_recvfrom_unlabeled(unbound_t) 22 | corenet_tcp_bind_all_nodes(unbound_t) 23 | corenet_tcp_bind_dns_port(unbound_t) 24 | corenet_tcp_bind_rndc_port(unbound_t) 25 | corenet_udp_bind_all_nodes(unbound_t) 26 | corenet_udp_bind_all_unreserved_ports(unbound_t) 27 | corenet_udp_bind_dns_port(unbound_t) 28 | files_read_etc_files(unbound_t) 29 | files_pid_file(unbound_var_run_t) 30 | files_type(unbound_conf_t) 31 | libs_use_ld_so(unbound_t) 32 | libs_use_shared_libs(unbound_t) 33 | logging_send_syslog_msg(unbound_t) 34 | manage_files_pattern(unbound_t, unbound_var_run_t, unbound_var_run_t) 35 | miscfiles_read_localization(unbound_t) 36 | read_files_pattern(unbound_t, unbound_conf_t, unbound_conf_t) 37 | 38 | allow unbound_t self:capability { setuid chown net_bind_service setgid dac_override }; 39 | allow unbound_t self:tcp_socket create_stream_socket_perms; 40 | allow unbound_t self:udp_socket create_socket_perms; 41 | 42 | ################################################### 43 | -------------------------------------------------------------------------------- /external/unbound/contrib/unbound.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 17 | 18 | Label 19 | unbound 20 | 21 | ProgramArguments 22 | 23 | unbound 24 | 25 | 26 | UserName 27 | unbound 28 | 29 | RootDirectory 30 | /usr/local/etc/unbound 31 | 32 | WorkingDirectory 33 | /usr/local/etc/unbound 34 | 35 | KeepAlive 36 | 37 | 38 | RunAtLoad 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /external/unbound/contrib/unbound_cacti.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BitChute/chutoken/845742c60c2211eb5f03dcabf9437f3a223ce543/external/unbound/contrib/unbound_cacti.tar.gz -------------------------------------------------------------------------------- /external/unbound/contrib/unbound_smf22.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BitChute/chutoken/845742c60c2211eb5f03dcabf9437f3a223ce543/external/unbound/contrib/unbound_smf22.tar.gz -------------------------------------------------------------------------------- /external/unbound/dnscrypt/cert.h: -------------------------------------------------------------------------------- 1 | #ifndef UNBOUND_DNSCRYPT_CERT_H 2 | #define UNBOUND_DNSCRYPT_CERT_H 3 | 4 | /** 5 | * \file 6 | * certificate type for dnscrypt for use in other header files 7 | */ 8 | 9 | #include 10 | #define CERT_MAGIC_CERT "DNSC" 11 | #define CERT_MAJOR_VERSION 1 12 | #define CERT_MINOR_VERSION 0 13 | #define CERT_OLD_MAGIC_HEADER "7PYqwfzt" 14 | 15 | #define CERT_FILE_EXPIRE_DAYS 365 16 | 17 | struct SignedCert { 18 | uint8_t magic_cert[4]; 19 | uint8_t version_major[2]; 20 | uint8_t version_minor[2]; 21 | 22 | // Signed Content 23 | uint8_t server_publickey[crypto_box_PUBLICKEYBYTES]; 24 | uint8_t magic_query[8]; 25 | uint8_t serial[4]; 26 | uint8_t ts_begin[4]; 27 | uint8_t ts_end[4]; 28 | uint8_t end[64]; 29 | }; 30 | 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /external/unbound/dnscrypt/dnscrypt.m4: -------------------------------------------------------------------------------- 1 | # dnscrypt.m4 2 | 3 | # dnsc_DNSCRYPT([action-if-true], [action-if-false]) 4 | # -------------------------------------------------------------------------- 5 | # Check for required dnscrypt libraries and add dnscrypt configure args. 6 | AC_DEFUN([dnsc_DNSCRYPT], 7 | [ 8 | AC_ARG_ENABLE([dnscrypt], 9 | AS_HELP_STRING([--enable-dnscrypt], 10 | [Enable dnscrypt support (requires libsodium)]), 11 | [opt_dnscrypt=$enableval], [opt_dnscrypt=no]) 12 | 13 | if test "x$opt_dnscrypt" != "xno"; then 14 | AC_ARG_WITH([libsodium], AC_HELP_STRING([--with-libsodium=path], 15 | [Path where libsodium is installed, for dnscrypt]), [ 16 | CFLAGS="$CFLAGS -I$withval/include" 17 | LDFLAGS="$LDFLAGS -L$withval/lib" 18 | ]) 19 | AC_SEARCH_LIBS([sodium_init], [sodium], [], 20 | AC_MSG_ERROR([The sodium library was not found. Please install sodium!])) 21 | $1 22 | else 23 | $2 24 | fi 25 | ]) 26 | -------------------------------------------------------------------------------- /external/unbound/dnscrypt/dnscrypt_config.h: -------------------------------------------------------------------------------- 1 | #ifndef UNBOUND_DNSCRYPT_CONFIG_H 2 | #define UNBOUND_DNSCRYPT_CONFIG_H 3 | 4 | /* 5 | * Process this file (dnscrypt_config.h.in) with AC_CONFIG_FILES to generate 6 | * dnscrypt_config.h. 7 | * 8 | * This file exists so that USE_DNSCRYPT can be used without including config.h. 9 | */ 10 | 11 | #if 0 /* ENABLE_DNSCRYPT */ 12 | # ifndef USE_DNSCRYPT 13 | # define USE_DNSCRYPT 1 14 | # endif 15 | #endif 16 | 17 | #endif /* UNBOUND_DNSCRYPT_CONFIG_H */ 18 | -------------------------------------------------------------------------------- /external/unbound/dnstap/dnstap_config.h.in: -------------------------------------------------------------------------------- 1 | #ifndef UNBOUND_DNSTAP_CONFIG_H 2 | #define UNBOUND_DNSTAP_CONFIG_H 3 | 4 | /* 5 | * Process this file (dnstap_config.h.in) with AC_CONFIG_FILES to generate 6 | * dnstap_config.h. 7 | * 8 | * This file exists so that USE_DNSTAP can be used without including config.h. 9 | */ 10 | 11 | #if @ENABLE_DNSTAP@ /* ENABLE_DNSTAP */ 12 | # ifndef USE_DNSTAP 13 | # define USE_DNSTAP 1 14 | # endif 15 | #endif 16 | 17 | #endif /* UNBOUND_DNSTAP_CONFIG_H */ 18 | -------------------------------------------------------------------------------- /external/unbound/doc/CREDITS: -------------------------------------------------------------------------------- 1 | Unbound was developed at NLnet Labs by Wouter Wijngaards. 2 | 3 | Unbound was architected in January of 2004 by Jakob Schlyter of Kirei 4 | and Roy Arends of Nominet. VeriSign and EP.Net funded development of 5 | the prototype, which was built by David Blacka and Matt Larson of VeriSign. 6 | Late in 2006, NLnet Labs joined the effort, writing an implementation in C 7 | based on the existing prototype and using experience NLnet Labs gained 8 | during the development of NSD, an authoritative DNS server. 9 | 10 | At NLnet Labs, Jelte Jansen, Mark Santcroos and Matthijs Mekking 11 | reviewed the unbound C sources. 12 | 13 | Jakob Schlyter - for advice on secure settings, random numbers and blacklists. 14 | Ondřej Surý - running coverity analysis tool on 0.9 dev version. 15 | Alexander Gall - multihomed, anycast testing of unbound resolver server. 16 | Zdenek Vasicek and Marek Vavrusa - python module. 17 | cz.nic - sponsoring 'summer of code' development by Zdenek and Marek. 18 | Brett Carr - windows beta testing. 19 | Luca Bruno - patch for windows support in libunbound hosts and resolvconf(). 20 | Tom Hendrikx - contributed split-itar.sh a useful script to 5011-track ITAR. 21 | Daisuke HIGASHI - patch for rrset-roundrobin and minimal-responses. 22 | Simon Perrault - DNS64 module. 23 | Robert Edmonds - dnstap code. 24 | -------------------------------------------------------------------------------- /external/unbound/doc/README.DNS64: -------------------------------------------------------------------------------- 1 | The DNS64 code was written by Viagenie, 2009, by Simon Perrault as part 2 | of the Ecdysis project. The code is copyright by them, and has the BSD 3 | license (see the dns64/dns64.c file). 4 | 5 | To enable DNS64 functionality in Unbound, two directives in unbound.conf must 6 | be edited: 7 | 8 | 1. The "module-config" directive must start with "dns64". For example: 9 | 10 | module-config: "dns64 validator iterator" 11 | 12 | If you're not using DNSSEC then you may remove "validator". 13 | 14 | 2. The "dns64-prefix" directive indicates your DNS64 prefix. For example: 15 | 16 | dns64-prefix: 64:FF9B::/96 17 | 18 | The prefix must be a /96 or shorter. 19 | 20 | To test that things are working right, perform a query against Unbound for a 21 | domain name for which no AAAA record exists. You should see a AAAA record in 22 | the answer section. The corresponding IPv6 address will be inside the DNS64 23 | prefix. For example: 24 | 25 | $ unbound -c unbound.conf 26 | $ dig @localhost jazz-v4.viagenie.ca aaaa 27 | [...] 28 | ;; ANSWER SECTION: 29 | jazz-v4.viagenie.ca. 86400 IN AAAA 64:ff9b::ce7b:1f02 30 | 31 | -------------------------------------------------------------------------------- /external/unbound/doc/README.svn: -------------------------------------------------------------------------------- 1 | README.svn 2 | 3 | For a svn checkout: 4 | * configure script, aclocal.m4, as well as yacc/lex output files are 5 | committed to the repository. 6 | * use --enable-debug flag for configure to enable dependency tracking and 7 | assertions, otherwise, use make clean; make after svn update. 8 | 9 | * Note changes in the Changelog. 10 | * Every check-in a postcommit hook is run 11 | (the postcommit hook is in the svn/unbound/hooks directory). 12 | * generates commit email with your changes and comment. 13 | * compiles and runs the tests (with testcode/do-tests.sh). 14 | * If build errors or test errors happen 15 | * Please fix your errors and commit again. 16 | 17 | * Use gnu make to compile, make or 'gmake'. 18 | -------------------------------------------------------------------------------- /external/unbound/doc/README.tests: -------------------------------------------------------------------------------- 1 | README unbound tests 2 | 3 | For a quick test that runs unit tests and state machine tests, use 4 | make test 5 | 6 | There is a long test setup for unbound that needs tools installed. Use 7 | make longtest 8 | To make and run the long tests. The results are summarized at the end. 9 | 10 | You need to have the following programs installed and in your PATH. 11 | * dig - from the bind-tools package. Used to send DNS queries. 12 | * splint (optional) - for lint test 13 | * doxygen (optional) - for doc completeness test 14 | * ldns-testns - from ldns examples. Used as DNS auth server. 15 | * xxd and nc (optional) - for (malformed) packet transmission. 16 | The optional programs are detected and can be omitted. 17 | 18 | testdata/ contains the data for tests. 19 | testcode/ contains scripts and c code for the tests. 20 | 21 | do-tests.sh : runs all the tests in the testdata directory. 22 | testbed.sh : compiles on a set of (user specific) hosts and runs do-tests. 23 | 24 | Tests are run using testcode/mini_tpkg.sh. 25 | -------------------------------------------------------------------------------- /external/unbound/doc/ietf67-design-02.odp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BitChute/chutoken/845742c60c2211eb5f03dcabf9437f3a223ce543/external/unbound/doc/ietf67-design-02.odp -------------------------------------------------------------------------------- /external/unbound/doc/ietf67-design-02.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BitChute/chutoken/845742c60c2211eb5f03dcabf9437f3a223ce543/external/unbound/doc/ietf67-design-02.pdf -------------------------------------------------------------------------------- /external/unbound/doc/unbound-checkconf.8.in: -------------------------------------------------------------------------------- 1 | .TH "unbound-checkconf" "8" "Jun 13, 2017" "NLnet Labs" "unbound 1.6.3" 2 | .\" 3 | .\" unbound-checkconf.8 -- unbound configuration checker manual 4 | .\" 5 | .\" Copyright (c) 2007, NLnet Labs. All rights reserved. 6 | .\" 7 | .\" See LICENSE for the license. 8 | .\" 9 | .\" 10 | .SH "NAME" 11 | unbound\-checkconf 12 | \- Check unbound configuration file for errors. 13 | .SH "SYNOPSIS" 14 | .B unbound\-checkconf 15 | .RB [ \-h ] 16 | .RB [ \-f ] 17 | .RB [ \-o 18 | .IR option ] 19 | .RI [ cfgfile ] 20 | .SH "DESCRIPTION" 21 | .B Unbound\-checkconf 22 | checks the configuration file for the 23 | \fIunbound\fR(8) 24 | DNS resolver for syntax and other errors. 25 | The config file syntax is described in 26 | \fIunbound.conf\fR(5). 27 | .P 28 | The available options are: 29 | .TP 30 | .B \-h 31 | Show the version and commandline option help. 32 | .TP 33 | .B \-f 34 | Print full pathname, with chroot applied to it. Use with the \-o option. 35 | .TP 36 | .B \-o\fI option 37 | If given, after checking the config file the value of this option is 38 | printed to stdout. For "" (disabled) options an empty line is printed. 39 | .TP 40 | .I cfgfile 41 | The config file to read with settings for unbound. It is checked. 42 | If omitted, the config file at the default location is checked. 43 | .SH "EXIT CODE" 44 | The unbound\-checkconf program exits with status code 1 on error, 45 | 0 for a correct config file. 46 | .SH "FILES" 47 | .TP 48 | .I @ub_conf_file@ 49 | unbound configuration file. 50 | .SH "SEE ALSO" 51 | \fIunbound.conf\fR(5), 52 | \fIunbound\fR(8). 53 | -------------------------------------------------------------------------------- /external/unbound/libunbound/python/doc/_static/readme: -------------------------------------------------------------------------------- 1 | this directory exists to pacify sphinx-build. 2 | -------------------------------------------------------------------------------- /external/unbound/libunbound/python/doc/examples/example1a.rst: -------------------------------------------------------------------------------- 1 | .. _example_resolve_name: 2 | 3 | Resolve a name 4 | ============== 5 | 6 | This basic example shows how to create a context and resolve a host address 7 | (DNS record of A type). 8 | 9 | Source code 10 | ----------- 11 | 12 | :: 13 | 14 | #!/usr/bin/python 15 | import unbound 16 | 17 | ctx = unbound.ub_ctx() 18 | ctx.resolvconf("/etc/resolv.conf") 19 | 20 | status, result = ctx.resolve("www.google.com") 21 | if status == 0 and result.havedata: 22 | print "Result.data:", result.data.address_list 23 | elif status != 0: 24 | print "Resolve error:", unbound.ub_strerror(status) 25 | 26 | In contrast with the C API, the source code is more compact while the 27 | performance of C implementation is preserved. 28 | The main advantage is that you need not take care about the deallocation and 29 | allocation of context and result structures; pyUnbound module does it 30 | automatically for you. 31 | 32 | If only domain name is given, the :meth:`unbound.ub_ctx.resolve` looks for 33 | A records in IN class. 34 | -------------------------------------------------------------------------------- /external/unbound/libunbound/python/doc/examples/example1b.rst: -------------------------------------------------------------------------------- 1 | .. _example_reverse_lookup: 2 | 3 | Reverse DNS lookup 4 | ================== 5 | 6 | Reverse DNS lookup involves determining the hostname associated with a given IP 7 | address. 8 | This example shows how reverse lookup can be done using unbound module. 9 | 10 | For the reverse DNS records, the special domain in-addr.arpa is reserved. 11 | For example, a host name for the IP address ``74.125.43.147`` can be obtained 12 | by issuing a DNS query for the PTR record for address 13 | ``147.43.125.74.in-addr.arpa.`` 14 | 15 | Source code 16 | ----------- 17 | 18 | :: 19 | 20 | #!/usr/bin/python 21 | import unbound 22 | 23 | ctx = unbound.ub_ctx() 24 | ctx.resolvconf("/etc/resolv.conf") 25 | 26 | status, result = ctx.resolve(unbound.reverse("74.125.43.147") + ".in-addr.arpa.", unbound.RR_TYPE_PTR, unbound.RR_CLASS_IN) 27 | if status == 0 and result.havedata: 28 | print "Result.data:", result.data.domain_list 29 | elif status != 0: 30 | print "Resolve error:", unbound.ub_strerror(status) 31 | 32 | In order to simplify the python code, unbound module contains the 33 | :meth:`unbound.reverse` function which reverses the hostname components. 34 | This function is defined as follows:: 35 | 36 | def reverse(domain): 37 | return '.'.join([a for a in domain.split(".")][::-1]) 38 | -------------------------------------------------------------------------------- /external/unbound/libunbound/python/doc/examples/example2.rst: -------------------------------------------------------------------------------- 1 | .. _example_setup_ctx: 2 | 3 | Lookup from threads 4 | =================== 5 | 6 | This example shows how to use unbound module from a threaded program. 7 | In this example, three lookup threads are created which work in background. 8 | Each thread resolves different DNS record. 9 | 10 | Source code 11 | ----------- 12 | 13 | :: 14 | 15 | #!/usr/bin/python 16 | from unbound import ub_ctx, RR_TYPE_A, RR_CLASS_IN 17 | from threading import Thread 18 | 19 | ctx = ub_ctx() 20 | ctx.resolvconf("/etc/resolv.conf") 21 | 22 | class LookupThread(Thread): 23 | def __init__(self,ctx, name): 24 | Thread.__init__(self) 25 | self.ctx = ctx 26 | self.name = name 27 | 28 | def run(self): 29 | print "Thread lookup started:",self.name 30 | status, result = self.ctx.resolve(self.name, RR_TYPE_A, RR_CLASS_IN) 31 | if status == 0 and result.havedata: 32 | print " Result:",self.name,":", result.data.address_list 33 | 34 | threads = [] 35 | for name in ["www.fit.vutbr.cz","www.vutbr.cz","www.google.com"]: 36 | thread = LookupThread(ctx, name) 37 | thread.start() 38 | threads.append(thread) 39 | 40 | for thread in threads: 41 | thread.join() 42 | -------------------------------------------------------------------------------- /external/unbound/libunbound/python/doc/examples/example3.rst: -------------------------------------------------------------------------------- 1 | .. _example_asynch: 2 | 3 | Asynchronous lookup 4 | =================== 5 | 6 | This example performs the name lookup in the background. 7 | The main program keeps running while the name is resolved. 8 | 9 | Source code 10 | ----------- 11 | 12 | :: 13 | 14 | #!/usr/bin/python 15 | import time 16 | import unbound 17 | 18 | ctx = unbound.ub_ctx() 19 | ctx.resolvconf("/etc/resolv.conf") 20 | 21 | def call_back(my_data,status,result): 22 | print "Call_back:", my_data 23 | if status == 0 and result.havedata: 24 | print "Result:", result.data.address_list 25 | my_data['done_flag'] = True 26 | 27 | 28 | my_data = {'done_flag':False,'arbitrary':"object"} 29 | status, async_id = ctx.resolve_async("www.seznam.cz", my_data, call_back, unbound.RR_TYPE_A, unbound.RR_CLASS_IN) 30 | 31 | while (status == 0) and (not my_data['done_flag']): 32 | status = ctx.process() 33 | time.sleep(0.1) 34 | 35 | if (status != 0): 36 | print "Resolve error:", unbound.ub_strerror(status) 37 | 38 | The :meth:`unbound.ub_ctx.resolve_async` method is able to pass on any Python 39 | object. In this example, we used a dictionary object ``my_data``. 40 | -------------------------------------------------------------------------------- /external/unbound/libunbound/python/doc/examples/example4.rst: -------------------------------------------------------------------------------- 1 | .. _example_examine: 2 | 3 | DNSSEC validator 4 | ================ 5 | 6 | This example program performs DNSSEC validation of a DNS lookup. 7 | 8 | Source code 9 | ----------- 10 | 11 | :: 12 | 13 | #!/usr/bin/python 14 | import os 15 | from unbound import ub_ctx,RR_TYPE_A,RR_CLASS_IN 16 | 17 | ctx = ub_ctx() 18 | ctx.resolvconf("/etc/resolv.conf") 19 | if (os.path.isfile("keys")): 20 | ctx.add_ta_file("keys") #read public keys for DNSSEC verification 21 | 22 | status, result = ctx.resolve("www.nic.cz", RR_TYPE_A, RR_CLASS_IN) 23 | if status == 0 and result.havedata: 24 | 25 | print "Result:", result.data.address_list 26 | 27 | if result.secure: 28 | print "Result is secure" 29 | elif result.bogus: 30 | print "Result is bogus" 31 | else: 32 | print "Result is insecure" 33 | 34 | More detailed informations can be seen in libUnbound DNSSEC tutorial `here`_. 35 | 36 | .. _here: http://www.unbound.net/documentation/libunbound-tutorial-6.html 37 | -------------------------------------------------------------------------------- /external/unbound/libunbound/python/doc/examples/example5.rst: -------------------------------------------------------------------------------- 1 | .. _example_resolver_only: 2 | 3 | Resolver only 4 | ============= 5 | 6 | This example program shows how to perform DNS resolution only. 7 | Unbound contains two basic modules: resolver and validator. 8 | In case, the validator is not necessary, the validator module can be turned off 9 | using "module-config" option. 10 | This option contains a list of module names separated by the space char. This 11 | list determined which modules should be employed and in what order. 12 | 13 | Source code 14 | ----------- 15 | 16 | :: 17 | 18 | #!/usr/bin/python 19 | import os 20 | from unbound import ub_ctx,RR_TYPE_A,RR_CLASS_IN 21 | 22 | ctx = ub_ctx() 23 | ctx.set_option("module-config:","iterator") 24 | ctx.resolvconf("/etc/resolv.conf") 25 | 26 | status, result = ctx.resolve("www.google.com", RR_TYPE_A, RR_CLASS_IN) 27 | if status == 0 and result.havedata: 28 | 29 | print "Result:", result.data.address_list 30 | 31 | .. note:: 32 | The :meth:`unbound.ub_ctx.set_option` method must be used before the first 33 | resolution (i.e. before :meth:`unbound.ub_ctx.resolve` or 34 | :meth:`unbound.ub_ctx.resolve_async` call). 35 | -------------------------------------------------------------------------------- /external/unbound/libunbound/python/doc/examples/example6-1.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | from unbound import ub_ctx,ub_strerror,RR_TYPE_A,RR_CLASS_IN 3 | 4 | ctx = ub_ctx() 5 | ctx.resolvconf("/etc/resolv.conf") 6 | 7 | status, result = ctx.resolve("test.record.xxx", RR_TYPE_A, RR_CLASS_IN) 8 | if status == 0 and result.havedata: 9 | print "Result:", result.data.address_list 10 | else: 11 | print "No record found" 12 | 13 | #define new local zone 14 | status = ctx.zone_add("xxx.","static") 15 | if (status != 0): print "Error zone_add:",status, ub_strerror(status) 16 | 17 | #add RR to the zone 18 | status = ctx.data_add("test.record.xxx. IN A 1.2.3.4") 19 | if (status != 0): print "Error data_add:",status, ub_strerror(status) 20 | 21 | #lookup for an A record 22 | status, result = ctx.resolve("test.record.xxx", RR_TYPE_A, RR_CLASS_IN) 23 | if status == 0 and result.havedata: 24 | print "Result:", result.data.as_address_list() 25 | else: 26 | print "No record found" 27 | 28 | -------------------------------------------------------------------------------- /external/unbound/libunbound/python/doc/examples/example6.rst: -------------------------------------------------------------------------------- 1 | .. _example_localzone: 2 | 3 | Local zone manipulation 4 | ======================= 5 | 6 | This example program shows how to define local zone containing custom DNS 7 | records. 8 | 9 | Source code 10 | ----------- 11 | 12 | .. literalinclude:: example6-1.py 13 | :language: python 14 | -------------------------------------------------------------------------------- /external/unbound/libunbound/python/doc/examples/example7-1.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | # vim:fileencoding=utf-8 3 | # 4 | # IDN (Internationalized Domain Name) lookup support 5 | # 6 | import unbound 7 | 8 | ctx = unbound.ub_ctx() 9 | ctx.resolvconf("/etc/resolv.conf") 10 | 11 | status, result = ctx.resolve(u"www.háčkyčárky.cz", unbound.RR_TYPE_A, unbound.RR_CLASS_IN) 12 | if status == 0 and result.havedata: 13 | print "Result:" 14 | print " raw data:", result.data 15 | for k in result.data.address_list: 16 | print " address:%s" % k 17 | 18 | -------------------------------------------------------------------------------- /external/unbound/libunbound/python/doc/examples/example7-2.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | # vim:fileencoding=utf-8 3 | # 4 | # IDN (Internationalized Domain Name) lookup support (lookup for MX) 5 | # 6 | import unbound 7 | 8 | ctx = unbound.ub_ctx() 9 | ctx.resolvconf("/etc/resolv.conf") 10 | 11 | status, result = ctx.resolve(u"háčkyčárky.cz", unbound.RR_TYPE_MX, unbound.RR_CLASS_IN) 12 | if status == 0 and result.havedata: 13 | print "Result:" 14 | print " raw data:", result.data 15 | for k in result.data.mx_list_idn: 16 | print " priority:%d address:%s" % k 17 | -------------------------------------------------------------------------------- /external/unbound/libunbound/python/doc/examples/example7.rst: -------------------------------------------------------------------------------- 1 | .. _example_idna: 2 | 3 | Internationalized domain name support 4 | ===================================== 5 | 6 | Unlike the libUnbound, pyUnbound is able to handle IDN queries. 7 | 8 | Automatic IDN DNAME conversion 9 | ------------------------------- 10 | 11 | If we use unicode string in :meth:`unbound.ub_ctx.resolve` method, 12 | the IDN DNAME conversion (if it is necessary) is performed on background. 13 | 14 | Source code 15 | ........... 16 | 17 | .. literalinclude:: example7-1.py 18 | :language: python 19 | 20 | IDN converted attributes 21 | ------------------------ 22 | 23 | The :class:`unbound.ub_data` class contains attributes suffix which converts 24 | the dname to UTF string. These attributes have the ``_idn`` suffix. 25 | 26 | Apart from this aproach, two conversion functions exist 27 | (:func:`unbound.idn2dname` and :func:`unbound.dname2idn`). 28 | 29 | Source code 30 | ........... 31 | 32 | .. literalinclude:: example7-2.py 33 | :language: python 34 | -------------------------------------------------------------------------------- /external/unbound/libunbound/python/doc/examples/example8-1.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | # vim:fileencoding=utf-8 3 | # 4 | # Lookup for MX and NS records 5 | # 6 | import unbound 7 | 8 | ctx = unbound.ub_ctx() 9 | ctx.resolvconf("/etc/resolv.conf") 10 | 11 | status, result = ctx.resolve("nic.cz", unbound.RR_TYPE_MX, unbound.RR_CLASS_IN) 12 | if status == 0 and result.havedata: 13 | print "Result:" 14 | print " raw data:", result.data 15 | for k in result.data.mx_list: 16 | print " priority:%d address:%s" % k 17 | 18 | status, result = ctx.resolve("nic.cz", unbound.RR_TYPE_A, unbound.RR_CLASS_IN) 19 | if status == 0 and result.havedata: 20 | print "Result:" 21 | print " raw data:", result.data 22 | for k in result.data.address_list: 23 | print " address:%s" % k 24 | 25 | status, result = ctx.resolve("nic.cz", unbound.RR_TYPE_NS, unbound.RR_CLASS_IN) 26 | if status == 0 and result.havedata: 27 | print "Result:" 28 | print " raw data:", result.data 29 | for k in result.data.domain_list: 30 | print " host: %s" % k 31 | 32 | -------------------------------------------------------------------------------- /external/unbound/libunbound/python/doc/examples/example8.rst: -------------------------------------------------------------------------------- 1 | .. _example_mxlookup: 2 | 3 | Lookup for MX and NS records 4 | ============================ 5 | 6 | The pyUnbound extension provides functions which are able to encode RAW RDATA 7 | produces by unbound resolver (see :class:`unbound.ub_data`). 8 | 9 | Source code 10 | ----------- 11 | 12 | .. literalinclude:: example8-1.py 13 | :language: python 14 | 15 | Output 16 | ------ 17 | 18 | The previous example produces the following output:: 19 | 20 | Result: 21 | raw data: 00 0F 05 6D 61 69 6C 34 03 6E 69 63 02 63 7A 00;00 14 02 6D 78 05 63 7A 6E 69 63 03 6F 72 67 00;00 0A 04 6D 61 69 6C 03 6E 69 63 02 63 7A 00 22 | priority:15 address: mail4.nic.cz. 23 | priority:20 address: mx.cznic.org. 24 | priority:10 address: mail.nic.cz. 25 | 26 | Result: 27 | raw data: D9 1F CD 32 28 | address: 217.31.205.50 29 | 30 | Result: 31 | raw data: 01 61 02 6E 73 03 6E 69 63 02 63 7A 00;01 65 02 6E 73 03 6E 69 63 02 63 7A 00;01 63 02 6E 73 03 6E 69 63 02 63 7A 00 32 | host: a.ns.nic.cz. 33 | host: e.ns.nic.cz. 34 | host: c.ns.nic.cz. 35 | -------------------------------------------------------------------------------- /external/unbound/libunbound/python/doc/examples/index.rst: -------------------------------------------------------------------------------- 1 | Examples 2 | ======== 3 | 4 | Here you can find several examples which utilizes the unbound library in Python 5 | environment. Unbound is a caching validator and resolver and can be linked into 6 | an application, as a library where can answer DNS queries for the application. 7 | This set of examples shows how to use the functions from Python environment. 8 | 9 | Tutorials 10 | --------- 11 | 12 | .. toctree:: 13 | :maxdepth: 1 14 | :glob: 15 | 16 | example* 17 | -------------------------------------------------------------------------------- /external/unbound/libunbound/python/doc/index.rst: -------------------------------------------------------------------------------- 1 | PyUnbound documentation 2 | ======================================= 3 | 4 | This project contains an Unbound wrapper providing the thinnest layer over the library possible. 5 | Everything you can do from the libUnbound C API, you can do from Python, even more. 6 | 7 | Contents 8 | ---------- 9 | .. toctree:: 10 | :maxdepth: 2 11 | 12 | intro.rst 13 | install.rst 14 | examples/index.rst 15 | modules/unbound 16 | 17 | Module Documentation 18 | ----------------------- 19 | 20 | * Module :mod:`unbound` 21 | 22 | Indices and tables 23 | ------------------- 24 | 25 | * :ref:`genindex` 26 | * :ref:`search` 27 | 28 | -------------------------------------------------------------------------------- /external/unbound/libunbound/python/doc/install.rst: -------------------------------------------------------------------------------- 1 | Installation 2 | ============ 3 | 4 | Prerequisites 5 | ------------- 6 | 7 | Python 2.4 or higher, SWIG 1.3 or higher, GNU make 8 | 9 | Compiling 10 | --------- 11 | 12 | After downloading, you can compile the pyUnbound library by doing:: 13 | 14 | > tar -xzf unbound-x.x.x-py.tar.gz 15 | > cd unbound-x.x.x 16 | > ./configure --with-pyunbound 17 | > make 18 | 19 | You may want to enable ``--with-pythonmodule`` as well if you want to use 20 | python as a module in the resolver. 21 | 22 | You need ``GNU make`` to compile sources; ``SWIG`` and ``Python devel`` 23 | libraries to compile extension module. 24 | 25 | 26 | Testing 27 | ------- 28 | 29 | If the compilation is successful, you can test the python LDNS extension module 30 | by:: 31 | 32 | > cd contrib/python 33 | > make testenv 34 | > ./dns-lookup.py 35 | 36 | You may want to ``make install`` in the main directory since ``make testenv`` 37 | is for debugging. In contrib/examples you can find simple applications written 38 | in Python using the Unbound extension. 39 | -------------------------------------------------------------------------------- /external/unbound/libunbound/python/examples/dnssec_test.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | from __future__ import print_function 3 | from unbound import ub_ctx, RR_TYPE_A, RR_TYPE_RRSIG, RR_TYPE_NSEC, RR_TYPE_NSEC3 4 | import ldns 5 | 6 | def dnssecParse(domain, rrType=RR_TYPE_A): 7 | print("Resolving domain", domain) 8 | s, r = resolver.resolve(domain) 9 | print("status: %s, secure: %s, rcode: %s, havedata: %s, answer_len; %s" % (s, r.secure, r.rcode_str, r.havedata, r.answer_len)) 10 | 11 | s, pkt = ldns.ldns_wire2pkt(r.packet) 12 | if s != 0: 13 | raise RuntimeError("Error parsing DNS packet") 14 | 15 | rrsigs = pkt.rr_list_by_type(RR_TYPE_RRSIG, ldns.LDNS_SECTION_ANSWER) 16 | print("RRSIGs from answer:", sorted(rrsigs)) 17 | 18 | rrsigs = pkt.rr_list_by_type(RR_TYPE_RRSIG, ldns.LDNS_SECTION_AUTHORITY) 19 | print("RRSIGs from authority:", sorted(rrsigs)) 20 | 21 | nsecs = pkt.rr_list_by_type(RR_TYPE_NSEC, ldns.LDNS_SECTION_AUTHORITY) 22 | print("NSECs:", sorted(nsecs)) 23 | 24 | nsec3s = pkt.rr_list_by_type(RR_TYPE_NSEC3, ldns.LDNS_SECTION_AUTHORITY) 25 | print("NSEC3s:", sorted(nsec3s)) 26 | 27 | print("---") 28 | 29 | 30 | resolver = ub_ctx() 31 | resolver.add_ta(". IN DS 19036 8 2 49AAC11D7B6F6446702E54A1607371607A1A41855200FD2CE1CDDE32F24E8FB5") 32 | 33 | dnssecParse("nic.cz") 34 | dnssecParse("nonexistent-domain-blablabla.cz") 35 | dnssecParse("nonexistent-domain-blablabla.root.cz") 36 | 37 | -------------------------------------------------------------------------------- /external/unbound/libunbound/ubsyms.def: -------------------------------------------------------------------------------- 1 | ub_cancel 2 | ub_ctx_add_ta 3 | ub_ctx_add_ta_autr 4 | ub_ctx_add_ta_file 5 | ub_ctx_async 6 | ub_ctx_config 7 | ub_ctx_create 8 | ub_ctx_create_event 9 | ub_ctx_create_ub_event 10 | ub_ctx_data_add 11 | ub_ctx_data_remove 12 | ub_ctx_debuglevel 13 | ub_ctx_debugout 14 | ub_ctx_delete 15 | ub_ctx_get_option 16 | ub_ctx_hosts 17 | ub_ctx_print_local_zones 18 | ub_ctx_resolvconf 19 | ub_ctx_set_event 20 | ub_ctx_set_fwd 21 | ub_ctx_set_option 22 | ub_ctx_set_stub 23 | ub_ctx_trustedkeys 24 | ub_ctx_zone_add 25 | ub_ctx_zone_remove 26 | ub_fd 27 | ub_poll 28 | ub_process 29 | ub_resolve 30 | ub_resolve_async 31 | ub_resolve_event 32 | ub_resolve_free 33 | ub_strerror 34 | ub_version 35 | ub_wait 36 | -------------------------------------------------------------------------------- /external/unbound/pythonmod/doc/_static/readme: -------------------------------------------------------------------------------- 1 | this directory exists to pacify sphinx-build. 2 | -------------------------------------------------------------------------------- /external/unbound/pythonmod/doc/examples/example0-1.py: -------------------------------------------------------------------------------- 1 | 2 | def init(id, cfg): 3 | log_info("pythonmod: init called, module id is %d port: %d script: %s" % (id, cfg.port, cfg.python_script)) 4 | return True 5 | 6 | def deinit(id): 7 | log_info("pythonmod: deinit called, module id is %d" % id) 8 | return True 9 | 10 | def inform_super(id, qstate, superqstate, qdata): 11 | return True 12 | 13 | def operate(id, event, qstate, qdata): 14 | log_info("pythonmod: operate called, id: %d, event:%s" % (id, strmodulevent(event))) 15 | 16 | if event == MODULE_EVENT_NEW: 17 | qstate.ext_state[id] = MODULE_WAIT_MODULE 18 | return True 19 | 20 | if event == MODULE_EVENT_MODDONE: 21 | log_info("pythonmod: module we are waiting for is done") 22 | qstate.ext_state[id] = MODULE_FINISHED 23 | return True 24 | 25 | if event == MODULE_EVENT_PASS: 26 | log_info("pythonmod: event_pass") 27 | qstate.ext_state[id] = MODULE_ERROR 28 | return True 29 | 30 | log_err("pythonmod: BAD event") 31 | qstate.ext_state[id] = MODULE_ERROR 32 | return True 33 | 34 | log_info("pythonmod: script loaded.") 35 | -------------------------------------------------------------------------------- /external/unbound/pythonmod/doc/examples/index.rst: -------------------------------------------------------------------------------- 1 | .. _Tutorials: 2 | 3 | Examples 4 | ======== 5 | 6 | Here you can find several tutorials which clarify the usage and capabilities of 7 | the Unbound scriptable interface. 8 | 9 | Tutorials 10 | --------- 11 | 12 | .. toctree:: 13 | :maxdepth: 2 14 | :glob: 15 | 16 | example* 17 | -------------------------------------------------------------------------------- /external/unbound/pythonmod/doc/index.rst: -------------------------------------------------------------------------------- 1 | Unbound scriptable interface 2 | ======================================= 3 | 4 | Python module for **Unbound** provides easy-to-use flexible solution, 5 | for scripting query events and much more! 6 | 7 | Along with extensible **SWIG** interface, it turns **Unbound** into dynamic *DNS* service 8 | designed for rapid development of *DNS* based applications, like detailed *(per query/domain)* statistics, 9 | monitoring with anything Python can offer *(database backend, http server)*. 10 | 11 | **Key features** 12 | * Rapid dynamic DNS-based application development in **Python** 13 | * Extensible interface with **SWIG** 14 | * Easy to use debugging and analysis tool 15 | * Capable to produce authoritative answers 16 | * Support for logging or doing detailed statistics 17 | * Allows to manipulate with content of cache memory 18 | 19 | Contents 20 | -------- 21 | .. toctree:: 22 | :maxdepth: 2 23 | 24 | install 25 | examples/index 26 | usecase 27 | modules/index 28 | 29 | Indices and tables 30 | ------------------- 31 | 32 | * :ref:`genindex` 33 | * :ref:`search` 34 | 35 | -------------------------------------------------------------------------------- /external/unbound/pythonmod/doc/modules/index.rst: -------------------------------------------------------------------------------- 1 | Unbound module documentation 2 | ======================================= 3 | 4 | .. toctree:: 5 | :maxdepth: 2 6 | 7 | env 8 | struct 9 | functions 10 | config 11 | 12 | -------------------------------------------------------------------------------- /external/unbound/pythonmod/doc/usecase.rst: -------------------------------------------------------------------------------- 1 | Use cases (examples) 2 | ==================== 3 | 4 | Dynamic DNS Service discovery (DNS-SD_) 5 | ------------------------------------------- 6 | Synchronized with database engine, for example *MySQL*. 7 | 8 | .. _DNS-SD: http://www.dns-sd.org/ 9 | 10 | Firewall control 11 | ---------------- 12 | Control firewall (e.g. enable incoming SSH connection) with DNS query signed with private key. 13 | So firewall can blocks every service during normal operation. 14 | 15 | Scriptable DNS-based blacklist (DNS-BL_) 16 | ------------------------------------------- 17 | Scripted in Python with already provided features, takes advantage of DNS reply, because 18 | almost every mail server supports DNS based blacklisting. 19 | 20 | .. _DNS-BL: http://www.dnsbl.org 21 | 22 | DNS based Wake-On-Lan 23 | --------------------- 24 | Controled by secured queries secured with private key. 25 | 26 | Dynamic translation service 27 | --------------------------- 28 | DNS request can be translated to virtualy any answer, that's easy to implement in client side 29 | because of many DNS libraries available. 30 | 31 | Examples : 32 | * **Dictionary** - using *IDN* for non-ascii strings transfer, ``dig TXT slovo.en._dict_.nic.cz`` returns translation of "slovo" to EN. 33 | * **Translation** - Extends *DNS-SD*, for example DNS to Jabber to find out people logged in. 34 | * **Exchange rate calculator** - ``dig TXT 1000.99.czk.eur._rates_.nic.cz`` returns the given sum (1000.99 CZK) in EURs. 35 | 36 | Dynamic ENUM service 37 | -------------------- 38 | Support for redirection, synchronization, etc. 39 | -------------------------------------------------------------------------------- /external/unbound/pythonmod/examples/dict_data.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BitChute/chutoken/845742c60c2211eb5f03dcabf9437f3a223ce543/external/unbound/pythonmod/examples/dict_data.txt -------------------------------------------------------------------------------- /external/unbound/pythonmod/test-calc.conf: -------------------------------------------------------------------------------- 1 | # Example configuration file for calc.py 2 | server: 3 | verbosity: 1 4 | interface: 0.0.0.0 5 | do-daemonize: no 6 | access-control: 0.0.0.0/0 allow 7 | chroot: "" 8 | username: "" 9 | directory: "" 10 | logfile: "" 11 | pidfile: "unbound.pid" 12 | module-config: "validator python iterator" 13 | 14 | # Python config section 15 | python: 16 | # Script file to load 17 | python-script: "./examples/calc.py" 18 | 19 | -------------------------------------------------------------------------------- /external/unbound/pythonmod/test-dict.conf: -------------------------------------------------------------------------------- 1 | # Example configuration file for dict.py 2 | server: 3 | verbosity: 1 4 | interface: 0.0.0.0 5 | do-daemonize: no 6 | access-control: 0.0.0.0/0 allow 7 | chroot: "" 8 | username: "" 9 | directory: "" 10 | logfile: "" 11 | pidfile: "unbound.pid" 12 | module-config: "validator python iterator" 13 | 14 | # Python config section 15 | python: 16 | # Script file to load 17 | python-script: "./examples/dict.py" 18 | 19 | -------------------------------------------------------------------------------- /external/unbound/pythonmod/test-edns.conf: -------------------------------------------------------------------------------- 1 | # Example configuration file for edns.py 2 | server: 3 | verbosity: 1 4 | interface: 0.0.0.0 5 | do-daemonize: no 6 | access-control: 0.0.0.0/0 allow 7 | chroot: "" 8 | username: "" 9 | directory: "" 10 | logfile: "" 11 | pidfile: "unbound.pid" 12 | module-config: "validator python iterator" 13 | 14 | # Python config section 15 | python: 16 | # Script file to load 17 | python-script: "./examples/edns.py" 18 | -------------------------------------------------------------------------------- /external/unbound/pythonmod/test-inplace_callbacks.conf: -------------------------------------------------------------------------------- 1 | # Example configuration file for edns.py 2 | server: 3 | verbosity: 1 4 | interface: 0.0.0.0 5 | do-daemonize: no 6 | access-control: 0.0.0.0/0 allow 7 | chroot: "" 8 | username: "" 9 | directory: "" 10 | logfile: "" 11 | pidfile: "unbound.pid" 12 | module-config: "validator python iterator" 13 | 14 | # Python config section 15 | python: 16 | # Script file to load 17 | python-script: "./examples/inplace_callbacks.py" 18 | -------------------------------------------------------------------------------- /external/unbound/pythonmod/test-log.conf: -------------------------------------------------------------------------------- 1 | # Example configuration file for log.py 2 | server: 3 | verbosity: 1 4 | interface: 0.0.0.0 5 | do-daemonize: no 6 | access-control: 0.0.0.0/0 allow 7 | chroot: "" 8 | username: "" 9 | directory: "" 10 | logfile: "" 11 | pidfile: "unbound.pid" 12 | module-config: "validator python iterator" 13 | 14 | # Python config section 15 | python: 16 | # Script file to load 17 | python-script: "./examples/log.py" 18 | -------------------------------------------------------------------------------- /external/unbound/pythonmod/test-resgen.conf: -------------------------------------------------------------------------------- 1 | # Example configuration file for resgen.py 2 | server: 3 | verbosity: 1 4 | interface: 0.0.0.0 5 | do-daemonize: no 6 | access-control: 0.0.0.0/0 allow 7 | chroot: "" 8 | username: "" 9 | directory: "" 10 | logfile: "" 11 | pidfile: "unbound.pid" 12 | module-config: "validator python iterator" 13 | 14 | # Python config section 15 | python: 16 | # Script file to load 17 | python-script: "./examples/resgen.py" 18 | 19 | -------------------------------------------------------------------------------- /external/unbound/pythonmod/test-resip.conf: -------------------------------------------------------------------------------- 1 | # Example configuration file for resip.py 2 | server: 3 | verbosity: 1 4 | #interface: 0.0.0.0 5 | do-daemonize: no 6 | #access-control: 0.0.0.0/0 allow 7 | chroot: "" 8 | username: "" 9 | directory: "" 10 | logfile: "" 11 | pidfile: "unbound.pid" 12 | module-config: "validator python iterator" 13 | 14 | # Python config section 15 | python: 16 | # Script file to load 17 | python-script: "./examples/resip.py" 18 | 19 | -------------------------------------------------------------------------------- /external/unbound/pythonmod/test-resmod.conf: -------------------------------------------------------------------------------- 1 | # Example configuration file for resmod.py 2 | server: 3 | verbosity: 1 4 | interface: 0.0.0.0 5 | do-daemonize: no 6 | access-control: 0.0.0.0/0 allow 7 | chroot: "" 8 | username: "" 9 | directory: "" 10 | logfile: "" 11 | pidfile: "unbound.pid" 12 | #module-config: "python iterator" 13 | module-config: "validator python iterator" 14 | 15 | # Python config section 16 | python: 17 | # Script file to load 18 | python-script: "./examples/resmod.py" 19 | 20 | -------------------------------------------------------------------------------- /external/unbound/winrc/combined.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BitChute/chutoken/845742c60c2211eb5f03dcabf9437f3a223ce543/external/unbound/winrc/combined.ico -------------------------------------------------------------------------------- /external/unbound/winrc/gen_msg.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BitChute/chutoken/845742c60c2211eb5f03dcabf9437f3a223ce543/external/unbound/winrc/gen_msg.bin -------------------------------------------------------------------------------- /external/unbound/winrc/gen_msg.mc: -------------------------------------------------------------------------------- 1 | ; for Unbound 2 | ; severity default Success Informational Warning Error 3 | 4 | ; .bin file created with: 5 | ; "/c/Program Files/Microsoft SDKs/Windows/v6.1/Bin/mc" -c gen_msg.mc 6 | ; mv MSG00001.bin gen_msg.bin 7 | ; rm gen_msg.h 8 | ; and pasted contents of gen_msg.rc into rsrc_unbound.rc 9 | 10 | FacilityNames=(Server=0x1) 11 | MessageIdTypeDef=DWORD 12 | 13 | MessageID=0x1 14 | Severity=Success 15 | Facility=Server 16 | SymbolicName=MSG_GENERIC_SUCCESS 17 | Language=English 18 | %1 19 | . 20 | 21 | MessageID=0x2 22 | Severity=Informational 23 | Facility=Server 24 | SymbolicName=MSG_GENERIC_INFO 25 | Language=English 26 | %1 27 | . 28 | 29 | MessageID=0x3 30 | Severity=Warning 31 | Facility=Server 32 | SymbolicName=MSG_GENERIC_WARN 33 | Language=English 34 | %1 35 | . 36 | 37 | MessageID=0x4 38 | Severity=Error 39 | Facility=Server 40 | SymbolicName=MSG_GENERIC_ERR 41 | Language=English 42 | %1 43 | . 44 | 45 | -------------------------------------------------------------------------------- /external/unbound/winrc/rsrc_anchorupd.rc: -------------------------------------------------------------------------------- 1 | /* 2 | Unbound resource file for windows. For use with windres 3 | */ 4 | #include "winver.h" 5 | #include "config.h" 6 | 7 | 1 ICON "winrc/combined.ico" 8 | 9 | 1 VERSIONINFO 10 | FILEVERSION RSRC_PACKAGE_VERSION 11 | PRODUCTVERSION RSRC_PACKAGE_VERSION 12 | FILEFLAGSMASK 0 13 | FILEFLAGS 0 14 | FILEOS VOS__WINDOWS32 15 | FILETYPE VFT_APP 16 | FILESUBTYPE 0 17 | BEGIN 18 | BLOCK "StringFileInfo" 19 | BEGIN 20 | BLOCK "040904E4" 21 | BEGIN 22 | VALUE "CompanyName", "NLnet Labs" 23 | VALUE "FileDescription", "Unbound trust anchor tool" 24 | VALUE "FileVersion", PACKAGE_VERSION 25 | VALUE "InternalName", "anchor-update" 26 | VALUE "OriginalFilename", "anchor-update.exe" 27 | VALUE "ProductName", "unbound" 28 | VALUE "ProductVersion", PACKAGE_VERSION 29 | VALUE "LegalCopyright", "(C) 2009 NLnet Labs. Source is BSD licensed." 30 | END 31 | END 32 | BLOCK "VarFileInfo" 33 | BEGIN 34 | /* English(409), windows ANSI codepage (1252) */ 35 | VALUE "Translation", 0x409, 0x1252 36 | END 37 | END 38 | 39 | /* vista administrator access, show UAC prompt */ 40 | 1 RT_MANIFEST "winrc/vista_user.manifest" 41 | -------------------------------------------------------------------------------- /external/unbound/winrc/rsrc_svcinst.rc: -------------------------------------------------------------------------------- 1 | /* 2 | Unbound resource file for windows. For use with windres 3 | */ 4 | #include "winver.h" 5 | #include "config.h" 6 | 7 | 1 ICON "winrc/combined.ico" 8 | 9 | 1 VERSIONINFO 10 | FILEVERSION RSRC_PACKAGE_VERSION 11 | PRODUCTVERSION RSRC_PACKAGE_VERSION 12 | FILEFLAGSMASK 0 13 | FILEFLAGS 0 14 | FILEOS VOS__WINDOWS32 15 | FILETYPE VFT_APP 16 | FILESUBTYPE 0 17 | BEGIN 18 | BLOCK "StringFileInfo" 19 | BEGIN 20 | BLOCK "040904E4" 21 | BEGIN 22 | VALUE "CompanyName", "NLnet Labs" 23 | VALUE "FileDescription", "Unbound Service Install Util" 24 | VALUE "FileVersion", PACKAGE_VERSION 25 | VALUE "InternalName", "unbound-service-install" 26 | VALUE "OriginalFilename", "unbound-service-install.exe" 27 | VALUE "ProductName", "unbound" 28 | VALUE "ProductVersion", PACKAGE_VERSION 29 | VALUE "LegalCopyright", "(C) 2009 NLnet Labs. Source is BSD licensed." 30 | END 31 | END 32 | BLOCK "VarFileInfo" 33 | BEGIN 34 | /* English(409), windows ANSI codepage (1252) */ 35 | VALUE "Translation", 0x409, 0x1252 36 | END 37 | END 38 | 39 | /* error message formats */ 40 | LANGUAGE 0x9,0x1 41 | 1 11 "winrc/gen_msg.bin" 42 | 43 | /* vista administrator access, show UAC prompt */ 44 | 1 RT_MANIFEST "winrc/vista_admin.manifest" 45 | 46 | -------------------------------------------------------------------------------- /external/unbound/winrc/rsrc_svcuninst.rc: -------------------------------------------------------------------------------- 1 | /* 2 | Unbound resource file for windows. For use with windres 3 | */ 4 | #include "winver.h" 5 | #include "config.h" 6 | 7 | 1 ICON "winrc/combined.ico" 8 | 9 | 1 VERSIONINFO 10 | FILEVERSION RSRC_PACKAGE_VERSION 11 | PRODUCTVERSION RSRC_PACKAGE_VERSION 12 | FILEFLAGSMASK 0 13 | FILEFLAGS 0 14 | FILEOS VOS__WINDOWS32 15 | FILETYPE VFT_APP 16 | FILESUBTYPE 0 17 | BEGIN 18 | BLOCK "StringFileInfo" 19 | BEGIN 20 | BLOCK "040904E4" 21 | BEGIN 22 | VALUE "CompanyName", "NLnet Labs" 23 | VALUE "FileDescription", "Unbound Service Remove Util" 24 | VALUE "FileVersion", PACKAGE_VERSION 25 | VALUE "InternalName", "unbound-service-remove" 26 | VALUE "OriginalFilename", "unbound-service-remove.exe" 27 | VALUE "ProductName", "unbound" 28 | VALUE "ProductVersion", PACKAGE_VERSION 29 | VALUE "LegalCopyright", "(C) 2009 NLnet Labs. Source is BSD licensed." 30 | END 31 | END 32 | BLOCK "VarFileInfo" 33 | BEGIN 34 | /* English(409), windows ANSI codepage (1252) */ 35 | VALUE "Translation", 0x409, 0x1252 36 | END 37 | END 38 | 39 | /* error message formats */ 40 | LANGUAGE 0x9,0x1 41 | 1 11 "winrc/gen_msg.bin" 42 | 43 | /* vista administrator access, show UAC prompt */ 44 | 1 RT_MANIFEST "winrc/vista_admin.manifest" 45 | 46 | -------------------------------------------------------------------------------- /external/unbound/winrc/rsrc_unbound.rc: -------------------------------------------------------------------------------- 1 | /* 2 | Unbound resource file for windows. For use with windres 3 | */ 4 | #include "winver.h" 5 | #include "config.h" 6 | 7 | 1 ICON "winrc/combined.ico" 8 | /* 9 | 1 ICON "winrc/unbound64.ico" 10 | 2 ICON "winrc/unbound48.ico" 11 | 3 ICON "winrc/unbound32.ico" 12 | 4 ICON "winrc/unbound16.ico" 13 | */ 14 | 15 | 1 VERSIONINFO 16 | FILEVERSION RSRC_PACKAGE_VERSION 17 | PRODUCTVERSION RSRC_PACKAGE_VERSION 18 | FILEFLAGSMASK 0 19 | FILEFLAGS 0 20 | FILEOS VOS__WINDOWS32 21 | FILETYPE VFT_APP 22 | FILESUBTYPE 0 23 | BEGIN 24 | BLOCK "StringFileInfo" 25 | BEGIN 26 | BLOCK "040904E4" 27 | BEGIN 28 | VALUE "CompanyName", "NLnet Labs" 29 | VALUE "FileDescription", "Unbound DNS Server" 30 | VALUE "FileVersion", PACKAGE_VERSION 31 | VALUE "InternalName", "unbound" 32 | VALUE "OriginalFilename", "unbound.exe" 33 | VALUE "ProductName", "unbound" 34 | VALUE "ProductVersion", PACKAGE_VERSION 35 | VALUE "LegalCopyright", "(C) 2009 NLnet Labs. Source is BSD licensed." 36 | END 37 | END 38 | BLOCK "VarFileInfo" 39 | BEGIN 40 | /* English(409), windows ANSI codepage (1252) */ 41 | VALUE "Translation", 0x409, 0x1252 42 | END 43 | END 44 | 45 | /* error message formats */ 46 | LANGUAGE 0x9,0x1 47 | /* id=1 type=RT_MESSAGETABLE */ 48 | 1 11 "winrc/gen_msg.bin" 49 | -------------------------------------------------------------------------------- /external/unbound/winrc/rsrc_unbound_anchor.rc: -------------------------------------------------------------------------------- 1 | /* 2 | Unbound resource file for windows. For use with windres 3 | */ 4 | #include "winver.h" 5 | #include "config.h" 6 | 7 | 1 ICON "winrc/combined.ico" 8 | 9 | 1 VERSIONINFO 10 | FILEVERSION RSRC_PACKAGE_VERSION 11 | PRODUCTVERSION RSRC_PACKAGE_VERSION 12 | FILEFLAGSMASK 0 13 | FILEFLAGS 0 14 | FILEOS VOS__WINDOWS32 15 | FILETYPE VFT_APP 16 | FILESUBTYPE 0 17 | BEGIN 18 | BLOCK "StringFileInfo" 19 | BEGIN 20 | BLOCK "040904E4" 21 | BEGIN 22 | VALUE "CompanyName", "NLnet Labs" 23 | VALUE "FileDescription", "Unbound Anchor Utility" 24 | VALUE "FileVersion", PACKAGE_VERSION 25 | VALUE "InternalName", "unbound-anchor" 26 | VALUE "OriginalFilename", "unbound-anchor.exe" 27 | VALUE "ProductName", "unbound" 28 | VALUE "ProductVersion", PACKAGE_VERSION 29 | VALUE "LegalCopyright", "(C) 2010 NLnet Labs. Source is BSD licensed." 30 | END 31 | END 32 | BLOCK "VarFileInfo" 33 | BEGIN 34 | /* English(409), windows ANSI codepage (1252) */ 35 | VALUE "Translation", 0x409, 0x1252 36 | END 37 | END 38 | -------------------------------------------------------------------------------- /external/unbound/winrc/rsrc_unbound_checkconf.rc: -------------------------------------------------------------------------------- 1 | /* 2 | Unbound resource file for windows. For use with windres 3 | */ 4 | #include "winver.h" 5 | #include "config.h" 6 | 7 | 1 ICON "winrc/combined.ico" 8 | 9 | 1 VERSIONINFO 10 | FILEVERSION RSRC_PACKAGE_VERSION 11 | PRODUCTVERSION RSRC_PACKAGE_VERSION 12 | FILEFLAGSMASK 0 13 | FILEFLAGS 0 14 | FILEOS VOS__WINDOWS32 15 | FILETYPE VFT_APP 16 | FILESUBTYPE 0 17 | BEGIN 18 | BLOCK "StringFileInfo" 19 | BEGIN 20 | BLOCK "040904E4" 21 | BEGIN 22 | VALUE "CompanyName", "NLnet Labs" 23 | VALUE "FileDescription", "Unbound Configuration Checker" 24 | VALUE "FileVersion", PACKAGE_VERSION 25 | VALUE "InternalName", "unbound-checkconf" 26 | VALUE "OriginalFilename", "unbound-checkconf.exe" 27 | VALUE "ProductName", "unbound" 28 | VALUE "ProductVersion", PACKAGE_VERSION 29 | VALUE "LegalCopyright", "(C) 2009 NLnet Labs. Source is BSD licensed." 30 | END 31 | END 32 | BLOCK "VarFileInfo" 33 | BEGIN 34 | /* English(409), windows ANSI codepage (1252) */ 35 | VALUE "Translation", 0x409, 0x1252 36 | END 37 | END 38 | -------------------------------------------------------------------------------- /external/unbound/winrc/rsrc_unbound_control.rc: -------------------------------------------------------------------------------- 1 | /* 2 | Unbound resource file for windows. For use with windres 3 | */ 4 | #include "winver.h" 5 | #include "config.h" 6 | 7 | 1 ICON "winrc/combined.ico" 8 | 9 | 1 VERSIONINFO 10 | FILEVERSION RSRC_PACKAGE_VERSION 11 | PRODUCTVERSION RSRC_PACKAGE_VERSION 12 | FILEFLAGSMASK 0 13 | FILEFLAGS 0 14 | FILEOS VOS__WINDOWS32 15 | FILETYPE VFT_APP 16 | FILESUBTYPE 0 17 | BEGIN 18 | BLOCK "StringFileInfo" 19 | BEGIN 20 | BLOCK "040904E4" 21 | BEGIN 22 | VALUE "CompanyName", "NLnet Labs" 23 | VALUE "FileDescription", "Unbound Remote Control Tool" 24 | VALUE "FileVersion", PACKAGE_VERSION 25 | VALUE "InternalName", "unbound-control" 26 | VALUE "OriginalFilename", "unbound-control.exe" 27 | VALUE "ProductName", "unbound" 28 | VALUE "ProductVersion", PACKAGE_VERSION 29 | VALUE "LegalCopyright", "(C) 2009 NLnet Labs. Source is BSD licensed." 30 | END 31 | END 32 | BLOCK "VarFileInfo" 33 | BEGIN 34 | /* English(409), windows ANSI codepage (1252) */ 35 | VALUE "Translation", 0x409, 0x1252 36 | END 37 | END 38 | -------------------------------------------------------------------------------- /external/unbound/winrc/rsrc_unbound_host.rc: -------------------------------------------------------------------------------- 1 | /* 2 | Unbound resource file for windows. For use with windres 3 | */ 4 | #include "winver.h" 5 | #include "config.h" 6 | 7 | 1 ICON "winrc/combined.ico" 8 | 9 | 1 VERSIONINFO 10 | FILEVERSION RSRC_PACKAGE_VERSION 11 | PRODUCTVERSION RSRC_PACKAGE_VERSION 12 | FILEFLAGSMASK 0 13 | FILEFLAGS 0 14 | FILEOS VOS__WINDOWS32 15 | FILETYPE VFT_APP 16 | FILESUBTYPE 0 17 | BEGIN 18 | BLOCK "StringFileInfo" 19 | BEGIN 20 | BLOCK "040904E4" 21 | BEGIN 22 | VALUE "CompanyName", "NLnet Labs" 23 | VALUE "FileDescription", "Unbound Lookup Utility" 24 | VALUE "FileVersion", PACKAGE_VERSION 25 | VALUE "InternalName", "unbound-host" 26 | VALUE "OriginalFilename", "unbound-host.exe" 27 | VALUE "ProductName", "unbound" 28 | VALUE "ProductVersion", PACKAGE_VERSION 29 | VALUE "LegalCopyright", "(C) 2009 NLnet Labs. Source is BSD licensed." 30 | END 31 | END 32 | BLOCK "VarFileInfo" 33 | BEGIN 34 | /* English(409), windows ANSI codepage (1252) */ 35 | VALUE "Translation", 0x409, 0x1252 36 | END 37 | END 38 | -------------------------------------------------------------------------------- /external/unbound/winrc/service.conf: -------------------------------------------------------------------------------- 1 | # Unbound configuration file on windows. 2 | # See example.conf for more settings and syntax 3 | server: 4 | # verbosity level 0-4 of logging 5 | verbosity: 0 6 | 7 | # if you want to log to a file use 8 | #logfile: "C:\unbound.log" 9 | 10 | # on Windows, this setting makes reports go into the Application log 11 | # found in ControlPanels - System tasks - Logs 12 | #use-syslog: yes 13 | 14 | -------------------------------------------------------------------------------- /external/unbound/winrc/setup_left.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BitChute/chutoken/845742c60c2211eb5f03dcabf9437f3a223ce543/external/unbound/winrc/setup_left.bmp -------------------------------------------------------------------------------- /external/unbound/winrc/setup_top.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BitChute/chutoken/845742c60c2211eb5f03dcabf9437f3a223ce543/external/unbound/winrc/setup_top.bmp -------------------------------------------------------------------------------- /external/unbound/winrc/unbound-website.url: -------------------------------------------------------------------------------- 1 | [InternetShortcut] 2 | URL=http://unbound.net/ 3 | 4 | -------------------------------------------------------------------------------- /external/unbound/winrc/unbound16.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BitChute/chutoken/845742c60c2211eb5f03dcabf9437f3a223ce543/external/unbound/winrc/unbound16.ico -------------------------------------------------------------------------------- /external/unbound/winrc/unbound32.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BitChute/chutoken/845742c60c2211eb5f03dcabf9437f3a223ce543/external/unbound/winrc/unbound32.ico -------------------------------------------------------------------------------- /external/unbound/winrc/unbound48.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BitChute/chutoken/845742c60c2211eb5f03dcabf9437f3a223ce543/external/unbound/winrc/unbound48.ico -------------------------------------------------------------------------------- /external/unbound/winrc/unbound64.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BitChute/chutoken/845742c60c2211eb5f03dcabf9437f3a223ce543/external/unbound/winrc/unbound64.ico -------------------------------------------------------------------------------- /external/unbound/winrc/unbound64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BitChute/chutoken/845742c60c2211eb5f03dcabf9437f3a223ce543/external/unbound/winrc/unbound64.png -------------------------------------------------------------------------------- /external/unbound/winrc/vista_user.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | Retrieve latest version of trust anchor 6 | 7 | 8 | 9 | 10 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /install_dependencies.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | sudo apt-get update 4 | sudo apt-get upgrade 5 | sudo apt-get install -y build-essential cmake pkg-config libboost-all-dev libssl-dev libunbound-dev libminiupnpc-dev libunwind8-dev liblzma-dev libldns-dev libexpat1-dev doxygen graphviz 6 | sudo apt-get install libgtest-dev && cd /usr/src/gtest && sudo cmake . && sudo make && sudo mv libg* /usr/lib/ 7 | -------------------------------------------------------------------------------- /snap: -------------------------------------------------------------------------------- 1 | contrib/snap -------------------------------------------------------------------------------- /src/blocks/blocks.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BitChute/chutoken/845742c60c2211eb5f03dcabf9437f3a223ce543/src/blocks/blocks.dat -------------------------------------------------------------------------------- /src/blocks/blocks.h: -------------------------------------------------------------------------------- 1 | #ifndef SRC_BLOCKS_BLOCKS_H_ 2 | #define SRC_BLOCKS_BLOCKS_H_ 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | const unsigned char *get_blocks_dat_start(int testnet); 9 | size_t get_blocks_dat_size(int testnet); 10 | 11 | #ifdef __cplusplus 12 | } 13 | #endif 14 | 15 | 16 | #endif /* SRC_BLOCKS_BLOCKS_H_ */ 17 | -------------------------------------------------------------------------------- /src/blocks/checkpoints.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BitChute/chutoken/845742c60c2211eb5f03dcabf9437f3a223ce543/src/blocks/checkpoints.dat -------------------------------------------------------------------------------- /src/blocks/testnet_blocks.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BitChute/chutoken/845742c60c2211eb5f03dcabf9437f3a223ce543/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/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/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/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/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 http://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/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 http://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/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 | // compute a keccak hash (md) of given byte length from "in" 19 | int keccak(const uint8_t *in, size_t inlen, uint8_t *md, int mdlen); 20 | 21 | // update the state 22 | void keccakf(uint64_t st[25], int norounds); 23 | 24 | void keccak1600(const uint8_t *in, size_t inlen, uint8_t *md); 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /src/version.h.in: -------------------------------------------------------------------------------- 1 | #define MONERO_VERSION_TAG "@VERSIONTAG@" 2 | #define MONERO_VERSION "0.11.1.0" 3 | #define MONERO_RELEASE_NAME "Helium Hydra" 4 | #define MONERO_VERSION_FULL MONERO_VERSION "-" MONERO_VERSION_TAG 5 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /tests/data/account-002bee2f8e16f5de4db0d3b8ce9227c8c0b7f9688348b028e022cb43f210968b40a69cdc8531fd4a2e7c9e144eec48bb477733d70ce5f9b85338a07cb10b849ad8fb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BitChute/chutoken/845742c60c2211eb5f03dcabf9437f3a223ce543/tests/data/account-002bee2f8e16f5de4db0d3b8ce9227c8c0b7f9688348b028e022cb43f210968b40a69cdc8531fd4a2e7c9e144eec48bb477733d70ce5f9b85338a07cb10b849ad8fb -------------------------------------------------------------------------------- /tests/data/account-007af2d7c5ffd8f69005debae820207820805e28c7d7a16714591143f56fb51e2b91ad0c1a535567e6292b321773df5e5aaace00fe767c4f09de452838575357ca9f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BitChute/chutoken/845742c60c2211eb5f03dcabf9437f3a223ce543/tests/data/account-007af2d7c5ffd8f69005debae820207820805e28c7d7a16714591143f56fb51e2b91ad0c1a535567e6292b321773df5e5aaace00fe767c4f09de452838575357ca9f -------------------------------------------------------------------------------- /tests/data/account-009b82d66dfaaba55a581913fa09d6c5bebe179cd73731781265c96e9e630dcd27fd5d20e7f1d0fa42619de9ca8fe4c0659f6959b2bebb15079cdaed07a442a78486: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BitChute/chutoken/845742c60c2211eb5f03dcabf9437f3a223ce543/tests/data/account-009b82d66dfaaba55a581913fa09d6c5bebe179cd73731781265c96e9e630dcd27fd5d20e7f1d0fa42619de9ca8fe4c0659f6959b2bebb15079cdaed07a442a78486 -------------------------------------------------------------------------------- /tests/data/account-00aff84db50d6a54dd56051379f6c336fdd330d1cb11e7523bbf71f30b1ae760fa47ace8679b6486f79429980fd2331715a631f5729db284eb1fc6f108aeb7a7f4fe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BitChute/chutoken/845742c60c2211eb5f03dcabf9437f3a223ce543/tests/data/account-00aff84db50d6a54dd56051379f6c336fdd330d1cb11e7523bbf71f30b1ae760fa47ace8679b6486f79429980fd2331715a631f5729db284eb1fc6f108aeb7a7f4fe -------------------------------------------------------------------------------- /tests/data/fuzz/block/BLOCK1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BitChute/chutoken/845742c60c2211eb5f03dcabf9437f3a223ce543/tests/data/fuzz/block/BLOCK1 -------------------------------------------------------------------------------- /tests/data/fuzz/block/BLOCK2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BitChute/chutoken/845742c60c2211eb5f03dcabf9437f3a223ce543/tests/data/fuzz/block/BLOCK2 -------------------------------------------------------------------------------- /tests/data/fuzz/cold-outputs/OUTPUTS1: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /tests/data/fuzz/cold-outputs/OUTPUTS2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BitChute/chutoken/845742c60c2211eb5f03dcabf9437f3a223ce543/tests/data/fuzz/cold-outputs/OUTPUTS2 -------------------------------------------------------------------------------- /tests/data/fuzz/cold-transaction/CTX1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BitChute/chutoken/845742c60c2211eb5f03dcabf9437f3a223ce543/tests/data/fuzz/cold-transaction/CTX1 -------------------------------------------------------------------------------- /tests/data/fuzz/signature/SIG1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BitChute/chutoken/845742c60c2211eb5f03dcabf9437f3a223ce543/tests/data/fuzz/signature/SIG1 -------------------------------------------------------------------------------- /tests/data/fuzz/signature/SIG2: -------------------------------------------------------------------------------- 1 | SigV1WbMcLkLKXz3Su9iFUp9aYF5vSfpVetcytVWAgqhn3KNe1kidn7M2KfTRpuK8G1ba1w2u5mbyoWbkLPy2Gm97BM4W -------------------------------------------------------------------------------- /tests/data/fuzz/transaction/TX1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BitChute/chutoken/845742c60c2211eb5f03dcabf9437f3a223ce543/tests/data/fuzz/transaction/TX1 -------------------------------------------------------------------------------- /tests/data/fuzz/transaction/TX2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BitChute/chutoken/845742c60c2211eb5f03dcabf9437f3a223ce543/tests/data/fuzz/transaction/TX2 -------------------------------------------------------------------------------- /tests/data/outputs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BitChute/chutoken/845742c60c2211eb5f03dcabf9437f3a223ce543/tests/data/outputs -------------------------------------------------------------------------------- /tests/data/signed_monero_tx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BitChute/chutoken/845742c60c2211eb5f03dcabf9437f3a223ce543/tests/data/signed_monero_tx -------------------------------------------------------------------------------- /tests/data/unsigned_monero_tx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BitChute/chutoken/845742c60c2211eb5f03dcabf9437f3a223ce543/tests/data/unsigned_monero_tx -------------------------------------------------------------------------------- /tests/data/wallet_9svHk1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BitChute/chutoken/845742c60c2211eb5f03dcabf9437f3a223ce543/tests/data/wallet_9svHk1 -------------------------------------------------------------------------------- /tests/data/wallet_9svHk1.keys: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BitChute/chutoken/845742c60c2211eb5f03dcabf9437f3a223ce543/tests/data/wallet_9svHk1.keys -------------------------------------------------------------------------------- /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.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 we overriden with enviroment 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 waller 22 | 23 | * ```send_funds.sh``` - script for seeding test wallets. Please run this script when you have ehough 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 | chutoken-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 chutoken-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 chutoken-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 chutoken-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 chutoken-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 chutoken-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 chutoken-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 chutoken-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 chutoken-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 | chutoken-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 | -------------------------------------------------------------------------------- /utils/conf/monerod.conf: -------------------------------------------------------------------------------- 1 | # Configuration for chutokend 2 | # Syntax: any command line option may be specified as 'clioptionname=value'. 3 | # See 'chutokend --help' for all available options. 4 | 5 | data-dir=/var/lib/monero 6 | log-file=/var/log/monero/monero.log 7 | log-level=0 8 | -------------------------------------------------------------------------------- /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/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/systemd/monerod.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Monero Full Node 3 | After=network.target 4 | 5 | [Service] 6 | User=monero 7 | Group=monero 8 | WorkingDirectory=~ 9 | 10 | Type=forking 11 | PIDFile=/var/run/chutokend.pid 12 | 13 | ExecStart=/usr/bin/chutokend --config-file /etc/chutokend.conf \ 14 | --detach --pidfile /var/run/chutokend.pid 15 | 16 | [Install] 17 | WantedBy=multi-user.target 18 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /version.cmake: -------------------------------------------------------------------------------- 1 | function (write_static_version_header hash) 2 | set(VERSIONTAG "${hash}") 3 | configure_file("src/version.h.in" "version/version.h") 4 | add_custom_target(version ALL) 5 | endfunction () 6 | 7 | file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/version") 8 | find_package(Git QUIET) 9 | if ("" STREQUAL "") 10 | # We're in a tarball; use hard-coded variables. 11 | write_static_version_header("release") 12 | elseif (GIT_FOUND OR Git_FOUND) 13 | message(STATUS "Found Git: ${GIT_EXECUTABLE}") 14 | set(extra_output) 15 | if (CMAKE_GENERATOR MATCHES "Ninja") 16 | # Ninja will not rerun the command every time if the file doesn't change, 17 | # so inject this bogus output so that it always runs. 18 | set(extra_output "${CMAKE_SOURCE_DIR}/.force-git-version-check") 19 | endif () 20 | add_custom_command( 21 | OUTPUT "${CMAKE_BINARY_DIR}/version/version.h" 22 | ${extra_output} 23 | COMMAND "${CMAKE_COMMAND}" 24 | "-D" "GIT=${GIT_EXECUTABLE}" 25 | "-D" "TO=${CMAKE_BINARY_DIR}/version/version.h" 26 | "-P" "src/version.cmake" 27 | WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}") 28 | add_custom_target(version ALL 29 | DEPENDS "${CMAKE_BINARY_DIR}/version/version.h") 30 | else() 31 | message(STATUS "WARNING: Git was not found!") 32 | write_static_version_header("unknown") 33 | endif () 34 | --------------------------------------------------------------------------------