Introducing n2n 2.8: Modern Crypto and Data Compression

Posted · Add Comment

This is to announce the release of n2n 2.8 stable. This release brings significant new features to n2n’s crypto world and offers some compression opportunities. Overall n2n performance has been greatly enhanced, reduced bandwidth usage thanks to data compression, and as state of the art security with new crypto options. The added support for routing table manipulation might increase comfort. Besides further honing existing features, this release addresses some bugs.

New Features

  • Two lightweight stream ciphers: ChaCha20 (optional, through OpenSSL) & SPECK (integrated)
  • Full Header Encryption (including packet checksumming as well as replay protection)
  • A callback interface to better integrate n2n in third party software (you can still use it stand-alone)
  • Enable the integrated LZO1x compression
  • Add optional ZSTD compression (through zstdlib)
  • Support for changing system routes at program start and end
  • User and group id parameter for supernode
  • Application of cryptography in n2n is separately documented
  • Add a new pseudo random number generator with higher periodicity seeded with more entropy if available
  • Android users can use the hin2n to use it on their mobile phones.


  • Have AES and ChaCha20 use OpenSSL’s evp_* interface to make better use of available hardware acceleration
  • Fix invalid sendto when supernode name resolution fails
  • Update to supernode’s purge logic
  • Extended management supernode’s port output
  • Fix read tap device failed when OS wakes up from sleep
  • Free choice of supernode’s management UDP port (for multiple supernodes on one machine)
  • Additional trace messages to better indicate established connections and connection type
  • Fix edge’s register-to-supernode loop
  • Remove redundant code
  • Restructure the code in directories
  • Clean-up platform-dependant code
  • Compile fixes for Windows
  • Fix build warnings
  • …and many more under-the-hood fixes and tunings

Now we can plan for v3 on a building block that is rock solid and efficient. Many thanks to Logan oos Even who has contributed to many of the 2.8 features.