Skip Menu |

This queue is for tickets about the Crypt-VERPString CPAN distribution.

Report information
The Basics
Id: 53794
Status: open
Priority: 0/
Queue: Crypt-VERPString

People
Owner: Nobody in particular
Requestors: epimetreus [...] fastmail.fm
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Docs bug
Date: Mon, 18 Jan 2010 06:54:37 -0700
To: bug-crypt-verpstring [...] rt.cpan.org
From: Kai Moonbourn <epimetreus [...] fastmail.fm>
What exactly does "Encrypt and encode fixed-length records for VERP" mean? As I understand it, you pass encoder an arbitrary list of scalars, and it encodes them into a single string suitable for embedding in a return-path.... but what are the limitations? It would be helpful if the docs explained the following: -Input limitations; what characters aren't accepted input; minimum and/or maximum list/item lengths -What 'fixed-length' refers to, precisely - the example shows 3 items in the encrypt() list, which are not all of equal length, so what is it talking about? -Etc. Clarification would be nice. Thanks, -Kai
Subject: Re: [rt.cpan.org #53794] Docs bug
Date: Mon, 18 Jan 2010 18:58:57 -0800
To: bug-Crypt-VERPString [...] rt.cpan.org
From: dorian taylor <dorian.taylor [...] gmail.com>
Kai, On Mon, Jan 18, 2010 at 5:55 AM, Kai Moonbourn via RT <bug-Crypt-VERPString@rt.cpan.org> wrote: Show quoted text
> Mon Jan 18 08:55:08 2010: Request 53794 was acted upon. > Transaction: Ticket created by epimetreus@fastmail.fm >       Queue: Crypt-VERPString >     Subject: Docs bug >   Broken in: (no value) >    Severity: (no value) >       Owner: Nobody >  Requestors: epimetreus@fastmail.fm >      Status: new >  Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=53794 >
Thanks for bringing this to my attention. Show quoted text
> What exactly does "Encrypt and encode fixed-length records for VERP" mean?
The purpose of this module is to prepare a string of data to be appended to the local-part of an email address using D.J. Bernstein's Variable Envelope Return Path convention. The purpose of a VERP string is to uniquely identify an email message should it bounce and/or get divorced from its message-ID. The purpose of encrypting the string is to keep its contents secret from the recipient while not requiring the sender to retain a large number of nonce tokens. Show quoted text
> As I understand it, you pass encoder an arbitrary list of scalars, and > it encodes them into a single string suitable for embedding in a > return-path.... but what are the limitations? > > It would be helpful if the docs explained the following: > > -Input limitations; what characters aren't accepted input; minimum > and/or maximum list/item lengths > -What 'fixed-length' refers to, precisely - the example shows 3 items in > the encrypt() list, which are not all of equal length, so what is it > talking about? > -Etc.
The "fixed-lengthness" of the string is due to passing in a pack() format to the constructor. I agree that is not accurate, as those may indeed have variable length (now that I look, even the example shows that with the format "Na*"). The contents you can encrypt therefore have the same properties as pack(). A more accurate description would be fixed-format, as you give the pack format once to the constructor and values to fill it with each call to encrypt(), This brings me to following point. The encrypt() method takes as its first argument an integer as an initialization vector. Each subsequent argument corresponds to a field in the pack() format. In the case of that example, N is a network-endian 32-bit integer and a* is (in fact variable-length) null-padded arbitrary binary data. Therefore the arguments 12345 and 'hi i am a payload!' correspond to the format 'Na*' given in the constructor. Show quoted text
> Clarification would be nice.
You are right, it would be nice. This module, however, is a low priority for me. I have not needed what it does for almost as long as I've had it on CPAN. It is worth noting that since I uploaded it, one of its dependencies has changed somehow, as I have begun receiving automated reports of failed tests when I hadn't before. It is also worth noting that even if I did need it, I probably would employ a different strategy altogether. First, managing a big dictionary of nonces isn't as big of a deal as it used to be, as storage is orders of magnitude cheaper than it was five years ago. Second, a cipher block chain (or really any kind of nontrivial block crypto) requires a junk block at the beginning otherwise it's useless, so the length of the encrypted output is always pad(msg)+1*blocksize. Combine that with base32 encoding and you get one big-ass identifier, which you may not even be able to use, due to restrictions on certain SMTP implementations. Finally, I'm not sure but I've always wondered that if the internal structure of such a small encrypted segment were known it would permit cryptanalysis given a large enough sample. It could very well have been a lot of effort for not very much gain. I reiterate; I wouldn't use this strategy if I needed to accomplish this objective again. Regards, -- Dorian Taylor http://doriantaylor.com tel:+1-604-723-5755
Subject: Re: [rt.cpan.org #53794] Docs bug
Date: Tue, 19 Jan 2010 03:24:59 -0700
To: bug-Crypt-VERPString [...] rt.cpan.org
From: Kai Moonbourn <epimetreus [...] fastmail.fm>
Thanks for the explanation -- I don't have any desire to use it for security purposes or the like; I had just considered that it might be easier to encode a VERP into some manner of base32 or base64 string, instead of actually trying to represent it as user+domain@origin.com or some-such. It wasn't clear, to me, if this could be used in such a fashion, but I think from your explanation that I'm better off implementing it myself -- if you have any suggestions for how to make a VERP that can hold essentially arbitrary data, I'd be very curious to hear it. I might suggest you just copy/paste most of what you sent to me into the CPAN docs for that module, so other people don't come around asking the same things -- or at the very least, so it's clear there are better approaches if someone does decide it might be useful. Thanks, -Kai On 1/18/2010 7:59 PM, dorian taylor via RT wrote: Show quoted text
> <URL: http://rt.cpan.org/Ticket/Display.html?id=53794> > > Kai, > > On Mon, Jan 18, 2010 at 5:55 AM, Kai Moonbourn via RT > <bug-Crypt-VERPString@rt.cpan.org> wrote: >
>> Mon Jan 18 08:55:08 2010: Request 53794 was acted upon. >> Transaction: Ticket created by epimetreus@fastmail.fm >> Queue: Crypt-VERPString >> Subject: Docs bug >> Broken in: (no value) >> Severity: (no value) >> Owner: Nobody >> Requestors: epimetreus@fastmail.fm >> Status: new >> Ticket<URL: http://rt.cpan.org/Ticket/Display.html?id=53794> >>
> Thanks for bringing this to my attention. > >
>> What exactly does "Encrypt and encode fixed-length records for VERP" mean? >>
> The purpose of this module is to prepare a string of data to be > appended to the local-part of an email address using D.J. Bernstein's > Variable Envelope Return Path convention. The purpose of a VERP string > is to uniquely identify an email message should it bounce and/or get > divorced from its message-ID. The purpose of encrypting the string is > to keep its contents secret from the recipient while not requiring the > sender to retain a large number of nonce tokens. > >
>> As I understand it, you pass encoder an arbitrary list of scalars, and >> it encodes them into a single string suitable for embedding in a >> return-path.... but what are the limitations? >> >> It would be helpful if the docs explained the following: >> >> -Input limitations; what characters aren't accepted input; minimum >> and/or maximum list/item lengths >> -What 'fixed-length' refers to, precisely - the example shows 3 items in >> the encrypt() list, which are not all of equal length, so what is it >> talking about? >> -Etc. >>
> The "fixed-lengthness" of the string is due to passing in a pack() > format to the constructor. I agree that is not accurate, as those may > indeed have variable length (now that I look, even the example shows > that with the format "Na*"). The contents you can encrypt therefore > have the same properties as pack(). A more accurate description would > be fixed-format, as you give the pack format once to the constructor > and values to fill it with each call to encrypt(), This brings me to > following point. > > The encrypt() method takes as its first argument an integer as an > initialization vector. Each subsequent argument corresponds to a field > in the pack() format. In the case of that example, N is a > network-endian 32-bit integer and a* is (in fact variable-length) > null-padded arbitrary binary data. Therefore the arguments 12345 and > 'hi i am a payload!' correspond to the format 'Na*' given in the > constructor. > >
>> Clarification would be nice. >>
> You are right, it would be nice. This module, however, is a low > priority for me. I have not needed what it does for almost as long as > I've had it on CPAN. It is worth noting that since I uploaded it, one > of its dependencies has changed somehow, as I have begun receiving > automated reports of failed tests when I hadn't before. > > It is also worth noting that even if I did need it, I probably would > employ a different strategy altogether. First, managing a big > dictionary of nonces isn't as big of a deal as it used to be, as > storage is orders of magnitude cheaper than it was five years ago. > Second, a cipher block chain (or really any kind of nontrivial block > crypto) requires a junk block at the beginning otherwise it's useless, > so the length of the encrypted output is always pad(msg)+1*blocksize. > Combine that with base32 encoding and you get one big-ass identifier, > which you may not even be able to use, due to restrictions on certain > SMTP implementations. Finally, I'm not sure but I've always wondered > that if the internal structure of such a small encrypted segment were > known it would permit cryptanalysis given a large enough sample. It > could very well have been a lot of effort for not very much gain. > > I reiterate; I wouldn't use this strategy if I needed to accomplish > this objective again. > > Regards, > >