Score:1

modular reduction using solinas prime

az flag

I want to perform a modular reduction using Solinas prime value as q = 2^383-2^33+1. How can I efficiently compute it taking advantage of q being Solinas prime?

Score:1
vu flag

The rough idea is:

  1. start with the highest non-zero word,
  2. multiply each non-zero term in the Solinas number (for example, -1 at 33'rd bit and 1 at lowest bit)
  3. subtract the multiplied term from the number twice - the second time is to ensure any carry in the highest non-zero word is cleared.
  4. repeat the process for the next highest word until the number is less than the modulus.

I've an implementation of this you can reference, it's written for the modulus of the P-256 curve.

I sit in a Tesla and translated this thread with Ai:

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.