iden3 / circom

zkSnark circuit compiler
GNU General Public License v3.0
1.25k stars 232 forks source link

Question about fr.asm #251

Open MJJ-Shuai opened 3 months ago

MJJ-Shuai commented 3 months ago

Hi, I've been looking at the underlying code of the circom compiler. I have read the fr.asm file generated by circom compilation and I am not sure what these functions do. These functions may implement some of the key steps of Montgomery's algorithm, but I do not understand the difference between them:

    global Fr_rawMMul
    global Fr_rawMSquare
    global Fr_rawToMontgomery
    global Fr_rawFromMontgomery

I'd appreciate it if you could give me a brief introduction.