comp.lang.ada
 help / color / mirror / Atom feed
From: "Julian Morrison" <julian@extropy.demon.co.uk>
Subject: Re: Arcfour in Ada
Date: Tue, 27 Feb 2001 05:07:47 +0000
Date: 2001-02-27T05:07:47+00:00	[thread overview]
Message-ID: <983250455.12217.0.nnrp-01.9e98cc46@news.demon.co.uk> (raw)
In-Reply-To: 3A9AFBB9.D658B146@multiweb.nl

"Thomas Boschloo" <nospam@multiweb.nl> wrote:

> That makes sense. I believe you could perhaps use an escape character to
> identify the end of a string. Like (and I have to dig deep into my
> memory now) when you send a bit string, you could say that '000' marks
> the end of your bit string. If you need to actualy send '000' you pad it
> like '0010' or something like that. I am a bit rusty, have to look it up
> in my old study books.

Problems with that: you have to scan and escape, scan and de-escape every
byte or byte-pair. Also over any nontrivial length of binary data, you are
likely to need many escaped characters. Worst case, this can double your
packet length. Contrast this with say a 64 bit "expect thus many bytes"
header.

Either way tho, you need to waste some overheads on that.

> [...] I don't know much about implementing TCP. I
> do know that the freedom network stopped using fixed sized packages in
> version 2.1 or something, because it took up too much bandwidth.

Yeah. Likely because most network traffic is small, so padding up to a
fixed packet size mostly wastes space. The idea of padding is to make it
impossible to use packet sizes to do traffic analysis.

The way I'm thinking of doing that for my system, is:

- each machine has a queue of multiple "inboxes", and one "outbox".

- there is one inbox per intended recipient

- inboxes are created on a first come first served basis

- any packets recieved for a recipient with an existing inbox, go into
that existing inbox

- the sender part moves the first inbox off the queue and sends it all,
then discards it and moves on to the next, etc

- to send packets, they are crammed together but then padded at
then end to an integer number of fixed size blocks.

Then the bandwith wastage is only at most a block minus one byte. Of
course in reality the algorithm will be a tad more complex, for example
having a maximum size for inboxes to prevent popular recipients typing up
the outbound line.

This relies on the assumption that in most cases, although traffic is
small, it's going repetitively to the same recipient.

> I seem to remember that they also use UDP for something but I am
> confusing myself now. The good thing about UDP is that you don't have to
> set up a connection to send data. It doesn't have to point back to you
> (which is good if you want to be anonymous).

Thanks, you gave me a useful idea there - UDP outbound can have a forged
"from" IP. Although I don't know how useful it will be in this system;
each relay needs to send an "ack" back upstream after sending its
messages. But it might be useful; I'll give it some thought.
 
> Well, who do I think I am :-) I'm sure you already know all you need to
> know and more ;-)

Heh, I'm much of a newbie too. I built my Arcfour code from the
ciphersaber cookbooks online; I'm no mathematician. Just a coder with an
algorithm and some test data to validate against.



  reply	other threads:[~2001-02-27  5:07 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-02-26  3:27 Arcfour in Ada Julian Morrison
2001-02-26 22:41 ` Thomas Boschloo
2001-02-26 23:20   ` Julian Morrison
2001-02-27  0:58     ` Thomas Boschloo
2001-02-27  5:07       ` Julian Morrison [this message]
2001-02-27  1:39   ` Larry Kilgallen
2001-02-27  3:54   ` Benjamin Goldberg
2001-02-27  5:28     ` Julian Morrison
     [not found]     ` <oXb8ZDqjoLyP@eisner.encompasserve.org>
     [not found]       ` <3A9BC5FA.FA89B58A@optonline.net>
     [not found]         ` <nMQm6.157$ms6.82520192@twister1.starband.net>
     [not found]           ` <3A9BF442.7E840E64@optonline.net>
2001-02-27 21:03             ` On RC4 in C Roger Schlafly
2001-02-27 22:57               ` William Hugh Murray
2001-02-28  0:29                 ` phil hunt
2001-02-28  5:07                 ` Anne & Lynn Wheeler
2001-02-28  5:36           ` Guy Macon
2001-03-04 12:49     ` Arcfour in Ada Thomas Boschloo
2001-03-04 13:18       ` Sam Simpson
2001-03-04 21:08       ` Julian Morrison
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox