Cumulative sum and parameters

Nov 18, 2017 at 5:58 AM
Hello,
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_coeff_modulus(ChooserEvaluator::default_parameter_options().at(2048));
parms.set_plain_modulus(1 << 8);

...

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