Skip to content

v1.4.0 introduces breaking changes to the CryptoContext API #1046

@j2kun

Description

@j2kun

The const qualifier is removed from Eval* methods that take plaintexts, which causes previously-working code like this to err:

  const auto& pt = cc->MakePackedPlaintext(...);
  const auto& ct1 = cc->EvalSub(pt, ct);
error: no matching member function for call to 'EvalAdd'
src/pke/include/cryptocontext.h:1485:25: note: candidate function not viable: 2nd argument ('const Plaintext' (aka 'const shared_ptr<PlaintextImpl>')) would lose const qualifier
 1485 |     Ciphertext<Element> EvalAdd(ConstCiphertext<Element>& ciphertext, Plaintext& plaintext) const {

Has the semantics of these API's changed? (Do they now mutate the plaintext?) If not, it should remain const, and if so the backwards incompatibility should be announced as part of the release notes.

Metadata

Metadata

Assignees

Labels

documentationImprovements or additions to documentation

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions