Score:0

Golang NIST P256 ARM64 ASM p256OrdMul/p256OrdSqr Montgomery Multiplication

iq flag

In go/src/crypto/internal/nistec/p256_asm_arm64.s Line 448 / 473 / 498 / 524, We can see the code mul Ord with hlp1 but NOT hlp0. According Montgomery Multiplication, shouldn't we mul Ord with hlp0?

    // First reduction step
    MUL acc0, hlp1, hlp0

    MUL const0, hlp1, t0
    ADDS    t0, acc0, acc0
    UMULH   const0, hlp0, t1

    MUL const1, hlp0, t0
    ADCS    t0, acc1, acc1
    UMULH   const1, hlp0, y0

    MUL const2, hlp0, t0
    ADCS    t0, acc2, acc2
    UMULH   const2, hlp0, acc0

    MUL const3, hlp0, t0
    ADCS    t0, acc3, acc3

    UMULH   const3, hlp0, hlp0
    ADC $0, hlp0

    ADDS    t1, acc1, acc1
    ADCS    y0, acc2, acc2
    ADCS    acc0, acc3, acc3
    ADC $0, hlp0, acc0

Word-by-Word Montgomery Multiplication (WW-MM)

((const0 x hlp1) mod 2^64 + acc0) >> 64 = ((const0 x hlp0) mod 2^64+acc0) >> 64, How to prove that this equation holds

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.