Skip to content

chisa0a/tini2p

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tinI2P

tini2p is designed to be a header-only, minimal, modular C++ I2P libary.

See the design document for details on design decisions and project goals.

Prerequisites

Submodules

  • tiny-AES-c: https://github.com/kokke/tiny-AES-c
    • Using local fork with header-only modifications
  • NoiseC : https://github.com/tini2p/noise-c
    • Currently using local fork with modifications for NTCP2
    • Possible long-term refactor plans:
      • reimplement in native-C++ with wrappers around libsodium
      • maintain local refactored NoiseC with only needed components for I2P

Cloning tini2p

git clone --recursive https://github.com/tini2p/tini2p.git

Building tini2p

cd /path/to/tini2p

make tests
./build/tini2p-tests

make net-tests
./build/tini2p-net-tests

make coverage
# run lcov + lcov-genhtml, script + CI coming soon

Project layout

A brief overview of the project file structure (beware somewhat volatile):

  • build: Build directory
  • cmake: CMake build scripts
  • src: Project source code
    • crypto: Cryptographic implementations/wrappers
    • data: Common data structures
    • exception: Exception handling
    • ntcp2: NTCP2 implementation
  • tests: Project test suite
    • unit_tests: Unit tests
    • net_tests: Networking tests

tini2p follows a header-only library design, enabling developers to interact with the I2P network without needing a separate binary.

All test code also serves as examples for how to use/integrate tini2p.

One of the project goals is to release a reference router for users that prefer to run a binary without integrating into another project.

WIP

This project is in its earliest stages, and SHOULD NOT be used when strong anonymity is needed (yet).

Core components:

  • NTCP2 transport
  • SessionRequest crypto + message processing
  • SessionCreated crypto + message processing
  • SessionConfirmed crypto + message processing
  • DataPhase crypto + message processing
  • I2NP message processing
  • I2CP message processing
  • Garlic encryption
  • NetDb
  • LeaseSet
  • RouterInfo
  • RouterIdentity
  • RouterAddress
  • Mapping
  • Tunnels
  • RouterContext

Client components:

  • ClientContext
  • ClientDestination
  • ClientTunnels
  • AddressBook
  • Reseed
  • Key + config storage
  • Proxies (SOCKS4a/5, HTTP & ZMQ)
  • Streaming API
  • SAMv3 API

Crypto components:

  • X25519 key generation
  • X3DH Diffie-Hellman exchange
  • Ed25519 key generation, signing/verification
  • Base32/64 en/decoding
  • Blake2b hashing
  • SHA256 hashing + HMAC
  • HKDF key derivation
  • SipHash obfuscation
  • AES key generation, CBC-256 en/decryption
  • Ed25519ph key generation, signing/verification (via libsodium)
  • Ecies-X25519-AEAD-Ratchet-[HKDF-HMAC-Sha256 / HKDF-Blake2b]
    • Basic implementation
    • full implementation pending on finalized Proposal 144
  • RedDSA key generation, signing/verification
  • XEdDSA key generation, signing/verification

Global components:

  • Logging
  • Storage: LMDB (AddressBook, NetDb storage)

Only one of Ed25519ph or RedDSA need to be implemented for reseed signature processing.

Since RedDSA may also be needed for key blinding, Ed25519ph may be extraneous and unwanted.

Donate

For those beautiful spirits that want to support the cause:

XMR:

  • 8ACEQ1HiziMafAnyEdmzL2G99vKNSvRMLDdrmDNCRVczRFpShZA7YvAGzvGH1g8WMQd2iH5REkcwTKMjKCwJWdxHNoUFcGH

BTC:

  • 1MNLhCnKpagruVkcGQY4z3GvUN7r4mRdwj

Grin:

Eepsite: coming soon Onion address: coming soon

About

Minimal C++ I2P router

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 93.6%
  • CMake 4.6%
  • C 1.3%
  • Makefile 0.5%