Score:1

How have the authors performed uniform random sampling for the secret values s1 and s2 in dilithium?

no flag

I am currently trying to understand and implement the design of post quantum algorithm signature algorithm Dilithium. I have read the document several times and they have just used uniform random sampling for s1 and s2 and they have not provided any algorithm regarding its calculation. Viewing the reference code, doesn't help because I am still unable to understand why have they:

  1. used 205 for multiplication
  2. right shift by 10
  3. multiplication by 5
  4. and subtraction from t0.

If this is some known algorithm, then just providing the name of the algorithm is good enough otherwise any help regarding this would be very helpful for my research. The code snippet is also attached as reference.enter image description here

Score:0
ru flag

This is simply a means to compute $t_0\mod 5$ written by someone much more interested in computational speed than code readability.

Note that $205\approx\frac{1024}5$ so that for small $x$ we have $[x/5]=[205x/1024]$. It follows that for small $x$ we have $x\mod 5=x-[x/5]*5=x-[205x/1024]*5$.

They could have used the (potentially faster) computation

t0 = t0 - (13*t0>>6)*5

but I feel no need to point this out to them and encourage such behaviour.

ijaz khalid avatar
no flag
Understood! Thank you Sir.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.