mirror of
https://github.com/mii443/FINAL.git
synced 2025-08-22 23:15:28 +00:00
SchemeNTRU::not_gate implemented
This commit is contained in:
@ -173,6 +173,13 @@ class SchemeNTRU
|
|||||||
*/
|
*/
|
||||||
void xor_gate(Ctxt_NTRU& ct_res, const Ctxt_NTRU& ct1, const Ctxt_NTRU& ct2) const;
|
void xor_gate(Ctxt_NTRU& ct_res, const Ctxt_NTRU& ct1, const Ctxt_NTRU& ct2) const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Computes the NOT gate of a given ciphertext ct
|
||||||
|
* @param[out] ct_res encryption of the outuput of the NOT gate
|
||||||
|
* @param[in] ct encryption of the input bit
|
||||||
|
*/
|
||||||
|
void not_gate(Ctxt_NTRU& ct_res, const Ctxt_NTRU& ct) const;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -296,4 +296,8 @@ void SchemeNTRU::xor_gate(Ctxt_NTRU& ct_res, const Ctxt_NTRU& ct1, const Ctxt_NT
|
|||||||
bootstrap(ct_res);
|
bootstrap(ct_res);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SchemeNTRU::not_gate(Ctxt_NTRU& ct_res, const Ctxt_NTRU& ct) const
|
||||||
|
{
|
||||||
|
nand_gate(ct_res, ct, ct);
|
||||||
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user