(self, id_blocks, key_list)
Use non-committing cipher to encrypt id blocks
        :param id_blocks: List[(Ei, val)]
        :param key_list: List[ObliviousTransferKey]
        :return:
Use non-committing cipher to encrypt id blocks
        :param id_blocks: List[(Ei, val)]
        :param key_list: List[ObliviousTransferKey]
        :return:
Use non - committing cipher to encrypt id blocks : param id_blocks : List [ ( Ei val ) ] : param key_list : List [ ObliviousTransferKey ] : return :
def _non_committing_encrypt(self, id_blocks, key_list):
        """
        Use non-committing cipher to encrypt id blocks
        :param id_blocks: List[(Ei, val)]
        :param key_list: List[ObliviousTransferKey]
        :return:
        """
        for i in range(self.block_num):
            if self.model_param.non_committing_encryption == consts.AES.lower():
                aes_key = CryptoExecutor(AESEncryptKey(key_list[i].key))
            else:
                raise ValueError("only supports AES cipher for non-committing encryption")
            self._transmit_value_ciphertext(aes_key.map_values_encrypt(id_blocks[i], mode=0), time=i)
            self._sync_nonce_list(aes_key.get_nonce(), time=i)

            block_confirm = self.transfer_variable.block_confirm.get(idx=0,
                                                                     suffix=(i,))
            if block_confirm:
                continue
def _non_committing_encrypt ( self , id_blocks , key_list ) : for i in range ( self . block_num ) : if self . model_param . non_committing_encryption == consts . AES . lower ( ) : aes_key = CryptoExecutor ( AESEncryptKey ( key_list [ i ] . key ) ) else : raise ValueError ( "only supports AES cipher for non-committing encryption" ) self . _transmit_value_ciphertext ( aes_key . map_values_encrypt ( id_blocks [ i ] , mode = 0 ) , time = i ) self . _sync_nonce_list ( aes_key . get_nonce ( ) , time = i ) block_confirm = self . transfer_variable . block_confirm . get ( idx = 0 , suffix = ( i , ) ) if block_confirm : continue