diff options
author | Riccardo Spagni <ric@spagni.net> | 2015-08-24 19:34:10 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2015-10-26 18:00:53 +0200 |
commit | bb0c161e7d4bff0e70b59c2f4267da96f34742af (patch) | |
tree | 6218bba2ad3cdaa4a8c0be027587db736a2cc946 /src/crypto/crypto_ops_builder/ref10CommentedCombined/ge_p2_dbl.q | |
parent | Merge pull request #448 (diff) | |
download | monero-bb0c161e7d4bff0e70b59c2f4267da96f34742af.tar.xz |
renamed folder
Diffstat (limited to 'src/crypto/crypto_ops_builder/ref10CommentedCombined/ge_p2_dbl.q')
-rw-r--r-- | src/crypto/crypto_ops_builder/ref10CommentedCombined/ge_p2_dbl.q | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/src/crypto/crypto_ops_builder/ref10CommentedCombined/ge_p2_dbl.q b/src/crypto/crypto_ops_builder/ref10CommentedCombined/ge_p2_dbl.q new file mode 100644 index 000000000..170d42f9a --- /dev/null +++ b/src/crypto/crypto_ops_builder/ref10CommentedCombined/ge_p2_dbl.q @@ -0,0 +1,41 @@ +:name:fe:r->X:r->Y:r->Z:r->T:t0:t1:t2:t3:t4:t5:p->X:p->Y:p->Z: +fe r:var/r=fe: + +enter f:enter/f:>X1=fe#11:>Y1=fe#12:>Z1=fe#13: +return:nofallthrough:<X3=fe#1:<Y3=fe#2:<Z3=fe#3:<T3=fe#4:leave: + +h=f+g:<f=fe:<g=fe:>h=fe:asm/fe_add(>h,<f,<g);: +h=f-g:<f=fe:<g=fe:>h=fe:asm/fe_sub(>h,<f,<g);: +h=f*g:<f=fe:<g=fe:>h=fe:asm/fe_mul(>h,<f,<g);: +h=f^2:<f=fe:>h=fe:asm/fe_sq(>h,<f);: +h=2*f^2:<f=fe:>h=fe:asm/fe_sq2(>h,<f);: +h=2*g:<g=fe:>h=fe:asm/fe_add(>h,<g,<g);: + +: + +enter ge_p2_dbl + +fe X1 +fe Y1 +fe Z1 +fe A +fe AA +fe XX +fe YY +fe B +fe X3 +fe Y3 +fe Z3 +fe T3 + +XX=X1^2 +YY=Y1^2 +B=2*Z1^2 +A=X1+Y1 +AA=A^2 +Y3=YY+XX +Z3=YY-XX +X3=AA-Y3 +T3=B-Z3 + +return |