Cumulative sum and parameters

Nov 18, 2017 at 5:58 AM
I've tried to implement a cumulative sum using the SEAL library. However, there is an error like "encrypted2 is not valid for encryption parameters" (Please refer to the code below). Could you give me some advice on this error or let me know appropriate parameters? Thank you!
Ciphertext a[...]; // array
Plaintext b[...]; // array
Ciphertext c[...]; // array

parms.set_poly_modulus("1x^2048 + 1");
parms.set_plain_modulus(1 << 8);


for (...) {
  Ciphertext tmp0 = evaluator.multiply_plain(a[...], b[...]);
  c[...] = evaluator.add(tmp0, c[...]);