commit 18c0f09ae785b333426793029e4226e06a236f7e
parent 43e728800f6048f4a6ee8c0178cfd895e8bce390
Author: Cedric <cedric.zwahlen@students.bfh.ch>
Date: Thu, 23 Nov 2023 02:26:12 +0100
Fix bug
We can now use it to verify signatures on the CPU. Not many optimisations have been made.
Diffstat:
5 files changed, 443 insertions(+), 201 deletions(-)
diff --git a/source/lib-gpu-verify.c b/source/lib-gpu-verify.c
@@ -13,15 +13,15 @@ int main(int argc, char** argv)
mpz_t res;
mpz_init(res);
- //mont_go(res,"13", "0F", "C7");
+ //mont_go(res,"13", "0F", "C7",16);
- mont_go(res, "0177", "F9", "0184");
+ mont_go(res, "5BD6158BDE0AC0655B6FCEA57994011D18B6B3C9E5FF75C45FC1E5EC2C1F26D6AB8547A17C0BC15D40F4346CFE74CF4EB417E6850D45C3B49E9389DAF400BC5E5B3F5D8E1E45A23DD042A87E82703209F9EA9808A002FEC00C96A5F0D9B7673B4B0A224438D81C0A9CEAD0DD22802B409230072768E73688D63EAB1C9BC242FAEDCFE0C8478B38254BAAC07AD6F82A27A0C3893FCB604BB57158F9125027AECC91D55B364B5C2BB9FE07FB6AB69F5A65112A2B7D5A805CA9B2C1CB75D315DE345BA68100DD5E46FA3BA54B614C298E60EBAF95CEC738DA2513736ECE051D153CECAC29F4A432A5FEB287E2A1B8C4640C58FF9E9E7DB6889E4865D1F1C8CF4E47", "010001", "00BB5175E55C2F1BBAE52B0C1225F43385FF54B3BFEA88B42B21044328815B8742E303C843ABE76D147861AE92D563592EFD748BF2E5BE4D76793FB32FCF6B38F755D408D114C9DF89B3FAA77EDF0C9358AC3BC23C90CDAA8337927A3530DCF2AD6EFC023C96A7932F8A7935B9B3F5C84668B41FB39059A1B723A40D59A7B1BD03F56933D641409F2A49E614BBAA9F2573ED24899840585B73329A01071793332BA92A0C9033D7004B45FD01C3A850125FA2E4A40818F8E233B7B7595ABAB04B84AE88E4F7B516359EAB7C285F399A3EFF467113DDBDB17981F2F4F2DE405BA18863046570C1621AD9446CE8A3884893CEF50933CB60053B6862E2443CC8554121", 16);
// mont_go(res, "13", "0F", "31");
- char str[256];
- mpz_get_str(str, 10, res); // result is base 10!
+ char str[2048];
+ mpz_get_str(str, 16, res); // result is base 10!
printf("%s\n",str);
diff --git a/source/montgomery.c b/source/montgomery.c
@@ -35,13 +35,15 @@ void mont_finish(mpz_t ret,
void mont_prepare_even_modulus(mpz_t m, mpz_t q, mpz_t powj);
-void mont_go(mpz_t res, char *base, char *exponent, char *modulus) {
+void mont_mulmod(mpz_t res, const mpz_t a, const mpz_t b, const mpz_t mod);
+
+void mont_go(mpz_t res, char *base, char *exponent, char *modulus, int radix) {
mpz_t b,e,m;
- mpz_init_set_str(b,base,16); // M
- mpz_init_set_str(e,exponent,16);
- mpz_init_set_str(m,modulus,16); // n
+ mpz_init_set_str(b,base,radix); // M
+ mpz_init_set_str(e,exponent,radix);
+ mpz_init_set_str(m,modulus,radix); // n
mpz_t r, r_1, ni, M, x;
mpz_init(r); // MARK: I think I have to destroy these myself
@@ -67,14 +69,14 @@ void mont_go(mpz_t res, char *base, char *exponent, char *modulus) {
// q is uneven, so we can use regular modexp
// MARK: we can improve the efficiency here by doing simple reductions
- mpz_mod(bb, b, q);
+ mpz_mod(bb, b, q); // reductions like this
mont_prepare(bb, e, q, r, r_1, ni, M, x);
mont_modexp(xx, x, e, M, q, ni, r, r_1);
mont_finish(x1, xx, q, ni, r, r_1);
- // MARK: we can also reduce and really speed this up as well
+ // MARK: we can also reduce and really speed this up as well -> binary method?
mpz_powm(x2, b, e, powj);
mpz_t y, q_1;
@@ -133,16 +135,22 @@ void mont_prepare(mpz_t b, mpz_t e, mpz_t m,
// r and n (modulus) must be relatively prime (this is a given if n (modulus) is odd)
-
// calculate r, which must be larger than the modulo and also a power of 2
- size_t len = mpz_sizeinbase(m,2) + 1;
- mpz_init_set_si(r, 1 << len); // MARK: in fact, r should be 2^64 for 2048 bit ?
- mpz_t one, o, oo; // some helper variables
- mpz_init_set_si(one,0);
- mpz_init_set_si(o,1);
+
+ // MARK: in fact, r should be 2^64 for 2048 bit ?
+
+
+
+ mpz_t one, oo; // some helper variables
+ mpz_init_set_si(one,1);
mpz_init_set_si(oo,0);
+ size_t len = mpz_sizeinbase(m,2);
+ mpz_mul_2exp(r,one,len);
+
+ mpz_set_si(one, 0);
+
mpz_gcdext(one, r_1, ni, r, m); // set r_1 and ni
int sgn = mpz_sgn(r_1);
@@ -155,19 +163,15 @@ void mont_prepare(mpz_t b, mpz_t e, mpz_t m,
mpz_sub(r_1, m, r_1);
}
-
-
- if (mpz_cmp(o, one))
+ if (mpz_cmp_ui(one, 1))
assert(0);
mpz_mul(one, r, r_1);
- mpz_mul(o,ni,m);
-
- mpz_sub(oo, one, o); // oo must be one
+ mpz_mul(oo,ni,m);
- mpz_init_set_si(one, 1);
+ mpz_sub(one, one, oo); // oo must be one
- if (mpz_cmp(oo, one))
+ if (mpz_cmp_ui(one, 1))
assert(0);
mpz_mul(M, b, r);
@@ -177,7 +181,6 @@ void mont_prepare(mpz_t b, mpz_t e, mpz_t m,
mpz_clear(one);
mpz_clear(oo);
- mpz_clear(o);
}
@@ -248,14 +251,11 @@ void mont_product(mpz_t ret,
mpz_init(m);
mpz_init(u);
- // MARK: this is the part we can accelerate...
- // because r is a power of 2 we can take shortcuts
- mpz_mul(t, a, b);
- mpz_mod(t, t, r);
- // ditto
- mpz_mul(m, t, ni);
- mpz_mod(m, m, r);
+
+ mont_mulmod(t, b, a, r);
+
+ mont_mulmod(m, ni, t, r);
mpz_t ab,mn;
@@ -282,3 +282,25 @@ void mont_product(mpz_t ret,
mpz_clear(u);
}
+
+
+// not the fastest... but it does not increase the variable sizes
+void mont_mulmod(mpz_t res, const mpz_t a, const mpz_t b, const mpz_t mod) {
+
+ mpz_t aa, bb;
+ mpz_init_set(aa, a);
+ mpz_init_set(bb,b);
+
+ mpz_mod(aa, aa, mod); // in case a is bigger
+
+ while (mpz_cmp_ui(bb, 0) > 0) {
+ if (mpz_odd_p(bb)) {
+ mpz_add(res, res, aa);
+ mpz_mod(res, res, mod);
+ }
+
+ mpz_mul_2exp(aa,aa,1);
+ mpz_mod(aa, aa, mod);
+ mpz_tdiv_q_2exp(bb, bb, 1);
+ }
+}
diff --git a/source/montgomery.h b/source/montgomery.h
@@ -14,7 +14,7 @@
#include <assert.h>
-void mont_go(mpz_t res, char *base, char *exponent, char *modulus);
+void mont_go(mpz_t res, char *base, char *exponent, char *modulus, int radix);
/*
void mont_prepare(mpz_t b, mpz_t e, mpz_t m,
mpz_t r, mpz_t r_1,
diff --git a/xcode/lib-gpu-verify.xcodeproj/project.xcworkspace/xcuserdata/cedriczwahlen.xcuserdatad/UserInterfaceState.xcuserstate b/xcode/lib-gpu-verify.xcodeproj/project.xcworkspace/xcuserdata/cedriczwahlen.xcuserdatad/UserInterfaceState.xcuserstate
Binary files differ.
diff --git a/xcode/lib-gpu-verify.xcodeproj/xcuserdata/cedriczwahlen.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/xcode/lib-gpu-verify.xcodeproj/xcuserdata/cedriczwahlen.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
@@ -1193,34 +1193,19 @@
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
uuid = "985780EE-603E-4B6C-BF80-1BB11F65F6BA"
- shouldBeEnabled = "No"
+ shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "../source/montgomery.c"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
- startingLineNumber = "182"
- endingLineNumber = "182"
+ startingLineNumber = "185"
+ endingLineNumber = "185"
landmarkName = "mont_prepare(b, e, m, r, r_1, ni, M, x)"
landmarkType = "9">
<Locations>
<Location
- uuid = "985780EE-603E-4B6C-BF80-1BB11F65F6BA - 554a9b6fb8ae965a"
- shouldBeEnabled = "Yes"
- ignoreCount = "0"
- continueAfterRunningActions = "No"
- symbolName = "mont_modexp"
- moduleName = "lib-gpu-verify"
- usesParentBreakpointCondition = "Yes"
- urlString = "file:///Users/cedriczwahlen/libgpuverify/source/montgomery.c"
- startingColumnNumber = "9223372036854775807"
- endingColumnNumber = "9223372036854775807"
- startingLineNumber = "80"
- endingLineNumber = "80"
- offsetFromSymbolStart = "4">
- </Location>
- <Location
- uuid = "985780EE-603E-4B6C-BF80-1BB11F65F6BA - 4382d64135f5dab5"
+ uuid = "985780EE-603E-4B6C-BF80-1BB11F65F6BA - 4382d64135f5d7ec"
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
@@ -1230,57 +1215,12 @@
urlString = "file:///Users/cedriczwahlen/libgpuverify/source/montgomery.c"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
- startingLineNumber = "78"
- endingLineNumber = "78"
- offsetFromSymbolStart = "613">
- </Location>
- <Location
- uuid = "985780EE-603E-4B6C-BF80-1BB11F65F6BA - 4382d64135f5db8c"
- shouldBeEnabled = "Yes"
- ignoreCount = "0"
- continueAfterRunningActions = "No"
- symbolName = "mont_prepare"
- moduleName = "lib-gpu-verify"
- usesParentBreakpointCondition = "Yes"
- urlString = "file:///Users/cedriczwahlen/libgpuverify/source/montgomery.c"
- startingColumnNumber = "9223372036854775807"
- endingColumnNumber = "9223372036854775807"
- startingLineNumber = "85"
- endingLineNumber = "85"
- offsetFromSymbolStart = "671">
- </Location>
- <Location
- uuid = "985780EE-603E-4B6C-BF80-1BB11F65F6BA - 4382d64135f5d884"
- shouldBeEnabled = "Yes"
- ignoreCount = "0"
- continueAfterRunningActions = "No"
- symbolName = "mont_prepare"
- moduleName = "lib-gpu-verify"
- usesParentBreakpointCondition = "Yes"
- urlString = "file:///Users/cedriczwahlen/libgpuverify/source/montgomery.c"
- startingColumnNumber = "9223372036854775807"
- endingColumnNumber = "9223372036854775807"
- startingLineNumber = "93"
- endingLineNumber = "93"
- offsetFromSymbolStart = "665">
- </Location>
- <Location
- uuid = "985780EE-603E-4B6C-BF80-1BB11F65F6BA - 4382d64135f5d8a5"
- shouldBeEnabled = "Yes"
- ignoreCount = "0"
- continueAfterRunningActions = "No"
- symbolName = "mont_prepare"
- moduleName = "lib-gpu-verify"
- usesParentBreakpointCondition = "Yes"
- urlString = "file:///Users/cedriczwahlen/libgpuverify/source/montgomery.c"
- startingColumnNumber = "9223372036854775807"
- endingColumnNumber = "9223372036854775807"
- startingLineNumber = "94"
- endingLineNumber = "94"
- offsetFromSymbolStart = "677">
+ startingLineNumber = "181"
+ endingLineNumber = "181"
+ offsetFromSymbolStart = "450">
</Location>
<Location
- uuid = "985780EE-603E-4B6C-BF80-1BB11F65F6BA - 4382d64135f5d884"
+ uuid = "985780EE-603E-4B6C-BF80-1BB11F65F6BA - 4382d64135f5d760"
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
@@ -1290,39 +1230,9 @@
urlString = "file:///Users/cedriczwahlen/libgpuverify/source/montgomery.c"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
- startingLineNumber = "93"
- endingLineNumber = "93"
- offsetFromSymbolStart = "677">
- </Location>
- <Location
- uuid = "985780EE-603E-4B6C-BF80-1BB11F65F6BA - 4382d64135f5d8c6"
- shouldBeEnabled = "Yes"
- ignoreCount = "0"
- continueAfterRunningActions = "No"
- symbolName = "mont_prepare"
- moduleName = "lib-gpu-verify"
- usesParentBreakpointCondition = "Yes"
- urlString = "file:///Users/cedriczwahlen/libgpuverify/source/montgomery.c"
- startingColumnNumber = "9223372036854775807"
- endingColumnNumber = "9223372036854775807"
- startingLineNumber = "95"
- endingLineNumber = "95"
- offsetFromSymbolStart = "677">
- </Location>
- <Location
- uuid = "985780EE-603E-4B6C-BF80-1BB11F65F6BA - 4382d64135f5d87a"
- shouldBeEnabled = "Yes"
- ignoreCount = "0"
- continueAfterRunningActions = "No"
- symbolName = "mont_prepare"
- moduleName = "lib-gpu-verify"
- usesParentBreakpointCondition = "Yes"
- urlString = "file:///Users/cedriczwahlen/libgpuverify/source/montgomery.c"
- startingColumnNumber = "9223372036854775807"
- endingColumnNumber = "9223372036854775807"
- startingLineNumber = "99"
- endingLineNumber = "99"
- offsetFromSymbolStart = "722">
+ startingLineNumber = "185"
+ endingLineNumber = "185"
+ offsetFromSymbolStart = "487">
</Location>
</Locations>
</BreakpointContent>
@@ -2189,68 +2099,50 @@
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
- uuid = "DB8454C8-42E4-4F53-A753-783E113BA61B"
+ uuid = "5237754D-0F3B-47A1-B768-D4F7FD47830D"
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "../source/montgomery.c"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
- startingLineNumber = "276"
- endingLineNumber = "276"
- landmarkName = "mont_product(ret, a, b, r, r_1, n, ni)"
+ startingLineNumber = "210"
+ endingLineNumber = "210"
+ landmarkName = "mont_modexp(ret, a, e, M, n, ni, r, r_1)"
landmarkType = "9">
<Locations>
<Location
- uuid = "DB8454C8-42E4-4F53-A753-783E113BA61B - 4382d80c0bf89e2c"
+ uuid = "5237754D-0F3B-47A1-B768-D4F7FD47830D - 554a9b6fb8ae9009"
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
- symbolName = "mont_product"
+ symbolName = "mont_modexp"
moduleName = "lib-gpu-verify"
usesParentBreakpointCondition = "Yes"
urlString = "file:///Users/cedriczwahlen/libgpuverify/source/montgomery.c"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
- startingLineNumber = "135"
- endingLineNumber = "135"
- offsetFromSymbolStart = "288">
+ startingLineNumber = "125"
+ endingLineNumber = "125"
+ offsetFromSymbolStart = "231">
</Location>
<Location
- uuid = "DB8454C8-42E4-4F53-A753-783E113BA61B - 4382d80c0bf897b3"
+ uuid = "5237754D-0F3B-47A1-B768-D4F7FD47830D - 554a9b6fb8ae9009"
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
- symbolName = "mont_product"
+ symbolName = "mont_modexp"
moduleName = "lib-gpu-verify"
usesParentBreakpointCondition = "Yes"
urlString = "file:///Users/cedriczwahlen/libgpuverify/source/montgomery.c"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
- startingLineNumber = "186"
- endingLineNumber = "186"
- offsetFromSymbolStart = "288">
+ startingLineNumber = "125"
+ endingLineNumber = "125"
+ offsetFromSymbolStart = "250">
</Location>
- </Locations>
- </BreakpointContent>
- </BreakpointProxy>
- <BreakpointProxy
- BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
- <BreakpointContent
- uuid = "5237754D-0F3B-47A1-B768-D4F7FD47830D"
- shouldBeEnabled = "No"
- ignoreCount = "0"
- continueAfterRunningActions = "No"
- filePath = "../source/montgomery.c"
- startingColumnNumber = "9223372036854775807"
- endingColumnNumber = "9223372036854775807"
- startingLineNumber = "207"
- endingLineNumber = "207"
- landmarkName = "mont_modexp(ret, a, e, M, n, ni, r, r_1)"
- landmarkType = "9">
- <Locations>
<Location
- uuid = "5237754D-0F3B-47A1-B768-D4F7FD47830D - 554a9b6fb8ae9009"
+ uuid = "5237754D-0F3B-47A1-B768-D4F7FD47830D - 554a9b6fb8ae938d"
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
@@ -2260,12 +2152,12 @@
urlString = "file:///Users/cedriczwahlen/libgpuverify/source/montgomery.c"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
- startingLineNumber = "125"
- endingLineNumber = "125"
- offsetFromSymbolStart = "231">
+ startingLineNumber = "121"
+ endingLineNumber = "121"
+ offsetFromSymbolStart = "250">
</Location>
<Location
- uuid = "5237754D-0F3B-47A1-B768-D4F7FD47830D - 554a9b6fb8ae9009"
+ uuid = "5237754D-0F3B-47A1-B768-D4F7FD47830D - 554a9b6fb8ae9360"
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
@@ -2275,12 +2167,12 @@
urlString = "file:///Users/cedriczwahlen/libgpuverify/source/montgomery.c"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
- startingLineNumber = "125"
- endingLineNumber = "125"
- offsetFromSymbolStart = "250">
+ startingLineNumber = "118"
+ endingLineNumber = "118"
+ offsetFromSymbolStart = "230">
</Location>
<Location
- uuid = "5237754D-0F3B-47A1-B768-D4F7FD47830D - 554a9b6fb8ae938d"
+ uuid = "5237754D-0F3B-47A1-B768-D4F7FD47830D - 554a9b6fb8ae865e"
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
@@ -2290,12 +2182,12 @@
urlString = "file:///Users/cedriczwahlen/libgpuverify/source/montgomery.c"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
- startingLineNumber = "121"
- endingLineNumber = "121"
- offsetFromSymbolStart = "250">
+ startingLineNumber = "204"
+ endingLineNumber = "204"
+ offsetFromSymbolStart = "212">
</Location>
<Location
- uuid = "5237754D-0F3B-47A1-B768-D4F7FD47830D - 554a9b6fb8ae9360"
+ uuid = "5237754D-0F3B-47A1-B768-D4F7FD47830D - 554a9b6fb8ae8698"
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
@@ -2305,9 +2197,24 @@
urlString = "file:///Users/cedriczwahlen/libgpuverify/source/montgomery.c"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
- startingLineNumber = "118"
- endingLineNumber = "118"
- offsetFromSymbolStart = "230">
+ startingLineNumber = "206"
+ endingLineNumber = "206"
+ offsetFromSymbolStart = "212">
+ </Location>
+ <Location
+ uuid = "5237754D-0F3B-47A1-B768-D4F7FD47830D - 554a9b6fb8ae86fb"
+ shouldBeEnabled = "Yes"
+ ignoreCount = "0"
+ continueAfterRunningActions = "No"
+ symbolName = "mont_modexp"
+ moduleName = "lib-gpu-verify"
+ usesParentBreakpointCondition = "Yes"
+ urlString = "file:///Users/cedriczwahlen/libgpuverify/source/montgomery.c"
+ startingColumnNumber = "9223372036854775807"
+ endingColumnNumber = "9223372036854775807"
+ startingLineNumber = "207"
+ endingLineNumber = "207"
+ offsetFromSymbolStart = "212">
</Location>
</Locations>
</BreakpointContent>
@@ -2322,9 +2229,9 @@
filePath = "../source/montgomery.c"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
- startingLineNumber = "95"
- endingLineNumber = "95"
- landmarkName = "mont_go(res, base, exponent, modulus)"
+ startingLineNumber = "97"
+ endingLineNumber = "97"
+ landmarkName = "mont_go(res, base, exponent, modulus, radix)"
landmarkType = "9">
<Locations>
<Location
@@ -2372,6 +2279,36 @@
endingLineNumber = "95"
offsetFromSymbolStart = "660">
</Location>
+ <Location
+ uuid = "2EF66FC4-83FF-48DC-BD74-7DCAF53542F8 - 509351695818d924"
+ shouldBeEnabled = "Yes"
+ ignoreCount = "0"
+ continueAfterRunningActions = "No"
+ symbolName = "mont_go"
+ moduleName = "lib-gpu-verify"
+ usesParentBreakpointCondition = "Yes"
+ urlString = "file:///Users/cedriczwahlen/libgpuverify/source/montgomery.c"
+ startingColumnNumber = "9223372036854775807"
+ endingColumnNumber = "9223372036854775807"
+ startingLineNumber = "95"
+ endingLineNumber = "95"
+ offsetFromSymbolStart = "670">
+ </Location>
+ <Location
+ uuid = "2EF66FC4-83FF-48DC-BD74-7DCAF53542F8 - 509351695818d9da"
+ shouldBeEnabled = "Yes"
+ ignoreCount = "0"
+ continueAfterRunningActions = "No"
+ symbolName = "mont_go"
+ moduleName = "lib-gpu-verify"
+ usesParentBreakpointCondition = "Yes"
+ urlString = "file:///Users/cedriczwahlen/libgpuverify/source/montgomery.c"
+ startingColumnNumber = "9223372036854775807"
+ endingColumnNumber = "9223372036854775807"
+ startingLineNumber = "97"
+ endingLineNumber = "97"
+ offsetFromSymbolStart = "670">
+ </Location>
</Locations>
</BreakpointContent>
</BreakpointProxy>
@@ -2385,9 +2322,9 @@
filePath = "../source/montgomery.c"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
- startingLineNumber = "80"
- endingLineNumber = "80"
- landmarkName = "mont_go(res, base, exponent, modulus)"
+ startingLineNumber = "82"
+ endingLineNumber = "82"
+ landmarkName = "mont_go(res, base, exponent, modulus, radix)"
landmarkType = "9">
<Locations>
<Location
@@ -2433,9 +2370,9 @@
filePath = "../source/montgomery.c"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
- startingLineNumber = "86"
- endingLineNumber = "86"
- landmarkName = "mont_go(res, base, exponent, modulus)"
+ startingLineNumber = "88"
+ endingLineNumber = "88"
+ landmarkName = "mont_go(res, base, exponent, modulus, radix)"
landmarkType = "9">
<Locations>
<Location
@@ -2483,6 +2420,36 @@
endingLineNumber = "86"
offsetFromSymbolStart = "537">
</Location>
+ <Location
+ uuid = "B5C8842D-43A1-48AF-B843-DA7C249FABDD - 509351695818da4f"
+ shouldBeEnabled = "Yes"
+ ignoreCount = "0"
+ continueAfterRunningActions = "No"
+ symbolName = "mont_go"
+ moduleName = "lib-gpu-verify"
+ usesParentBreakpointCondition = "Yes"
+ urlString = "file:///Users/cedriczwahlen/libgpuverify/source/montgomery.c"
+ startingColumnNumber = "9223372036854775807"
+ endingColumnNumber = "9223372036854775807"
+ startingLineNumber = "86"
+ endingLineNumber = "86"
+ offsetFromSymbolStart = "547">
+ </Location>
+ <Location
+ uuid = "B5C8842D-43A1-48AF-B843-DA7C249FABDD - 509351695818da0d"
+ shouldBeEnabled = "Yes"
+ ignoreCount = "0"
+ continueAfterRunningActions = "No"
+ symbolName = "mont_go"
+ moduleName = "lib-gpu-verify"
+ usesParentBreakpointCondition = "Yes"
+ urlString = "file:///Users/cedriczwahlen/libgpuverify/source/montgomery.c"
+ startingColumnNumber = "9223372036854775807"
+ endingColumnNumber = "9223372036854775807"
+ startingLineNumber = "88"
+ endingLineNumber = "88"
+ offsetFromSymbolStart = "547">
+ </Location>
</Locations>
</BreakpointContent>
</BreakpointProxy>
@@ -2496,9 +2463,9 @@
filePath = "../source/montgomery.c"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
- startingLineNumber = "72"
- endingLineNumber = "72"
- landmarkName = "mont_go(res, base, exponent, modulus)"
+ startingLineNumber = "74"
+ endingLineNumber = "74"
+ landmarkName = "mont_go(res, base, exponent, modulus, radix)"
landmarkType = "9">
<Locations>
<Location
@@ -2531,6 +2498,36 @@
endingLineNumber = "72"
offsetFromSymbolStart = "312">
</Location>
+ <Location
+ uuid = "5B4EE098-39B2-40C9-B573-DEFE8DCB7F4E - 509351695819241d"
+ shouldBeEnabled = "Yes"
+ ignoreCount = "0"
+ continueAfterRunningActions = "No"
+ symbolName = "mont_go"
+ moduleName = "lib-gpu-verify"
+ usesParentBreakpointCondition = "Yes"
+ urlString = "file:///Users/cedriczwahlen/libgpuverify/source/montgomery.c"
+ startingColumnNumber = "9223372036854775807"
+ endingColumnNumber = "9223372036854775807"
+ startingLineNumber = "72"
+ endingLineNumber = "72"
+ offsetFromSymbolStart = "322">
+ </Location>
+ <Location
+ uuid = "5B4EE098-39B2-40C9-B573-DEFE8DCB7F4E - 50935169581924d3"
+ shouldBeEnabled = "Yes"
+ ignoreCount = "0"
+ continueAfterRunningActions = "No"
+ symbolName = "mont_go"
+ moduleName = "lib-gpu-verify"
+ usesParentBreakpointCondition = "Yes"
+ urlString = "file:///Users/cedriczwahlen/libgpuverify/source/montgomery.c"
+ startingColumnNumber = "9223372036854775807"
+ endingColumnNumber = "9223372036854775807"
+ startingLineNumber = "74"
+ endingLineNumber = "74"
+ offsetFromSymbolStart = "322">
+ </Location>
</Locations>
</BreakpointContent>
</BreakpointProxy>
@@ -2544,8 +2541,8 @@
filePath = "../source/montgomery.c"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
- startingLineNumber = "160"
- endingLineNumber = "160"
+ startingLineNumber = "166"
+ endingLineNumber = "166"
landmarkName = "mont_prepare(b, e, m, r, r_1, ni, M, x)"
landmarkType = "9">
<Locations>
@@ -2592,8 +2589,8 @@
filePath = "../source/montgomery.c"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
- startingLineNumber = "150"
- endingLineNumber = "150"
+ startingLineNumber = "158"
+ endingLineNumber = "158"
landmarkName = "mont_prepare(b, e, m, r, r_1, ni, M, x)"
landmarkType = "9">
<Locations>
@@ -2633,18 +2630,241 @@
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
- uuid = "A248494D-2839-48D5-B2FA-0923BE649C1F"
+ uuid = "1F76F5C8-15BF-4157-A430-19FF317E722F"
+ shouldBeEnabled = "No"
+ ignoreCount = "0"
+ continueAfterRunningActions = "No"
+ filePath = "../source/montgomery.c"
+ startingColumnNumber = "9223372036854775807"
+ endingColumnNumber = "9223372036854775807"
+ startingLineNumber = "130"
+ endingLineNumber = "130"
+ landmarkName = "mont_prepare(b, e, m, r, r_1, ni, M, x)"
+ landmarkType = "9">
+ </BreakpointContent>
+ </BreakpointProxy>
+ <BreakpointProxy
+ BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+ <BreakpointContent
+ uuid = "CE0189C6-0135-4BE6-B729-0B05FC72BD43"
+ shouldBeEnabled = "No"
+ ignoreCount = "0"
+ continueAfterRunningActions = "No"
+ filePath = "../source/montgomery.c"
+ startingColumnNumber = "9223372036854775807"
+ endingColumnNumber = "9223372036854775807"
+ startingLineNumber = "189"
+ endingLineNumber = "189"
+ landmarkName = "mont_modexp(ret, a, e, M, n, ni, r, r_1)"
+ landmarkType = "9">
+ <Locations>
+ <Location
+ uuid = "CE0189C6-0135-4BE6-B729-0B05FC72BD43 - 554a9b6fb8ae9977"
+ shouldBeEnabled = "Yes"
+ ignoreCount = "0"
+ continueAfterRunningActions = "No"
+ symbolName = "mont_modexp"
+ moduleName = "lib-gpu-verify"
+ usesParentBreakpointCondition = "Yes"
+ urlString = "file:///Users/cedriczwahlen/libgpuverify/source/montgomery.c"
+ startingColumnNumber = "9223372036854775807"
+ endingColumnNumber = "9223372036854775807"
+ startingLineNumber = "195"
+ endingLineNumber = "195"
+ offsetFromSymbolStart = "54">
+ </Location>
+ <Location
+ uuid = "CE0189C6-0135-4BE6-B729-0B05FC72BD43 - 554a9b6fb8ae988b"
+ shouldBeEnabled = "Yes"
+ ignoreCount = "0"
+ continueAfterRunningActions = "No"
+ symbolName = "mont_modexp"
+ moduleName = "lib-gpu-verify"
+ usesParentBreakpointCondition = "Yes"
+ urlString = "file:///Users/cedriczwahlen/libgpuverify/source/montgomery.c"
+ startingColumnNumber = "9223372036854775807"
+ endingColumnNumber = "9223372036854775807"
+ startingLineNumber = "191"
+ endingLineNumber = "191"
+ offsetFromSymbolStart = "54">
+ </Location>
+ </Locations>
+ </BreakpointContent>
+ </BreakpointProxy>
+ <BreakpointProxy
+ BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+ <BreakpointContent
+ uuid = "4725101A-CB5E-41D3-BEC9-15B3806D1AC8"
+ shouldBeEnabled = "No"
+ ignoreCount = "0"
+ continueAfterRunningActions = "No"
+ filePath = "../source/montgomery.c"
+ startingColumnNumber = "9223372036854775807"
+ endingColumnNumber = "9223372036854775807"
+ startingLineNumber = "281"
+ endingLineNumber = "281"
+ landmarkName = "mont_product(ret, a, b, r, r_1, n, ni)"
+ landmarkType = "9">
+ </BreakpointContent>
+ </BreakpointProxy>
+ <BreakpointProxy
+ BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+ <BreakpointContent
+ uuid = "73788825-A8DA-42FF-A5ED-8299384A888E"
+ shouldBeEnabled = "No"
+ ignoreCount = "0"
+ continueAfterRunningActions = "No"
+ filePath = "../source/montgomery.c"
+ startingColumnNumber = "9223372036854775807"
+ endingColumnNumber = "9223372036854775807"
+ startingLineNumber = "203"
+ endingLineNumber = "203"
+ landmarkName = "mont_modexp(ret, a, e, M, n, ni, r, r_1)"
+ landmarkType = "9">
+ </BreakpointContent>
+ </BreakpointProxy>
+ <BreakpointProxy
+ BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+ <BreakpointContent
+ uuid = "86FC3761-67BB-4DAB-B3B0-54F0F7748C46"
+ shouldBeEnabled = "No"
+ ignoreCount = "0"
+ continueAfterRunningActions = "No"
+ filePath = "../source/montgomery.c"
+ startingColumnNumber = "9223372036854775807"
+ endingColumnNumber = "9223372036854775807"
+ startingLineNumber = "242"
+ endingLineNumber = "242"
+ landmarkName = "mont_product(ret, a, b, r, r_1, n, ni)"
+ landmarkType = "9">
+ <Locations>
+ <Location
+ uuid = "86FC3761-67BB-4DAB-B3B0-54F0F7748C46 - 4382d80c0bf88c39"
+ shouldBeEnabled = "Yes"
+ ignoreCount = "0"
+ continueAfterRunningActions = "No"
+ symbolName = "mont_product"
+ moduleName = "lib-gpu-verify"
+ usesParentBreakpointCondition = "Yes"
+ urlString = "file:///Users/cedriczwahlen/libgpuverify/source/montgomery.c"
+ startingColumnNumber = "9223372036854775807"
+ endingColumnNumber = "9223372036854775807"
+ startingLineNumber = "244"
+ endingLineNumber = "244"
+ offsetFromSymbolStart = "59">
+ </Location>
+ <Location
+ uuid = "86FC3761-67BB-4DAB-B3B0-54F0F7748C46 - 4382d80c0bf88c7f"
+ shouldBeEnabled = "Yes"
+ ignoreCount = "0"
+ continueAfterRunningActions = "No"
+ symbolName = "mont_product"
+ moduleName = "lib-gpu-verify"
+ usesParentBreakpointCondition = "Yes"
+ urlString = "file:///Users/cedriczwahlen/libgpuverify/source/montgomery.c"
+ startingColumnNumber = "9223372036854775807"
+ endingColumnNumber = "9223372036854775807"
+ startingLineNumber = "246"
+ endingLineNumber = "246"
+ offsetFromSymbolStart = "59">
+ </Location>
+ <Location
+ uuid = "86FC3761-67BB-4DAB-B3B0-54F0F7748C46 - 4382d80c0bf88c5c"
+ shouldBeEnabled = "Yes"
+ ignoreCount = "0"
+ continueAfterRunningActions = "No"
+ symbolName = "mont_product"
+ moduleName = "lib-gpu-verify"
+ usesParentBreakpointCondition = "Yes"
+ urlString = "file:///Users/cedriczwahlen/libgpuverify/source/montgomery.c"
+ startingColumnNumber = "9223372036854775807"
+ endingColumnNumber = "9223372036854775807"
+ startingLineNumber = "247"
+ endingLineNumber = "247"
+ offsetFromSymbolStart = "59">
+ </Location>
+ </Locations>
+ </BreakpointContent>
+ </BreakpointProxy>
+ <BreakpointProxy
+ BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+ <BreakpointContent
+ uuid = "2B9576ED-05C4-47F0-A25F-4A84A7CDB9E4"
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "../source/montgomery.c"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
- startingLineNumber = "170"
- endingLineNumber = "170"
+ startingLineNumber = "145"
+ endingLineNumber = "145"
landmarkName = "mont_prepare(b, e, m, r, r_1, ni, M, x)"
landmarkType = "9">
</BreakpointContent>
</BreakpointProxy>
+ <BreakpointProxy
+ BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+ <BreakpointContent
+ uuid = "F04A400B-ECC0-4FC0-BDB1-F85652929E04"
+ shouldBeEnabled = "No"
+ ignoreCount = "0"
+ continueAfterRunningActions = "No"
+ filePath = "../source/montgomery.c"
+ startingColumnNumber = "9223372036854775807"
+ endingColumnNumber = "9223372036854775807"
+ startingLineNumber = "288"
+ endingLineNumber = "288"
+ landmarkName = "mont_mulmod(res, a, b, mod)"
+ landmarkType = "9">
+ </BreakpointContent>
+ </BreakpointProxy>
+ <BreakpointProxy
+ BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+ <BreakpointContent
+ uuid = "3DB0ADF0-9143-4EAB-8BE4-859E2A31EB03"
+ shouldBeEnabled = "Yes"
+ ignoreCount = "0"
+ continueAfterRunningActions = "No"
+ filePath = "../source/montgomery.c"
+ startingColumnNumber = "9223372036854775807"
+ endingColumnNumber = "9223372036854775807"
+ startingLineNumber = "256"
+ endingLineNumber = "256"
+ landmarkName = "mont_product(ret, a, b, r, r_1, n, ni)"
+ landmarkType = "9">
+ <Locations>
+ <Location
+ uuid = "3DB0ADF0-9143-4EAB-8BE4-859E2A31EB03 - 4382d80c0bf88f77"
+ shouldBeEnabled = "Yes"
+ ignoreCount = "0"
+ continueAfterRunningActions = "No"
+ symbolName = "mont_product"
+ moduleName = "lib-gpu-verify"
+ usesParentBreakpointCondition = "Yes"
+ urlString = "file:///Users/cedriczwahlen/libgpuverify/source/montgomery.c"
+ startingColumnNumber = "9223372036854775807"
+ endingColumnNumber = "9223372036854775807"
+ startingLineNumber = "254"
+ endingLineNumber = "254"
+ offsetFromSymbolStart = "86">
+ </Location>
+ <Location
+ uuid = "3DB0ADF0-9143-4EAB-8BE4-859E2A31EB03 - 4382d80c0bf88eb5"
+ shouldBeEnabled = "Yes"
+ ignoreCount = "0"
+ continueAfterRunningActions = "No"
+ symbolName = "mont_product"
+ moduleName = "lib-gpu-verify"
+ usesParentBreakpointCondition = "Yes"
+ urlString = "file:///Users/cedriczwahlen/libgpuverify/source/montgomery.c"
+ startingColumnNumber = "9223372036854775807"
+ endingColumnNumber = "9223372036854775807"
+ startingLineNumber = "256"
+ endingLineNumber = "256"
+ offsetFromSymbolStart = "86">
+ </Location>
+ </Locations>
+ </BreakpointContent>
+ </BreakpointProxy>
</Breakpoints>
</Bucket>