libp2p 0.2.3__tar.gz → 0.2.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {libp2p-0.2.3/libp2p.egg-info → libp2p-0.2.4}/PKG-INFO +3 -3
- libp2p-0.2.4/libp2p/crypto/ecc.py +134 -0
- libp2p-0.2.4/libp2p/crypto/key_exchange.py +59 -0
- {libp2p-0.2.3 → libp2p-0.2.4/libp2p.egg-info}/PKG-INFO +3 -3
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p.egg-info/requires.txt +1 -6
- {libp2p-0.2.3 → libp2p-0.2.4}/pyproject.toml +1 -1
- {libp2p-0.2.3 → libp2p-0.2.4}/setup.py +19 -28
- libp2p-0.2.3/libp2p/crypto/ecc.py +0 -82
- libp2p-0.2.3/libp2p/crypto/key_exchange.py +0 -40
- {libp2p-0.2.3 → libp2p-0.2.4}/LICENSE-APACHE +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/LICENSE-MIT +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/MANIFEST.in +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/README.md +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/examples/__init__.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/examples/chat/__init__.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/examples/chat/chat.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/examples/echo/__init__.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/examples/echo/echo.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/examples/identify/__init__.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/examples/identify/identify.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/examples/ping/__init__.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/examples/ping/ping.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/__init__.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/abc.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/crypto/__init__.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/crypto/authenticated_encryption.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/crypto/ed25519.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/crypto/exceptions.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/crypto/keys.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/crypto/pb/__init__.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/crypto/pb/crypto_pb2.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/crypto/pb/crypto_pb2.pyi +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/crypto/rsa.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/crypto/secp256k1.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/crypto/serialization.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/custom_types.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/exceptions.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/host/__init__.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/host/basic_host.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/host/defaults.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/host/exceptions.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/host/ping.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/host/routed_host.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/identity/__init__.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/identity/identify/__init__.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/identity/identify/identify.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/identity/identify/pb/__init__.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/identity/identify/pb/identify_pb2.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/identity/identify/pb/identify_pb2.pyi +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/io/__init__.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/io/abc.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/io/exceptions.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/io/msgio.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/io/trio.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/io/utils.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/network/__init__.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/network/connection/__init__.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/network/connection/exceptions.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/network/connection/raw_connection.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/network/connection/swarm_connection.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/network/exceptions.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/network/stream/__init__.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/network/stream/exceptions.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/network/stream/net_stream.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/network/swarm.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/peer/__init__.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/peer/id.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/peer/peerdata.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/peer/peerinfo.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/peer/peerstore.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/protocol_muxer/__init__.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/protocol_muxer/exceptions.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/protocol_muxer/multiselect.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/protocol_muxer/multiselect_client.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/protocol_muxer/multiselect_communicator.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/pubsub/__init__.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/pubsub/exceptions.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/pubsub/floodsub.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/pubsub/gossipsub.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/pubsub/mcache.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/pubsub/pb/__init__.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/pubsub/pb/rpc_pb2.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/pubsub/pb/rpc_pb2.pyi +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/pubsub/pubsub.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/pubsub/pubsub_notifee.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/pubsub/subscription.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/pubsub/validators.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/py.typed +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/security/__init__.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/security/base_session.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/security/base_transport.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/security/exceptions.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/security/insecure/__init__.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/security/insecure/pb/__init__.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/security/insecure/pb/plaintext_pb2.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/security/insecure/pb/plaintext_pb2.pyi +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/security/insecure/transport.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/security/noise/__init__.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/security/noise/exceptions.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/security/noise/io.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/security/noise/messages.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/security/noise/patterns.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/security/noise/pb/__init__.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/security/noise/pb/noise_pb2.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/security/noise/pb/noise_pb2.pyi +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/security/noise/transport.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/security/secio/__init__.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/security/secio/exceptions.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/security/secio/pb/__init__.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/security/secio/pb/spipe_pb2.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/security/secio/pb/spipe_pb2.pyi +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/security/secio/transport.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/security/secure_session.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/security/security_multistream.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/stream_muxer/__init__.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/stream_muxer/exceptions.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/stream_muxer/mplex/__init__.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/stream_muxer/mplex/constants.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/stream_muxer/mplex/datastructures.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/stream_muxer/mplex/exceptions.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/stream_muxer/mplex/mplex.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/stream_muxer/mplex/mplex_stream.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/stream_muxer/muxer_multistream.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/tools/__init__.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/tools/async_service/__init__.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/tools/async_service/_utils.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/tools/async_service/abc.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/tools/async_service/base.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/tools/async_service/exceptions.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/tools/async_service/stats.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/tools/async_service/trio_service.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/tools/async_service/typing.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/tools/constants.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/tools/timed_cache/__init__.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/tools/timed_cache/base_timed_cache.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/tools/timed_cache/first_seen_cache.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/tools/timed_cache/last_seen_cache.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/tools/utils.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/transport/__init__.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/transport/exceptions.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/transport/tcp/__init__.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/transport/tcp/tcp.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/transport/upgrader.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p/utils.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p.egg-info/SOURCES.txt +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p.egg-info/dependency_links.txt +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p.egg-info/entry_points.txt +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p.egg-info/not-zip-safe +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/libp2p.egg-info/top_level.txt +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/scripts/release/test_package.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/setup.cfg +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/tests/__init__.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/tests/conftest.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/tests/core/crypto/test_ed25519.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/tests/core/crypto/test_rsa.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/tests/core/crypto/test_secp256k1.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/tests/core/examples/test_examples.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/tests/core/host/test_basic_host.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/tests/core/host/test_connected_peers.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/tests/core/host/test_live_peers.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/tests/core/host/test_ping.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/tests/core/host/test_routed_host.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/tests/core/identity/identify/test_identify.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/tests/core/network/conftest.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/tests/core/network/test_net_stream.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/tests/core/network/test_notify.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/tests/core/network/test_swarm.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/tests/core/network/test_swarm_conn.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/tests/core/peer/test_addrbook.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/tests/core/peer/test_interop.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/tests/core/peer/test_peerdata.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/tests/core/peer/test_peerid.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/tests/core/peer/test_peerinfo.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/tests/core/peer/test_peermetadata.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/tests/core/peer/test_peerstore.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/tests/core/protocol_muxer/test_protocol_muxer.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/tests/core/pubsub/test_dummyaccount_demo.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/tests/core/pubsub/test_floodsub.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/tests/core/pubsub/test_gossipsub.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/tests/core/pubsub/test_gossipsub_backward_compatibility.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/tests/core/pubsub/test_mcache.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/tests/core/pubsub/test_pubsub.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/tests/core/pubsub/test_subscription.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/tests/core/security/noise/test_msg_read_writer.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/tests/core/security/noise/test_noise.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/tests/core/security/test_secio.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/tests/core/security/test_security_multistream.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/tests/core/stream_muxer/conftest.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/tests/core/stream_muxer/test_mplex_conn.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/tests/core/stream_muxer/test_mplex_stream.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/tests/core/test_import_and_version.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/tests/core/test_libp2p/test_libp2p.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/tests/core/tools/async_service/test_trio_based_service.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/tests/core/tools/async_service/test_trio_external_api.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/tests/core/tools/async_service/test_trio_manager_stats.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/tests/core/tools/timed_cache/test_timed_cache.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/tests/core/transport/test_tcp.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/tests/interop/conftest.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/tests/interop/go_pkgs/examples/README.md +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/tests/interop/go_pkgs/examples/echo/main.go +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/tests/interop/go_pkgs/examples/go.mod +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/tests/interop/go_pkgs/examples/go.sum +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/tests/interop/go_pkgs/examples/utils/host.go +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/tests/interop/go_pkgs/install_interop_go_pkgs.sh +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/tests/interop/test_bindings.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/tests/interop/test_echo.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/tests/interop/test_net_stream.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/tests/interop/test_pubsub.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/tests/utils/factories.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/tests/utils/interop/__init__.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/tests/utils/interop/constants.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/tests/utils/interop/daemon.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/tests/utils/interop/envs.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/tests/utils/interop/process.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/tests/utils/interop/utils.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/tests/utils/pubsub/__init__.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/tests/utils/pubsub/dummy_account_node.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/tests/utils/pubsub/floodsub_integration_test_settings.py +0 -0
- {libp2p-0.2.3 → libp2p-0.2.4}/tests/utils/pubsub/utils.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: libp2p
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.4
|
|
4
4
|
Summary: libp2p: The Python implementation of the libp2p networking stack
|
|
5
5
|
Home-page: https://github.com/libp2p/py-libp2p
|
|
6
6
|
Author: The Ethereum Foundation
|
|
@@ -10,6 +10,7 @@ Keywords: libp2p p2p
|
|
|
10
10
|
Platform: unix
|
|
11
11
|
Platform: linux
|
|
12
12
|
Platform: osx
|
|
13
|
+
Platform: win32
|
|
13
14
|
Classifier: Development Status :: 4 - Beta
|
|
14
15
|
Classifier: Intended Audience :: Developers
|
|
15
16
|
Classifier: License :: OSI Approved :: MIT License
|
|
@@ -39,8 +40,7 @@ Requires-Dist: pynacl>=1.3.0
|
|
|
39
40
|
Requires-Dist: rpcudp>=3.0.0
|
|
40
41
|
Requires-Dist: trio-typing>=0.0.4
|
|
41
42
|
Requires-Dist: trio>=0.26.0
|
|
42
|
-
Requires-Dist: fastecdsa
|
|
43
|
-
Requires-Dist: fastecdsa==1.7.5; sys_platform != "win32"
|
|
43
|
+
Requires-Dist: fastecdsa==1.7.5
|
|
44
44
|
Provides-Extra: dev
|
|
45
45
|
Requires-Dist: build>=0.9.0; extra == "dev"
|
|
46
46
|
Requires-Dist: bump_my_version>=0.19.0; extra == "dev"
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import sys
|
|
2
|
+
|
|
3
|
+
from libp2p.crypto.keys import (
|
|
4
|
+
KeyPair,
|
|
5
|
+
KeyType,
|
|
6
|
+
PrivateKey,
|
|
7
|
+
PublicKey,
|
|
8
|
+
)
|
|
9
|
+
|
|
10
|
+
if sys.platform != "win32":
|
|
11
|
+
from fastecdsa import (
|
|
12
|
+
keys,
|
|
13
|
+
point,
|
|
14
|
+
)
|
|
15
|
+
from fastecdsa import curve as curve_types
|
|
16
|
+
from fastecdsa.encoding.sec1 import (
|
|
17
|
+
SEC1Encoder,
|
|
18
|
+
)
|
|
19
|
+
else:
|
|
20
|
+
from coincurve import PrivateKey as CPrivateKey
|
|
21
|
+
from coincurve import PublicKey as CPublicKey
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
def infer_local_type(curve: str) -> object:
|
|
25
|
+
"""
|
|
26
|
+
Convert a str representation of some elliptic curve to a
|
|
27
|
+
representation understood by the backend of this module.
|
|
28
|
+
"""
|
|
29
|
+
if curve != "P-256":
|
|
30
|
+
raise NotImplementedError("Only P-256 curve is supported")
|
|
31
|
+
|
|
32
|
+
if sys.platform != "win32":
|
|
33
|
+
return curve_types.P256
|
|
34
|
+
return "P-256" # coincurve only supports P-256
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
if sys.platform != "win32":
|
|
38
|
+
|
|
39
|
+
class ECCPublicKey(PublicKey):
|
|
40
|
+
def __init__(self, impl: point.Point, curve: curve_types.Curve) -> None:
|
|
41
|
+
self.impl = impl
|
|
42
|
+
self.curve = curve
|
|
43
|
+
|
|
44
|
+
def to_bytes(self) -> bytes:
|
|
45
|
+
return SEC1Encoder.encode_public_key(self.impl, compressed=False)
|
|
46
|
+
|
|
47
|
+
@classmethod
|
|
48
|
+
def from_bytes(cls, data: bytes, curve: str) -> "ECCPublicKey":
|
|
49
|
+
curve_type = infer_local_type(curve)
|
|
50
|
+
public_key_impl = SEC1Encoder.decode_public_key(data, curve_type)
|
|
51
|
+
return cls(public_key_impl, curve_type)
|
|
52
|
+
|
|
53
|
+
def get_type(self) -> KeyType:
|
|
54
|
+
return KeyType.ECC_P256
|
|
55
|
+
|
|
56
|
+
def verify(self, data: bytes, signature: bytes) -> bool:
|
|
57
|
+
raise NotImplementedError()
|
|
58
|
+
|
|
59
|
+
class ECCPrivateKey(PrivateKey):
|
|
60
|
+
def __init__(self, impl: int, curve: curve_types.Curve) -> None:
|
|
61
|
+
self.impl = impl
|
|
62
|
+
self.curve = curve
|
|
63
|
+
|
|
64
|
+
@classmethod
|
|
65
|
+
def new(cls, curve: str) -> "ECCPrivateKey":
|
|
66
|
+
curve_type = infer_local_type(curve)
|
|
67
|
+
private_key_impl = keys.gen_private_key(curve_type)
|
|
68
|
+
return cls(private_key_impl, curve_type)
|
|
69
|
+
|
|
70
|
+
def to_bytes(self) -> bytes:
|
|
71
|
+
return keys.export_key(self.impl, self.curve)
|
|
72
|
+
|
|
73
|
+
def get_type(self) -> KeyType:
|
|
74
|
+
return KeyType.ECC_P256
|
|
75
|
+
|
|
76
|
+
def sign(self, data: bytes) -> bytes:
|
|
77
|
+
raise NotImplementedError()
|
|
78
|
+
|
|
79
|
+
def get_public_key(self) -> PublicKey:
|
|
80
|
+
public_key_impl = keys.get_public_key(self.impl, self.curve)
|
|
81
|
+
return ECCPublicKey(public_key_impl, self.curve)
|
|
82
|
+
|
|
83
|
+
else:
|
|
84
|
+
|
|
85
|
+
class ECCPublicKey(PublicKey):
|
|
86
|
+
def __init__(self, impl: CPublicKey, curve: str) -> None:
|
|
87
|
+
self.impl = impl
|
|
88
|
+
self.curve = curve
|
|
89
|
+
|
|
90
|
+
def to_bytes(self) -> bytes:
|
|
91
|
+
return self.impl.format(compressed=False)
|
|
92
|
+
|
|
93
|
+
@classmethod
|
|
94
|
+
def from_bytes(cls, data: bytes, curve: str) -> "ECCPublicKey":
|
|
95
|
+
curve_type = infer_local_type(curve)
|
|
96
|
+
return cls(CPublicKey(data), curve_type) # type: ignore[arg-type]
|
|
97
|
+
|
|
98
|
+
def get_type(self) -> KeyType:
|
|
99
|
+
return KeyType.ECC_P256
|
|
100
|
+
|
|
101
|
+
def verify(self, data: bytes, signature: bytes) -> bool:
|
|
102
|
+
raise NotImplementedError()
|
|
103
|
+
|
|
104
|
+
class ECCPrivateKey(PrivateKey):
|
|
105
|
+
def __init__(self, impl: CPrivateKey, curve: str) -> None:
|
|
106
|
+
self.impl = impl
|
|
107
|
+
self.curve = curve
|
|
108
|
+
|
|
109
|
+
@classmethod
|
|
110
|
+
def new(cls, curve: str) -> "ECCPrivateKey":
|
|
111
|
+
curve_type = infer_local_type(curve)
|
|
112
|
+
return cls(CPrivateKey(), curve_type) # type: ignore[arg-type]
|
|
113
|
+
|
|
114
|
+
def to_bytes(self) -> bytes:
|
|
115
|
+
return self.impl.secret
|
|
116
|
+
|
|
117
|
+
def get_type(self) -> KeyType:
|
|
118
|
+
return KeyType.ECC_P256
|
|
119
|
+
|
|
120
|
+
def sign(self, data: bytes) -> bytes:
|
|
121
|
+
raise NotImplementedError()
|
|
122
|
+
|
|
123
|
+
def get_public_key(self) -> PublicKey:
|
|
124
|
+
return ECCPublicKey(self.impl.public_key, self.curve)
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
def create_new_key_pair(curve: str) -> KeyPair:
|
|
128
|
+
"""
|
|
129
|
+
Return a new ECC keypair with the requested curve type, e.g.
|
|
130
|
+
"P-256".
|
|
131
|
+
"""
|
|
132
|
+
private_key = ECCPrivateKey.new(curve)
|
|
133
|
+
public_key = private_key.get_public_key()
|
|
134
|
+
return KeyPair(private_key, public_key)
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import sys
|
|
2
|
+
from typing import (
|
|
3
|
+
Callable,
|
|
4
|
+
cast,
|
|
5
|
+
)
|
|
6
|
+
|
|
7
|
+
if sys.platform != "win32":
|
|
8
|
+
from fastecdsa.encoding import (
|
|
9
|
+
util,
|
|
10
|
+
)
|
|
11
|
+
|
|
12
|
+
int_bytelen = util.int_bytelen
|
|
13
|
+
else:
|
|
14
|
+
from math import (
|
|
15
|
+
ceil,
|
|
16
|
+
log2,
|
|
17
|
+
)
|
|
18
|
+
|
|
19
|
+
def int_bytelen(n: int) -> int:
|
|
20
|
+
if n == 0:
|
|
21
|
+
return 1
|
|
22
|
+
return ceil(log2(abs(n) + 1) / 8)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
from libp2p.crypto.ecc import (
|
|
26
|
+
ECCPrivateKey,
|
|
27
|
+
ECCPublicKey,
|
|
28
|
+
create_new_key_pair,
|
|
29
|
+
)
|
|
30
|
+
from libp2p.crypto.keys import (
|
|
31
|
+
PublicKey,
|
|
32
|
+
)
|
|
33
|
+
|
|
34
|
+
SharedKeyGenerator = Callable[[bytes], bytes]
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
def create_ephemeral_key_pair(curve_type: str) -> tuple[PublicKey, SharedKeyGenerator]:
|
|
38
|
+
"""Facilitates ECDH key exchange."""
|
|
39
|
+
if curve_type != "P-256":
|
|
40
|
+
raise NotImplementedError()
|
|
41
|
+
|
|
42
|
+
key_pair = create_new_key_pair(curve_type)
|
|
43
|
+
|
|
44
|
+
def _key_exchange(serialized_remote_public_key: bytes) -> bytes:
|
|
45
|
+
private_key = cast(ECCPrivateKey, key_pair.private_key)
|
|
46
|
+
|
|
47
|
+
remote_point = ECCPublicKey.from_bytes(serialized_remote_public_key, curve_type)
|
|
48
|
+
|
|
49
|
+
if sys.platform != "win32":
|
|
50
|
+
secret_point = remote_point.impl * private_key.impl
|
|
51
|
+
secret_x_coordinate = secret_point.x
|
|
52
|
+
byte_size = int_bytelen(secret_x_coordinate)
|
|
53
|
+
return secret_x_coordinate.to_bytes(byte_size, byteorder="big")
|
|
54
|
+
else:
|
|
55
|
+
# Windows implementation using coincurve
|
|
56
|
+
shared_key = private_key.impl.ecdh(remote_point.impl.public_key)
|
|
57
|
+
return shared_key
|
|
58
|
+
|
|
59
|
+
return key_pair.public_key, _key_exchange
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: libp2p
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.4
|
|
4
4
|
Summary: libp2p: The Python implementation of the libp2p networking stack
|
|
5
5
|
Home-page: https://github.com/libp2p/py-libp2p
|
|
6
6
|
Author: The Ethereum Foundation
|
|
@@ -10,6 +10,7 @@ Keywords: libp2p p2p
|
|
|
10
10
|
Platform: unix
|
|
11
11
|
Platform: linux
|
|
12
12
|
Platform: osx
|
|
13
|
+
Platform: win32
|
|
13
14
|
Classifier: Development Status :: 4 - Beta
|
|
14
15
|
Classifier: Intended Audience :: Developers
|
|
15
16
|
Classifier: License :: OSI Approved :: MIT License
|
|
@@ -39,8 +40,7 @@ Requires-Dist: pynacl>=1.3.0
|
|
|
39
40
|
Requires-Dist: rpcudp>=3.0.0
|
|
40
41
|
Requires-Dist: trio-typing>=0.0.4
|
|
41
42
|
Requires-Dist: trio>=0.26.0
|
|
42
|
-
Requires-Dist: fastecdsa
|
|
43
|
-
Requires-Dist: fastecdsa==1.7.5; sys_platform != "win32"
|
|
43
|
+
Requires-Dist: fastecdsa==1.7.5
|
|
44
44
|
Provides-Extra: dev
|
|
45
45
|
Requires-Dist: build>=0.9.0; extra == "dev"
|
|
46
46
|
Requires-Dist: bump_my_version>=0.19.0; extra == "dev"
|
|
@@ -11,16 +11,11 @@ pynacl>=1.3.0
|
|
|
11
11
|
rpcudp>=3.0.0
|
|
12
12
|
trio-typing>=0.0.4
|
|
13
13
|
trio>=0.26.0
|
|
14
|
+
fastecdsa==1.7.5
|
|
14
15
|
|
|
15
16
|
[:python_version < "3.11"]
|
|
16
17
|
exceptiongroup>=1.2.0
|
|
17
18
|
|
|
18
|
-
[:sys_platform != "win32"]
|
|
19
|
-
fastecdsa==1.7.5
|
|
20
|
-
|
|
21
|
-
[:sys_platform == "win32"]
|
|
22
|
-
fastecdsa-any==1.7.5
|
|
23
|
-
|
|
24
19
|
[dev]
|
|
25
20
|
build>=0.9.0
|
|
26
21
|
bump_my_version>=0.19.0
|
|
@@ -1,11 +1,19 @@
|
|
|
1
1
|
#!/usr/bin/env python
|
|
2
|
-
import
|
|
2
|
+
import sys
|
|
3
3
|
|
|
4
4
|
from setuptools import (
|
|
5
5
|
find_packages,
|
|
6
6
|
setup,
|
|
7
7
|
)
|
|
8
8
|
|
|
9
|
+
description = "libp2p: The Python implementation of the libp2p networking stack"
|
|
10
|
+
|
|
11
|
+
# Platform-specific dependencies
|
|
12
|
+
if sys.platform == "win32":
|
|
13
|
+
crypto_requires = [] # We'll use coincurve instead of fastecdsa on Windows
|
|
14
|
+
else:
|
|
15
|
+
crypto_requires = ["fastecdsa==1.7.5"]
|
|
16
|
+
|
|
9
17
|
extras_require = {
|
|
10
18
|
"dev": [
|
|
11
19
|
"build>=0.9.0",
|
|
@@ -35,23 +43,11 @@ extras_require["dev"] = (
|
|
|
35
43
|
extras_require["dev"] + extras_require["docs"] + extras_require["test"]
|
|
36
44
|
)
|
|
37
45
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
# See the following issues for more information;
|
|
44
|
-
# https://github.com/libp2p/py-libp2p/issues/363
|
|
45
|
-
# https://github.com/AntonKueltz/fastecdsa/issues/11
|
|
46
|
-
"fastecdsa-any==1.7.5;sys_platform=='win32'",
|
|
47
|
-
# Wheels are provided for these platforms, or compiling one is minimally frustrating in a
|
|
48
|
-
# default python installation.
|
|
49
|
-
"fastecdsa==1.7.5;sys_platform!='win32'",
|
|
50
|
-
]
|
|
51
|
-
|
|
52
|
-
with open("./README.md") as readme:
|
|
53
|
-
long_description = readme.read()
|
|
54
|
-
|
|
46
|
+
try:
|
|
47
|
+
with open("./README.md", encoding="utf-8") as readme:
|
|
48
|
+
long_description = readme.read()
|
|
49
|
+
except FileNotFoundError:
|
|
50
|
+
long_description = description
|
|
55
51
|
|
|
56
52
|
install_requires = [
|
|
57
53
|
"base58>=1.0.3",
|
|
@@ -70,19 +66,14 @@ install_requires = [
|
|
|
70
66
|
"trio>=0.26.0",
|
|
71
67
|
]
|
|
72
68
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
# RTD system so we have to exclude these dependencies when we are in an RTD environment.
|
|
76
|
-
readthedocs_is_building = os.environ.get("READTHEDOCS", False)
|
|
77
|
-
if not readthedocs_is_building:
|
|
78
|
-
install_requires.extend(fastecdsa)
|
|
79
|
-
|
|
69
|
+
# Add platform-specific dependencies
|
|
70
|
+
install_requires.extend(crypto_requires)
|
|
80
71
|
|
|
81
72
|
setup(
|
|
82
73
|
name="libp2p",
|
|
83
74
|
# *IMPORTANT*: Don't manually change the version here. See Contributing docs for the release process.
|
|
84
|
-
version="0.2.
|
|
85
|
-
description=
|
|
75
|
+
version="0.2.4",
|
|
76
|
+
description=description,
|
|
86
77
|
long_description=long_description,
|
|
87
78
|
long_description_content_type="text/markdown",
|
|
88
79
|
author="The Ethereum Foundation",
|
|
@@ -111,7 +102,7 @@ setup(
|
|
|
111
102
|
"Programming Language :: Python :: 3.12",
|
|
112
103
|
"Programming Language :: Python :: 3.13",
|
|
113
104
|
],
|
|
114
|
-
platforms=["unix", "linux", "osx"],
|
|
105
|
+
platforms=["unix", "linux", "osx", "win32"],
|
|
115
106
|
entry_points={
|
|
116
107
|
"console_scripts": [
|
|
117
108
|
"chat-demo=examples.chat.chat:main",
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
from fastecdsa import (
|
|
2
|
-
keys,
|
|
3
|
-
point,
|
|
4
|
-
)
|
|
5
|
-
from fastecdsa import curve as curve_types
|
|
6
|
-
from fastecdsa.encoding.sec1 import (
|
|
7
|
-
SEC1Encoder,
|
|
8
|
-
)
|
|
9
|
-
|
|
10
|
-
from libp2p.crypto.keys import (
|
|
11
|
-
KeyPair,
|
|
12
|
-
KeyType,
|
|
13
|
-
PrivateKey,
|
|
14
|
-
PublicKey,
|
|
15
|
-
)
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
def infer_local_type(curve: str) -> curve_types.Curve:
|
|
19
|
-
"""
|
|
20
|
-
Convert a ``str`` representation of some elliptic curve to a
|
|
21
|
-
representation understood by the backend of this module.
|
|
22
|
-
"""
|
|
23
|
-
if curve == "P-256":
|
|
24
|
-
return curve_types.P256
|
|
25
|
-
else:
|
|
26
|
-
raise NotImplementedError()
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
class ECCPublicKey(PublicKey):
|
|
30
|
-
def __init__(self, impl: point.Point, curve: curve_types.Curve) -> None:
|
|
31
|
-
self.impl = impl
|
|
32
|
-
self.curve = curve
|
|
33
|
-
|
|
34
|
-
def to_bytes(self) -> bytes:
|
|
35
|
-
return SEC1Encoder.encode_public_key(self.impl, compressed=False)
|
|
36
|
-
|
|
37
|
-
@classmethod
|
|
38
|
-
def from_bytes(cls, data: bytes, curve: str) -> "ECCPublicKey":
|
|
39
|
-
curve_type = infer_local_type(curve)
|
|
40
|
-
public_key_impl = SEC1Encoder.decode_public_key(data, curve_type)
|
|
41
|
-
return cls(public_key_impl, curve_type)
|
|
42
|
-
|
|
43
|
-
def get_type(self) -> KeyType:
|
|
44
|
-
return KeyType.ECC_P256
|
|
45
|
-
|
|
46
|
-
def verify(self, data: bytes, signature: bytes) -> bool:
|
|
47
|
-
raise NotImplementedError()
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
class ECCPrivateKey(PrivateKey):
|
|
51
|
-
def __init__(self, impl: int, curve: curve_types.Curve) -> None:
|
|
52
|
-
self.impl = impl
|
|
53
|
-
self.curve = curve
|
|
54
|
-
|
|
55
|
-
@classmethod
|
|
56
|
-
def new(cls, curve: str) -> "ECCPrivateKey":
|
|
57
|
-
curve_type = infer_local_type(curve)
|
|
58
|
-
private_key_impl = keys.gen_private_key(curve_type)
|
|
59
|
-
return cls(private_key_impl, curve_type)
|
|
60
|
-
|
|
61
|
-
def to_bytes(self) -> bytes:
|
|
62
|
-
return keys.export_key(self.impl, self.curve)
|
|
63
|
-
|
|
64
|
-
def get_type(self) -> KeyType:
|
|
65
|
-
return KeyType.ECC_P256
|
|
66
|
-
|
|
67
|
-
def sign(self, data: bytes) -> bytes:
|
|
68
|
-
raise NotImplementedError()
|
|
69
|
-
|
|
70
|
-
def get_public_key(self) -> PublicKey:
|
|
71
|
-
public_key_impl = keys.get_public_key(self.impl, self.curve)
|
|
72
|
-
return ECCPublicKey(public_key_impl, self.curve)
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
def create_new_key_pair(curve: str) -> KeyPair:
|
|
76
|
-
"""
|
|
77
|
-
Return a new ECC keypair with the requested ``curve`` type, e.g.
|
|
78
|
-
"P-256".
|
|
79
|
-
"""
|
|
80
|
-
private_key = ECCPrivateKey.new(curve)
|
|
81
|
-
public_key = private_key.get_public_key()
|
|
82
|
-
return KeyPair(private_key, public_key)
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
from typing import (
|
|
2
|
-
Callable,
|
|
3
|
-
cast,
|
|
4
|
-
)
|
|
5
|
-
|
|
6
|
-
from fastecdsa.encoding import (
|
|
7
|
-
util,
|
|
8
|
-
)
|
|
9
|
-
|
|
10
|
-
from libp2p.crypto.ecc import (
|
|
11
|
-
ECCPrivateKey,
|
|
12
|
-
ECCPublicKey,
|
|
13
|
-
create_new_key_pair,
|
|
14
|
-
)
|
|
15
|
-
from libp2p.crypto.keys import (
|
|
16
|
-
PublicKey,
|
|
17
|
-
)
|
|
18
|
-
|
|
19
|
-
SharedKeyGenerator = Callable[[bytes], bytes]
|
|
20
|
-
|
|
21
|
-
int_bytelen = util.int_bytelen
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
def create_ephemeral_key_pair(curve_type: str) -> tuple[PublicKey, SharedKeyGenerator]:
|
|
25
|
-
"""Facilitates ECDH key exchange."""
|
|
26
|
-
if curve_type != "P-256":
|
|
27
|
-
raise NotImplementedError()
|
|
28
|
-
|
|
29
|
-
key_pair = create_new_key_pair(curve_type)
|
|
30
|
-
|
|
31
|
-
def _key_exchange(serialized_remote_public_key: bytes) -> bytes:
|
|
32
|
-
private_key = cast(ECCPrivateKey, key_pair.private_key)
|
|
33
|
-
|
|
34
|
-
remote_point = ECCPublicKey.from_bytes(serialized_remote_public_key, curve_type)
|
|
35
|
-
secret_point = remote_point.impl * private_key.impl
|
|
36
|
-
secret_x_coordinate = secret_point.x
|
|
37
|
-
byte_size = int_bytelen(secret_x_coordinate)
|
|
38
|
-
return secret_x_coordinate.to_bytes(byte_size, byteorder="big")
|
|
39
|
-
|
|
40
|
-
return key_pair.public_key, _key_exchange
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|