ietf-openpgp
[Top] [All Lists]

Re: [openpgp] 4880bis: Update S2K

2015-04-25 12:58:29
Alessandro Barenghi 
<alessandro(_dot_)barenghi(_dot_)polimi(_at_)gmail(_dot_)com> writes:
On 04/23/2015 06:52 PM, Earle Lowe wrote:
The OpenPGP work factor is a count of bytes to hash. 
Ok, now I got the point, thanks :)

That's always been a major pain with PGP's PRF, for every other PRF in
existence you're given an iteration count and just iterate the PRF that many
times.  For PGP you're given a value encoded as some bizarro fixed-point
format crammed into a byte value (saving *three whole bytes* per message),
which you then have to reverse-engineer into an iteration count, which is what
the PRF actually works with (complicated by the fact that the byte count and
hash sizes typically don't match, so you end up having to special-case
handling around the leftover bytes at the end of the hashing process).

For the next PRF, I would hope that the iteration count is just a straight
int32 telling you how many times to cycle the PRF.

Peter.

_______________________________________________
openpgp mailing list
openpgp(_at_)ietf(_dot_)org
https://www.ietf.org/mailman/listinfo/openpgp