Skip to content

Thin Slots to Coeff does not work for p=257? #506

Description

@AYANG005

Hi everyone,

Does anyone have experience with using the "thin" slots to coefficients transformation in HElib for the p=257 case? It doesn't seem to output the sparsely packed slot elements as the coefficients of the plaintext polynomial for some reason. When I run it with p=127 however, it works. Would anyone know why this might be the case, and perhaps know anyway around it?

Here's what I am running for that portion, with the sparse entires of encoded_ptxt not corresponding to my previous slots:
//Slots to Coeff map
NTL::Vec mvec;
mvec.append(65536);
ThinEvalMap tested = ThinEvalMap(ea, false, mvec, false, false);
tested.apply(ctxt);
ZZX encoded_ptxt;
ZZX unmoded_ptxt;
secret_key.Decrypt(encoded_ptxt, ctxt, unmoded_ptxt);
cout << "Second encoded ptxt: " << encoded_ptxt << endl;
cout << ctxt.isCorrect() << endl;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions