Skip to content

CloneZero either buggy or confusing #936

Open
@shaih

Description

@shaih

The name suggests that ct->CloneZero() should return an encryption of zero with the bookkeeping information of ct, but this doesn't seem to be the case. For example, the following code coredumps:

    // below slots is an array of slots, cc is CryptoContext, ct is a ciphertext

    Plaintext pt = cc->MakeCKKSPackedPlaintext(slots);
    Ciphertext<DCRTPoly>acc = ct->CloneZero();
    auto tmp = cc->EvalMult(ct, pt);
    cc->EvalAddInPlace(acc, tmp); // <== coredumps in this line

Metadata

Metadata

Labels

bugSomething isn't workingcleanupCode cleanup

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions