Bill Trost <trost at cloud.rain.com> wrote:
> Open questions:
> 
> 1. Where does the "real" MIMEType of the message go?  Does the
> entire message itself constitute a message with its own headers,
> or can all the headers of the multipart message be included as
> part of part 1's headers?
>
> 2. Are the parts encrypted individually, or is the whole message
> encrypted and then split up?  Does it matter?

I think the entire "real" message (data plus "real" private metadata)
should be first constructed as usual and encrypted as a whole, as if it
were about to be inserted in the normal way.  The resulting block should
then be treated as a blob with no internal structure and cut into parts.

Each part has private metadata added to it indicating its part number, and
gets inserted as if it were a normal piece of data.  This means each part
gets encrypted again by its own part-key, just as all inserts are.  The
public headers indicate nothing.

So it looks like this:

1. When we retrieve the key intended by the author, we get an encrypted
block of data.  At this point it does not look like a multipart document.
Upon decrypting, we see this:

                MIMEType=multipart/linear
                Multipart.PartNumber=1
                Multipart.PartCount=3
                Mulitpart.Part2.Key=D013F88300744B8926D89661DDFD2E93
                Mulitpart.Part3.Key=9C858CDC8C3129073785AEB5682079BE
                Multipart.TotalLength=38362

                encrypted-block-1

2. We retrieve key D013F88300744B8926D89661DDFD2E93.  Again it does not
look like a multipart document.  We decrypt it to reveal:

                MIMEType=multipart
                Multipart.PartNumber=2
                Mulitpart.Part1.Key=E1B8115F246A85D93AE2731F0C51691D

                encrypted-block-2

3. Repeat.  Once we have retrieved all the parts, we concatenate encrypted
blocks 1-n.  This now looks like we did a normal request and got the
unsplit document.  We decrypt the whole thing, using the author-supplied
decryption key, to reveal:

                MIMEType=application/real
                Author=Brandon

                plaintext

Maybe this is one encryption too many, though.  Is it ok if concatenating
blocks 1-n gives this directly?

theo


_______________________________________________
Freenet-dev mailing list
Freenet-dev at lists.sourceforge.net
http://lists.sourceforge.net/mailman/listinfo/freenet-dev

Reply via email to