Open elyasgoli opened 1 year ago
Hi @elyasgoli, I just want to add that there is a nice example of how encrypting and performing simple arithmetic operations over 2-D matrices in this issue.
Hi Shokofeh,
Thank you! That's helpful! My goal is actually to encrypt images with CKKS or BFV. For that purpose, I need to encrypt a Numpy 2D array as a whole, not by breaking it down row by row. Is it possible to do that with PyFHEL?
Many thanks, Elyas
On Fri, Sep 1, 2023 at 4:55 AM Shokofeh VahidianSadegh < @.***> wrote:
Hi @elyasgoli https://github.com/elyasgoli, I just want to add that there is a nice example of how encrypting and performing simple arithmetic operations over 2-D matrices in this issue https://github.com/ibarrond/Pyfhel/issues/183#issuecomment-1507055784.
— Reply to this email directly, view it on GitHub https://github.com/ibarrond/Pyfhel/issues/212#issuecomment-1702630558, or unsubscribe https://github.com/notifications/unsubscribe-auth/A7HSUU7XPBOUCHB5NIO235DXYHEL7ANCNFSM6AAAAAA4HAH56U . You are receiving this because you were mentioned.Message ID: @.***>
-- Elyas Goli, Ph.D. Principal Machine Learning Engineer Peak Artificial Intelligence Cell Phone: 217-904-4873 Email: @.***
You virtually always want to flatten images before encryption, as FHE ciphertexts are effectively vectors and FHE offers SIMD operations over vectors. For advanced use cases, more complex patterns might be beneficial, but expressing your FHE computation as a vectorized computation is a good start for most applications.
Description When I try
Demo_3_Float_CKKS.py
with a 2-dimensionalnumpy
array, I get an error.Code To Reproduce Error
Setup: