[or-cvs] correct the comments, plus a question for nick

Roger Dingledine arma at seul.org
Mon May 26 06:03:18 UTC 2003


Update of /home/or/cvsroot/src/or
In directory moria.mit.edu:/home/arma/work/onion/cvs/src/or

Modified Files:
	onion.c 
Log Message:
correct the comments, plus a question for nick


Index: onion.c
===================================================================
RCS file: /home/or/cvsroot/src/or/onion.c,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -d -r1.49 -r1.50
--- onion.c	20 May 2003 06:53:10 -0000	1.49
+++ onion.c	26 May 2003 06:03:16 -0000	1.50
@@ -418,16 +418,17 @@
 
 /*----------------------------------------------------------------------*/
 
-/* Given a router's public key, generates a 208-byte encrypted DH pubkey,
+/* Given a router's public key, generates a 144-byte encrypted DH pubkey,
  * and stores it into onion_skin out.  Stores the DH private key into 
  * handshake_state_out for later completion of the handshake.
  *
  * The encrypted pubkey is formed as follows:
  *    16 bytes of symmetric key
- *   192 bytes of g^x for DH.
+ *   128 bytes of g^x for DH.
  * The first 128 bytes are RSA-encrypted with the server's public key,
- * and the last 80 are encrypted with the symmetric key.
+ * and the last 16 are encrypted with the symmetric key.
  */
+/* FIXME: Nick: looks like we could simplify this by just using 128 bytes for g^x. */
 int
 onion_skin_create(crypto_pk_env_t *dest_router_key,
                   crypto_dh_env_t **handshake_state_out,
@@ -502,7 +503,7 @@
 }
 
 /* Given an encrypted DH public key as generated by onion_skin_create,
- * and the private key for this onion router, generate the 192-byte DH
+ * and the private key for this onion router, generate the 128-byte DH
  * reply, and key_out_len bytes of key material, stored in key_out.
  */
 int
@@ -563,7 +564,7 @@
 }
 
 /* Finish the client side of the DH handshake.
- * Given the 192 byte DH reply as generated by onion_skin_server_handshake
+ * Given the 128 byte DH reply as generated by onion_skin_server_handshake
  * and the handshake state generated by onion_skin_create, generate
  * key_out_len bytes of shared key material and store them in key_out.
  *



More information about the tor-commits mailing list