libtomcrypt icon indicating copy to clipboard operation
libtomcrypt copied to clipboard

Format of r in poly1305?

Open donaastor opened this issue 1 year ago • 0 comments

I would like to know how is $r$ from Poly1305 represented in the poly1305_state structure? It is stored in 5 uint32's: r[0], r[1], r[2], r[3], r[4], but what is the format? Is it a little-endian in some base? Perhaps in the base of 0x3ffffff? Does it mean that r[0] is the value of r mod 0x3ffffff?

The main reason for this is to be able to check if $r$ is too small in which case I want to choose another one.

donaastor avatar May 28 '23 00:05 donaastor