On Wed, 03 May 2000, Scott G. Miller wrote:
> Its not working, actually... The problem is that we have to flush after
> the name of the trailing field, or the server stalls, but if we flush
> after the trailing field name, and it has a trailing field, and we write
> nulls, then we write more than DataLength bytes, and the synchronization
> is lost. This is that argument you and I had about CBC/ECB w/out pad
> handling vs stream-cipher mode.
I can't see why flushing a whole block after the trailing field name would be
absolutely necessary. You have to do it if you reach EndMessage, but when you
have a trailing field, it should start writing right away, so a flush should
not be necessary AFAIK.
It might be a little slower then without it though, and Hal's CFB variant
strikes me as simple enough, so I would say we go with that.
> > I don't talk to governments.
> I'd rather not, but I may have no choice.
They are your fault. :-)
> Code is commited, if you want a look. The problem (2) is in RawMessage,
> writeMessage(). Look for appropriate comments.
This is what I meant. Because you have a flush() that means something else in
the PrintWriter, it will then calling it on the underlying stream assuming
it can be used their for the same purposes. This is why I wanted to use a
different method, blockFlush() or something, for flushing out a block. It is
not the same as flushing the buffer on an OutputStream, which is used to clear
the buffers whenever one ends the use of a FilterOutputStream.
Also, I think you forgot the SymmetricCipherListener in your commit. We can
discuss where to place the cipher finally, it would either be within the
Connection object (what I refer to as the carrier protocol), or within the
RawMessage (the Freenet protocol), or somewhere in between. It is important
that if we place it somewhere in between, we make it as pluggable as the other
parts (I want to make a NoCipher version for the testbed in that case).
> Scott
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.0.1 (GNU/Linux)
> Comment: For info see http://www.gnupg.org
>
> iD8DBQE5D5EdpXyM95IyRhURAr/YAJ45oPb/6vQodBtEoQAq2TrmJ4IgvQCgqp5F
> 9FnPKiwL+CrBbFQe/D+mT0M=
> =7NHF
> -----END PGP SIGNATURE-----
>
>
> _______________________________________________
> Freenet-dev mailing list
> Freenet-dev at lists.sourceforge.net
> http://lists.sourceforge.net/mailman/listinfo/freenet-dev
--
Oskar Sandberg
md98-osa at nada.kth.se
#!/bin/perl -sp0777i<X+d*lMLa^*lN%0]dsXx++lMlN/dsM0<j]dsj
$/=unpack('H*',$_);$_=`echo 16dio\U$k"SK$/SM$n\EsN0p[lN*1
lK[d2%Sa2/d0$^Ixp"|dc`;s/\W//g;$_=pack('H*',/((..)*)$/)
_______________________________________________
Freenet-dev mailing list
Freenet-dev at lists.sourceforge.net
http://lists.sourceforge.net/mailman/listinfo/freenet-dev