The TCP communications in the IRI sends and receives packets with 16 additional CRC32 bytes after the transaction data.

Internet TCP/IP data is already check-summed. Furthermore, malformed data will already be rejected by the IRI in processing.

It is a very fast algorithm and anyone can add the same data in their packets very quickly and easily. However, from what I can tell, there is neither a security advantage nor a data processing integrity advantage to including the CRC32 sum data.

What is the purpose of adding additional CRC32 data onto the TCP data exchanged?

edit: Just to add, the IRI node sends 1000 times more UDP packets than TCP packets and none of the UDP packets add the CRC32 checksum to the transmitted data.

Caveat: don't have any IOTA-specific sources to cite here; this is my personal opinion as a networking researcher.

Including an application-level checksum usually is a good idea.

  1. This futureproofs the application's packet format in case other transport protocols are used in the future. In this case, this is important as IOTA aims to be used for IoT, and TCP is not the "default" protocol for IoT networks, in particular it's not well suited for low-power and lossy networks. UDP and custom transport protocols are considered more suitable in these conditions.

  2. TCP checksums are not perfect. According to this answer, "traces of Internet packets from the past two years show that between 1 packet in 1,100 and 1 packet in 32,000 fails the TCP checksum". Addmittedly, that is based on a study done long ago, but there is no reason to think that today's Internet is perfect. TCP checksum is just 16 bits, so given enough packets there is a high probability an error will go undetected. Adding another checksum, in particular 32-bit checksum as in IOTA reduces this probability by several orders of magnitude.

  • @SaintHill it does not work like this - Stack Exchange sites are not discussion forums. If you have follow up questions, they should be asked separately. – kfx Mar 3 at 11:35
  • That said, it could be because UDP, if used without higher-level reliability mechanisms is not a reliable protocol anyway (there can be data loss), so just adding CRC would not solve the problem in case of UDP. Personally I would still include it even in UDP packets. – kfx Mar 3 at 11:38

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.