On Thu, Nov 01, 2012 at 09:32:23PM +0400, Solar Designer wrote: > On Tue, Sep 18, 2012 at 05:05:13PM +0200, Simon Josefsson wrote: > > Sorry, the repository was renamed... see here instead: > > > > https://www.gitorious.org/scrypt/scrypt-unix-crypt/blobs/master/unix-scrypt.txt > > OK, here's a proposed encoding: > > $7$Nrrrrrpppppsalt$hash > > "N" is one base 64 character for log2(N) > "rrrrr" is little-endian encoding of r (30 bits) > "ppppp" is little-endian encoding of p (30 bits)
BTW, the current implementation of scrypt limits r*p to 30 bits, which matches the above well. We may use a more compact encoding since at most one of r or p will fully use the 30 bits at once, but this might not be worth the added complexity. Alternatively, for r we may choose to support powers of two only, which I expect will be sufficient in practice. r is there primarily to support longer cache lines, and it feels unlikely that a future CPU will have cache line length that is not a power of two. Alexander
