Score:1

# How to do addition in Montgomery form?

I'm trying to do ECDSA signing, and I need to compute

$$\left(k^{-1} \bmod n \cdot (m + d\cdot r) \bmod n\right) \bmod n$$

I'm able to do the inverse function and multiplication in Montgomery form, but how should I add $$m$$? Does the arithmetic play well if I just converted $$m$$ to Montgomery form? Alternatively, I could do $$m + d\cdot r$$ in 512-bit, but things would get quite messy and slow.

Any other fast ways to do this?

Do you need the Montgomery Residue after the computation or you will turn back to the normal residue?
Score:1

Addition in Montgomery form is modular addition.

Both operands of addition, and result, are in Montgomery form.

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

### 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.