package net.i2p.crypto
Core cryptographic primitives used throughout I2P: symmetric ciphers (AES, ChaCha20), hashes (SHA-1, SHA-256, SHA-384, SHA-512), HMAC and HKDF key derivation, the ElGamal and DSA/EdDSA/RedDSA engines, key and certificate utilities, and the entropy harvester.
The net.i2p.crypto.provider subpackage registers these algorithms with the Java Cryptography Architecture.
EdDSA is in net.i2p.crypto.eddsa and X25519 in net.i2p.crypto.x25519. Router-specific schemes - ECIES hybrid encryption, post-quantum KEMs, and the Double Ratchet - are in net.i2p.router.crypto.
See also: RFC 3526 (MODP groups) • RFC 5869 (HKDF) • RFC 7539 (ChaCha20) • RFC 7748 (X25519) • RFC 8032 (EdDSA) • RFC 8410 (EdDSA encoding).
- ClassDescriptionAbstract base class for AES cipher operations in I2P.Utilities for Blinding EdDSA keys.Java X.509 certificate utilities, consolidated from various places.ChaCha20, wrapper around Noise ChaChaCore.AES encryption engine using Cryptix's Rijndael implementation with CBC mode.Cache the objects used in CryptixRijndael_Algorithm.makeKey to reduce memory churn.Container for AES round keys generated during key schedule expansion.Rijndael AES algorithm implementation.Moved from
CryptixAESEngineand net.i2p.router.tasks.CryptoChecker.Prime for ElGamal from RFC 3526 Primes for DSA: Generated by TheCrypto.Simple storage of each cert in a separate file in a directory.Digital signature algorithm engine supporting DSA, ECDSA, RSA, and EdDSA.Constants for elliptic curves, from NIST FIPS 186-4 (2013) / ANSI X9.62.The parameters of one elliptic curve.Elliptic curve utility functions for cryptographic operations.ElGamal cryptographic engine for I2P encryption and signature operations.Base encryption algorithm type.Defines the properties for various encryption types that I2P supports or may someday support.Allow various components with some entropy to feed that entropy back into some PRNG.SHA-384 secure hash algorithm implementation.SHA-512 secure hash algorithm implementation.HMAC-based Key Derivation Function (HKDF) implementation using HMAC-SHA256.HMAC-SHA256 message authentication code generator for I2P cryptographic operations.Performance-optimized SecretKey implementation for HMAC operations.Abstract base class for HMAC (Hash-based Message Authentication Code) operations.Factory interface for generating I2P cryptographic key pairs.Comprehensive key generation facility for I2P cryptographic operations.A pair of I2P cryptographic keys consisting of a public key and corresponding private key.A backend for storing and retrieving SigningPublicKeys to be used for verifying signatures.Keystore utilities, consolidated from various places.Constants for RSA.A SigningPrivateKey that retains the Chinese Remainder Theorem parameters, so it can be converted back to a Java CRT key.Generate keys and a selfsigned certificate, suitable for storing in a Keystore withKeyStoreUtil.storePrivateKey(File, String, String, String, PrivateKey, List).Manage the session keys and session tags used for encryption and decryption.Implementation of the SHA-1 secure hash algorithm as specified in FIPS PUB 180-2.I2P data structure for SHA-1 hash values.Defines a wrapper for SHA-256 operation.Base signature algorithm type.Defines the context for signing with personalized hashes.Algorithm parameter specification for personalized hash contexts in digital signatures.Defines the properties for various signature types that I2P supports or may someday support.Comprehensive utility class for I2P signing keys and digital signatures.SipHash implementation with hand inlining the SIPROUND.I2P update file format handler for .su3 files.The ContentType is the trust domain for the content.An opaque handle to a TagSet returned by the SessionKeyManager, so that OCMOSJ can report that the tags were later acked, or not.Handles signing and verification of I2P update files.Precalculate the Y and K for ElGamal encryption operations.