You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is it a bug or intended behavior when I get a "result ciphertext is transparent" error when multiplying a ckksvector with a numpy identity matrix?
Further Information
When multiplying a ckksvector with a numpy identity matrix, I get the error "result ciphertext is transparent" which seems very strange to me, as the result should be the same ciphertext as before, right?
Moreover, when I compute the dot product of the ciphertext and any identity matrix column, it works.
System Information
OS: Windows
Python 3.9.7, tenseal 0.3.8
Conda 4.11.0
Code
importtensealastsimportnumpyasnp# Create TenSEAL contextbits_scale=32context=ts.context(
ts.SCHEME_TYPE.CKKS,
poly_modulus_degree=16384,
coeff_mod_bit_sizes=[43] + [bits_scale]*11+ [43]
)
context.global_scale=2**bits_scalecontext.generate_galois_keys()
N=100x=np.random.rand(N)
eye=np.eye(N)
x_enc=ts.ckks_vector(context, x)
# this worksx_enc.dot(eye[:,0])
# this results in an errorx_enc @ eye
The text was updated successfully, but these errors were encountered:
Ok, I figured out, TenSEAL uses the diagonal method to compute vector-matrix products. This means for the identity matrix that all vectors except the first one are zero, resulting in the transparent ciphertext error.
Question
Is it a bug or intended behavior when I get a "result ciphertext is transparent" error when multiplying a ckksvector with a numpy identity matrix?
Further Information
When multiplying a ckksvector with a numpy identity matrix, I get the error "result ciphertext is transparent" which seems very strange to me, as the result should be the same ciphertext as before, right?
Moreover, when I compute the dot product of the ciphertext and any identity matrix column, it works.
System Information
Code
The text was updated successfully, but these errors were encountered: