Closed hyerinshelly closed 8 months ago
Running the below example t2 program (including 4 multiplications) with SEAL returns the output with d=7, but throws an exception. Details are here:
int main(void) { EncDouble x, y; double yP; int c; x = {84.002601,67.078888,8.049681,41.153198,67.702231,58.548482,83.484551,47.499139,47.332666,45.850745,5.555324,27.824130,38.085573,67.124150,93.112555,60.148085,34.173879,78.527918,58.863022,47.586321,24.483015,58.549139,31.589364,27.400489,57.056091,54.766420,25.026209,19.657221,58.141173,38.588261,59.365120,31.647444,53.423337,82.410106,28.567664,40.957616,96.583693,63.184848,59.497953,77.447351,83.472151,26.577298,27.343043,12.376304,18.950177,16.673949,75.871623,41.536313,7.854370,87.645116,40.788412,18.483241,61.551165,65.807327,89.773758,53.826079,47.197567,23.209647,73.754957,47.019311,58.092296,57.168329,30.537804,58.217667,50.396249,44.100064,94.133977,59.490829,74.020807,50.554777,40.951833,27.058778,23.626904,39.524812,47.475274,49.196900,49.447444,5.908005}; c = 1; rotate_left(x, c); yP = 31.139577; match_params(x, x); x *= yP; reduce_noise(x); c = 5; rotate_left(x, c); y = {64.582651,83.361180,73.267462,19.603254,70.594373,79.005992,68.313443,61.367217,43.291110,92.605003,76.849022,33.604855,76.842873,75.632949,57.624570,29.118542,58.295601,42.937520,5.779961,2.132533,20.849896,79.318885,56.018828,46.446558,91.926691,53.277885,90.300288,12.619961,57.653750,92.306076,54.543364,43.999015,44.410845,19.500933,6.905739,58.372688,0.200292,24.824707,91.389924,27.139804,43.863515,45.985577,54.846273,7.093160,38.543155,63.704868,2.883713,61.273907,37.294167,74.044322,20.765463,64.822007,43.376256,86.502481,69.058434,29.346432,25.513912,10.749499,0.621356,95.061219,29.289197}; match_params(y, x); x -= y; y = {9.572880,98.342230,72.397550,94.058984,34.717898,27.473080,30.837667,95.919262,59.506984,90.775647,28.056093,52.705349,52.389868,67.807880,28.406662,31.439420,37.779308,59.087397,0.442961,92.845778,99.780777,19.470929,16.903743,46.254952,45.417424,46.397245,65.800378,91.361335,32.443656,96.861273,30.287548,67.430603,50.922789,85.600623,99.393069,41.979094,97.451213,86.213725}; match_params(y, x); x *= y; reduce_noise(x); yP = 91.702111; match_params(x, x); x *= yP; reduce_noise(x); c = 8; rotate_left(x, c); y = {96.243511,16.792358,9.735731,71.470605,2.250091,42.139402,94.033078,24.233465,68.060838,65.756062,12.841246,11.154275,68.555365,16.521023,5.836204,65.154898,55.092482,57.347332,98.442785,78.779859,54.488479,56.091034,17.091322,56.813372,37.115939,62.598879,65.142895,50.873137,53.161716,30.020754,64.234861,38.960084,76.414877,3.375688,26.442729,30.618934,0.912300,73.848615,98.924054,36.665264,7.351761,63.408370,14.604528,41.360588,53.389312,61.075628,89.985964,54.467650,44.769817,79.532803,34.300460,0.793998,12.696499,38.756233,73.004444,25.632642,56.927469,11.964196,43.000991,55.934383,13.794110,88.412626,86.998168,59.097205,73.668370,17.433704,60.055852,83.933865,3.362909,98.600690,62.642850,51.679654,25.530166,74.015735,31.420790,88.828006,69.333449,60.455669,51.490768,58.132485,34.495076,31.474004,1.983163,49.289432,4.283777,22.545707,10.640749,36.616315,2.085477}; match_params(y, x); x *= y; reduce_noise(x); print_batched (x, 20); return 0; }
EncParams(32768, 5, 65537)
terminate called after throwing an instance of 'std::invalid_argument' what(): scale out of bounds
EncParams(32768, 7, 65537)
1500067172.0 248872854.1 24730526.3 833091695.5 18983959.3 368463559.1 172635249.6 125347197.2 218201013.7 288709575.3 923752.8 161759833.2 475775498.6 15717025.3 15872433.2 319254369.6 403079366.1 227458826.2 934548440.4 1685440149.0
1.500052654973194E9 2.4887043249450618E8 2.4730284786658525E7 8.330836347551935E8 1.898377483837607E7 3.684599730249144E8 1.7263356242877185E8 1.2534598405110061E8 2.1819888716980413E8 2.887067656749708E8 923743.8606721498 1.6175827082184708E8 4.757708858050875E8 1.5716870245584866E7 1.5872279214039622E7 3.19251268588761E8 4.0307544374668807E8 2.274566112917803E8 9.345393396293468E8 1.6854238628592358E9
1500052655.0 248870432.5 24730284.8 833083634.8 18983774.8 368459973.0 172633562.4 125345984.1 218198887.2 288706765.7 923743.9 161758270.8 475770885.8 15716870.2 15872279.2 319251268.6 403075443.7 227456611.3 934539339.6 1685423862.9
After re-building T2, it has been solved.
Running the below example t2 program (including 4 multiplications) with SEAL returns the output with d=7, but throws an exception. Details are here:
Example T2 Program
Result of SEAL
EncParams(32768, 5, 65537)
(multiplicative depth = 5)EncParams(32768, 7, 65537)
(multiplicative depth = 7)Reference