6ce9b3544826665d4d9c98bd15e79f750dece218,syft/frameworks/torch/he/fv/decryptor.py,Decryptor,_get_sufficient_sk_power,#Decryptor#Any#,73

Before Change


        Returns:
            A 2-dim list having secretkey powers.
        
        sk_power = [[] for _ in range(max_power)]

        sk_power[0] = self._secret_key

        for i in range(2, max_power + 1):

After Change


        if max_power == len(self._secret_key_array):
            return self._secret_key_array

        while len(self._secret_key_array) < max_power:
            sk_extra_power = [0] * len(self._coeff_modulus)
            for i in range(len(self._coeff_modulus)):
                sk_extra_power[i] = poly_mul_mod(
                    self._secret_key_array[-1][i],
                    self._secret_key_array[0][i],
                    self._coeff_modulus[i],
                    self._coeff_count,
                )
            self._secret_key_array.append(sk_extra_power)

        return self._secret_key_array
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: OpenMined/PySyft
Commit Name: 6ce9b3544826665d4d9c98bd15e79f750dece218
Time: 2020-07-02
Author: ravikantsingh2308@gmail.com
File Name: syft/frameworks/torch/he/fv/decryptor.py
Class Name: Decryptor
Method Name: _get_sufficient_sk_power


Project Name: rwth-i6/returnn-experiments
Commit Name: a21861f99e3dc4b778fd776b3e8e00dbaee988ca
Time: 2021-03-27
Author: albzey@gmail.com
File Name: common/models/encoder/blstm_cnn_specaug.py
Class Name:
Method Name: make_net


Project Name: flow-project/flow
Commit Name: de5f3c55fefe93775b7044dfb5f3d2a307855db3
Time: 2019-01-08
Author: y.zeinali@gmail.com
File Name: flow/utils/aimsun/run.py
Class Name:
Method Name: threaded_client