i2pplus

I2P Core (core/)

The core module is the foundation of the I2P router. It provides the low-level APIs, data structures, cryptographic primitives, and native libraries that all other I2P components depend on.

Structure

Directory Description
java/src/net/i2p/client/ I2P client API for applications connecting to the router
java/src/net/i2p/crypto/ Cryptographic engines (AES, ElGamal, EdDSA, ECDSA, HMAC, SHA)
java/src/net/i2p/data/ I2P data structures (Hash, Destination, LeaseSet, Keys, Certificates)
java/src/net/i2p/internal/ Internal router interfaces consumed by other modules
java/src/net/i2p/kademlia/ Kademlia DHT implementation used for network database lookups
java/src/net/i2p/stat/ Statistics and frequency tracking
java/src/net/i2p/time/ Clock and time offset management
java/src/net/i2p/update/ Update checking and installation
java/src/net/i2p/util/ General utilities (logging, crypto helpers, native BigInteger)
java/src/net/i2p/socks/ SOCKS proxy support
java/test/ JUnit and ScalaTest tests
java/bench/ JMH benchmarks
c/jbigi/ JBIGI native library (GMP wrapper for fast modular arithmetic)
c/jcpuid/ JCPUID native library (CPU feature detection)
locale/ Translation .po files (compiled to resource bundles at build time)

Key Packages

Building

# Gradle
./gradlew :core:jar

# Ant (from repo root)
ant buildCore
# Run tests
./gradlew :core:test

# Run benchmarks
./gradlew :core:jmh

Translations are compiled from .po files into Java resource bundles automatically during the build via java/bundle-messages.sh.

Native Libraries

The c/ directory contains JNI libraries that accelerate performance-critical operations:

License

Public domain unless otherwise marked. Some components use BSD (DSA, ElGamal, SHA256 implementations), Cryptix (AES), or MIT licenses. See docs/LICENSES.md.