From ba42e00e47917d6da39b1c4056bfcd82f5efecbd Mon Sep 17 00:00:00 2001 From: dev Date: Sun, 25 Jul 2010 18:29:38 +0000 Subject: [PATCH] more or less completed BuildRequestRecord and BuildResponseRecord --- www.i2p2/pages/i2np_spec.html | 42 +++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/www.i2p2/pages/i2np_spec.html b/www.i2p2/pages/i2np_spec.html index c664412a..9221f6c2 100644 --- a/www.i2p2/pages/i2np_spec.html +++ b/www.i2p2/pages/i2np_spec.html @@ -110,12 +110,23 @@ Cleartext: +----+----+----+----+----+----+----+----+ | padding... +----+----+----+--// + +encrypted: ++----+----+----+----+----+----+----+----+ +| toPeer | ++ + +| | ++----+----+----+----+----+----+----+----+ +| encrypted data ... | + ++----+----+----+----+----+----+----+----+ {% endfilter %}

Definition

 {% filter escape %}
+unencrypted:
  *   bytes     0-3: tunnel ID to receive messages as                                                                                                                                                                
  *   bytes    4-35: local router identity hash                                                                                                                                                                      
  *   bytes   36-39: next tunnel ID                                                                                                                                                                                  
@@ -129,9 +140,40 @@ Cleartext:
  *   bytes 189-192: next message ID                                                                                                                                                                                 
  *   bytes 193-222: uninterpreted / random padding
 Taken from i2p.i2p/router/java/src/net/i2p/data/i2np/BuildRequestRecord.java
+
+encrypted:
+bytes 0-15: SHA-256-128(SHA256 hash truncated to 128bit) of the current hop's identity (the toPeer parameter)
+bytes 15-527: ElGamal-2048 encrypted block
+
 {% endfilter %}
 
+

BuildResponseRecord

+
+{% filter escape %}
+unencrypted:
++----+----+----+----+----+----+----+----+
+| random data...                        |
+
+|                                       |
++                                  +----+
+|                                  |ret |
++----+----+----+----+----+----+----+----+
+{% endfilter %}
+
+

Definition

+
+{% filter escape %}
+unencrypted:
+bytes 0-526: random data
+byte  527  : reply
+
+encrypted:
+bytes 0-527: AES-encrypted record(note: same size as BuildRequestRecord!)
+{% endfilter %}
+
+ +

Messages