# Reg Ciphertext - Plaintext gate

**URL:** <https://openfhe.discourse.group/t/reg-ciphertext-plaintext-gate/1201>\
**Category:** Library Questions\
**Created:** [April 16, 2024, 5:13pm UTC](https://openfhe.discourse.group/t/reg-ciphertext-plaintext-gate/1201 "2024-04-16T17:13:39Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![muthu](https://avatars.discourse-cdn.com/v4/letter/m/bbce88/32.png) [@muthu](https://openfhe.discourse.group/u/muthu)\
**Post date:** [April 16, 2024, 5:13pm UTC](https://openfhe.discourse.group/t/reg-ciphertext-plaintext-gate/1201/1 "2024-04-16T17:13:39Z")

</div>

hi there; I’m new to OpenFHE; I was wondering if there is a way to compute a Ciphertext - Plaintext binary operator without having to cast plaintext to a Ciphertext.

Please let me know how one could go about this w/o making the computation in both cipher text or decrypting of ciphertext.  
Thanks

---

<div class="post-metadata">

**Author:** ![ypolyakov](https://yyz1.discourse-cdn.com/flex031/user_avatar/openfhe.discourse.group/ypolyakov/32/47_2.png) [@ypolyakov](https://openfhe.discourse.group/u/ypolyakov)\
**Post date:** [April 18, 2024, 1:54am UTC](https://openfhe.discourse.group/t/reg-ciphertext-plaintext-gate/1201/2 "2024-04-18T01:54:09Z")

</div>

Yes, Ciphertext-Plaintext mixed operations are supported by schemes implemented in the pke module. There are many examples of these in pke/examples and pke/unittests.

---

<div class="post-metadata">

**Author:** ![muthu](https://avatars.discourse-cdn.com/v4/letter/m/bbce88/32.png) [@muthu](https://openfhe.discourse.group/u/muthu)\
**Post date:** [April 18, 2024, 4:01am UTC](https://openfhe.discourse.group/t/reg-ciphertext-plaintext-gate/1201/3 "2024-04-18T04:01:13Z")

</div>

thanks -@ypolyakov - appreciate the help

---

<div class="post-metadata">

**Author:** ![muthu](https://avatars.discourse-cdn.com/v4/letter/m/bbce88/32.png) [@muthu](https://openfhe.discourse.group/u/muthu)\
**Post date:** [April 28, 2024, 9:08pm UTC](https://openfhe.discourse.group/t/reg-ciphertext-plaintext-gate/1201/4 "2024-04-28T21:08:17Z")

</div>

one more add-on question: how do I find the method of implementing these operations ?

---

<div class="post-metadata">

**Author:** ![ypolyakov](https://yyz1.discourse-cdn.com/flex031/user_avatar/openfhe.discourse.group/ypolyakov/32/47_2.png) [@ypolyakov](https://openfhe.discourse.group/u/ypolyakov)\
**Post date:** [April 29, 2024, 11:56pm UTC](https://openfhe.discourse.group/t/reg-ciphertext-plaintext-gate/1201/5 "2024-04-29T23:56:46Z")

</div>

Open [Template Class CryptoContextImpl — OpenFHE documentation](https://openfhe-development.readthedocs.io/en/latest/api/classlbcrypto_1_1CryptoContextImpl.html?highlight=CryptoContextImpl) and search for `EvalMult(`, `EvalAdd(`, and the like
