Skip to content

A fatal BUG #500

@zibinpan

Description

@zibinpan

When the size of the matrix A is a little large, for example, 192 * 784. It fails when calculating the multiplication of the encrypted A and a plaintext vector B, rasing the error: ValueError: can't execute enc_matmul_plain on chunked vectors

code:

import numpy as np
import tenseal as ts


context = ts.context(
            ts.SCHEME_TYPE.CKKS,
            poly_modulus_degree=2**15,
            coeff_mod_bit_sizes=[50,40,40,40,40,40,50]
          )
context.global_scale = 2**40
context.generate_galois_keys()

v1 = np.random.rand(784).tolist()

matrix = np.random.rand(192, 784).tolist()

enc_matrix = ts.enc_matmul_encoding(context, matrix)
result = enc_matrix.enc_matmul_plain(v1, len(matrix))

print(result.decrypt())

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: Bug 🐛Some functionality not working in the codebase as intended

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions