Skip to content

Commit bb1cba7

Browse files
committedFeb 8, 2023
Added links leading to new articles
1 parent fda0649 commit bb1cba7

File tree

6 files changed

+20
-3
lines changed

6 files changed

+20
-3
lines changed
 

‎docs/learn/networking/low-level-adnl.md

+6-1
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,10 @@ The receiving peer must fetch the first 4 bytes, decrypt it into the `length` fi
7373

7474
The first datagram in the session always goes from the server to the client after a handshake packet was successfully accepted by the server and it's actual buffer is empty. The client should decrypt it and disconnect from the server in case of failure, because it means that the server has not followed the protocol properly and the actual session keys differs on the server and client side.
7575

76+
### Communication details
77+
78+
If you want to dive into communication details, you could check article [ADNL TCP - Liteserver](/docs/develop/network/adnl-tcp) to see some examples.
79+
7680
### Security considerations
7781
#### Handshake padding
7882
It is unknown why the initial TON team decided to include this field into the handshake. `aes_params` integrity is protected by a SHA-256 hash and confidentiality is protected by the key derived from the `secret` parameter. Probably, it was intended to migrate from AES-CTR at some point. To do this, specification may be extended to include a special magic value in `aes_params`, which will signal that the peer is ready to use the updated primitives. The response to such a handshake may be decrypted twice, with new and old schemes, to clarify which scheme the other peer is actually using.
@@ -85,7 +89,8 @@ If an encryption key is derived only from the `secret` parameter, it will be sta
8589
It is not obvious why the `nonce` field in the datagram is present because, even without it, any two ciphertexts will differ because of the session-bounded keys for AES and encryption in CTR mode. However, the following attack can be performed in the case of an absent or predictable nonce. CTR encryption mode turns block ciphers, such as AES, into stream ciphers to make it possible to perform a bit-flipping attack. If the attacker knows the plaintext which belongs to encrypted datagram, they can obtain a pure keystream, XOR it with their own plaintext and efficiently replace the message which was sent by peer. The buffer integrity is protected by a SHA-256 hash, but an attacker can replace it too because having knowledge of a full plaintext means having knowledge of its hash. The nonce field is present to prevent such an attack, so no attacker can replace the SHA-256 without having knowledge of the nonce.
8690

8791
## P2P protocol (ADNL over UDP)
88-
TBD
92+
93+
Detailed description can be found in article [ADNL UDP - Internode](/docs/develop/network/adnl-udp).
8994

9095
## References
9196
- [The Open Network, p. 80](https://ton.org/ton.pdf)

‎docs/learn/networking/overlay-subnetworks.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,6 @@ Overlay subnetworks can be public or private.
2828
Overlay subnetworks work according to a special [gossip](https://en.wikipedia.org/wiki/Gossip_protocol) protocol.
2929

3030
:::info
31-
Read more about ADNL overlay subnetworks in Chapter 3.3 of the [TON Whitepaper](https://ton.org/docs/ton.pdf).
31+
Read more about overlays in [Overlay subnetworks](/docs/develop/network/overlay) article, or in Chapter 3.3 of the [TON Whitepaper](https://ton.org/docs/ton.pdf).
3232
:::
3333

‎docs/learn/networking/rldp.md

+4
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,7 @@ A reliable arbitrary-size datagram protocol built upon the ADNL, called RLDP,
1111
is used instead of a TCP-like protocol. This reliable datagram protocol can
1212
be employed, for instance, to send RPC queries to remote hosts and receive
1313
answers from them.
14+
15+
:::info
16+
Detailed description with examples can be found in [RLDP](/docs/develop/network/rldp) article of `develop` section.
17+
:::

‎docs/learn/networking/ton-dht.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,5 +64,5 @@ new sequence number is larger (to prevent replay attacks).
6464
TON DHT is not only used to store the IP Addresses of ADNL Nodes, but is also used for other purposes - it can store a list of addresses of the nodes which are storing a specific torrent of TON Storage, a list of addresses of nodes included in an overlay subnetwork, ADNL Addresses of TON services or ADNL Addresses of accounts of the TON Blockchain and so on.
6565

6666
:::info
67-
Read more about TON DHT in Chapter 3.2. of the [TON Whitepaper](https://ton.org/docs/ton.pdf).
67+
Read more about TON DHT in [DHT](/docs/develop/network/dht) article, or in Chapter 3.2. of the [TON Whitepaper](https://ton.org/docs/ton.pdf).
6868
:::

‎docs/learn/overviews/TL-B.md

+6
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,12 @@ The **Backus–Naur form** can be found at [TlbParser.bnf](https://github.com/an
140140
TL-B is also supported by [intellij-ton plugin](https://github.com/andreypfau/intellij-ton).
141141

142142
Docs on TL-B can be found in the [TVM Whitepaper](https://ton.org/tvm.pdf) and in a concise (they have been collected in one place) format [here](https://github.com/tonstack/TL-B-docs).
143+
143144
## Generator of serializators and deserializators
144145
An example of a generator used by a TON node can be found in the [Ton node sources](https://github.com/ton-blockchain/ton/blob/master/crypto/tl/tlbc.cpp).
145146

147+
## More about TL-B
148+
149+
If you want to know more about TL-B serialization and see some examples of complex structures parsing,
150+
you can continue by reading [TL-B](/docs/develop/data-formats/tl-b) article at `develop` section of documentation.
151+

‎docs/learn/overviews/cells.md

+2
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ Any object in TON (message, message queue, block, whole blockchain state, contra
4343
The process of serialization is described by a TL-B scheme: a formal description of how this object can be serialized into _Builder_ or how to parse an object of a given type from the _Slice_.
4444
TL-B for cells is the same as TL or ProtoBuf for byte-streams.
4545

46+
If you want to know more details about cell (de)serialization, you could read [Cell & Bag of Cells](/docs/develop/data-formats/cell-boc) article.
47+
4648
:::tip TL-B
4749
Navigate to the [TL-B](/learn/overviews/TL-B) section for more information.
4850
:::

0 commit comments

Comments
 (0)