You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/wiki/EL/devp2p.md
+6-6
Original file line number
Diff line number
Diff line change
@@ -250,7 +250,7 @@ There are two additional formats able to be understand by an Ethereum node: mult
250
250
251
251
### RLPx protocol (Transport)
252
252
253
-
So far, this article has been refering to the discovering protocol only, but what about the secure information exchange process? Well, RLPx is the TCP-based transport protocol that enables secure peer-to-peer communication in the EL. It handles connection establishment, and message exchange between Ethereum nodes. The name comes from the [RLP serialization format](../EL/RLP.md).
253
+
So far, this article has been referring to the discovering protocol only, but what about the secure information exchange process? Well, RLPx is the TCP-based transport protocol that enables secure peer-to-peer communication in the EL. It handles connection establishment, and message exchange between Ethereum nodes. The name comes from the [RLP serialization format](../EL/RLP.md).
254
254
255
255
Before deep diving on the protocol, here it is a summary followed by a digram:
256
256
@@ -264,9 +264,9 @@ Before deep diving on the protocol, here it is a summary followed by a digram:
264
264
#### Secure connection establishment
265
265
266
266
Once the nodes are discovered, RLPx establishes a secure connection between them by authenticating each other through cryptographic-based handshake.
267
-
This process begins by initating an authentication where the initiator node generates an ephemeral key pair using the secp256k1 elliptic curve. This ephemeral key plays a crucial role in establishing perfect forward secrecy for the session. Then the initiator sends an authentication message including the ephemeral public key and a nonce to the recepient, which accepts the connection, decrypts and verify the auth message with the public key exchanged during the communication.
267
+
This process begins by initating an authentication where the initiator node generates an ephemeral key pair using the secp256k1 elliptic curve. This ephemeral key plays a crucial role in establishing perfect forward secrecy for the session. Then the initiator sends an authentication message including the ephemeral public key and a nonce to the recipient, which accepts the connection, decrypts and verify the auth message with the public key exchanged during the communication.
268
268
269
-
The recipient sends an acknowledge message back to the initiator, and then sends a first encrypted frame containing a [Hello message](https://github.com/ethereum/devp2p/blob/master/rlpx.md#hello-0x00) which includes the port, their IDs and their client's IDs, and the protocol information. Once the nodes have authenticaded each other, they can start with the communication.
269
+
The recipient sends an acknowledge message back to the initiator, and then sends a first encrypted frame containing a [Hello message](https://github.com/ethereum/devp2p/blob/master/rlpx.md#hello-0x00) which includes the port, their IDs and their client's IDs, and the protocol information. Once the nodes have authenticated each other, they can start with the communication.
270
270
271
271
#### Session and multiplexing
272
272
Once the authentication is proven they can interact by creating a secure session first through the following process:
@@ -279,7 +279,7 @@ Once the authentication is proven they can interact by creating a secure session
279
279
280
280
##### Encryption Process
281
281
282
-
1.**Initiator generates a random ephemeral keypair**.
282
+
1.**Initiator generates a random ephemeral key pair**.
283
283
2. Computes **shared secret** using **Elliptic Curve Diffie-Hellman (ECDH)**.
284
284
3. Derives encryption (`kE`) and MAC (`kM`) keys from the **shared secret**.
285
285
4. Encrypts the message using **AES-128-CTR**.
@@ -296,7 +296,7 @@ Once the authentication is proven they can interact by creating a secure session
296
296
297
297
##### Node Identity
298
298
299
-
-**Ethereum nodes maintain a persistent secp256k1 keypair** for identity.
299
+
-**Ethereum nodes maintain a persistent secp256k1 key pair** for identity.
300
300
- The **public key** serves as the **Node ID**.
301
301
- The **private key is stored securely** and remains unchanged across sessions.
302
302
@@ -321,7 +321,7 @@ If an attacker compromises a node’s private key, past and future communication
321
321
322
322
###### Ephemeral-Key (Forward Secrecy)
323
323
324
-
- A temporary keypair generated for each handshake, used to derive a fresh session secret.
324
+
- A temporary key pair generated for each handshake, used to derive a fresh session secret.
325
325
- Computed using ECDH between ephemeral private keys exchanged during the handshake.
326
326
327
327
Since ephemeral keys are discarded after a session ends, even if an attacker later obtains a node’s long-term private key, past communications remain secure. This property is known as forward secrecy
0 commit comments