I2P Address: [http://git.idk.i2p]
start working on a nesting-netDB design, where it is possible to segment the netDB.
This outlines a proposed way to allow Java I2P to host multiple "contexts" of NetDB, similar to i2pd.
Java I2P has existed for 20 years, and during that time it has experienced several revisions to it's NetDB. However, throughout most of that time, there has only ever been one NetDB, managed in the Router context, which is queried for data. This one-NetDB approach requires, at various layers, that the NetDB keep track individually what RouterInfos and LeaseSets are acceptable to send or store, and when. Currently, the Java I2P NetDB does this by maintaining a set of "Flags" on each "DatabaseEntry." These flags indicate the circumstances under which a LeaseSet or RouterInfo has been encountered. Without these, the router would be vulnerable to attackers who submit crafted LeaseSets in order to "Tag" clients and routers for context-confusion attacks. This is extremely complicated to maintain and keep track of the validity of any given NetDB operation, and has led to difficult to predict and difficult to fix attacks.
Background: The solution adopted in i2pd, and often lauded by those who study it, is to give each potential context in which the NetDB might be required it's own NetDB to communicate with, treating each NetDB as an entirely separate entity with each context. The simplicity of this solution has great appeal, but it is almost antithetical to the incumbent design of the NetDB in relation to the router context.
In order to maintain the existing functionality of the Java I2P router while also providing a way of interfacing
with multiple NetDB's to avoid context confusion attacks, a global "Meta-NetDB" will replace the existing NetDB,
which will consist of an interface to manage multiple Sub-NetDB's. The outer, "Meta-NetDB" is a "SegmentedNetworkDatabase
,"
and the inner, "Sub-NetDBs" are a string-addressed map of "FloodfillNetworkDatabase
s."
Base32 Address: [http://7qeve4v2chmjdqlwpa3vl7aojf3nodbku7vepnjwrsxljzqipz6a.b32.i2p] Onion Address: [http://47ggr2fa3vnwfyhvgskzdmr3i32eijwymxohtxsls45dulmriwxszjad.onion]