(self, encoded)
return encryptednumber
return PaillierEncryptedNumber: z = E(x) + FixedPointNumber(y)
return PaillierEncryptedNumber: z = E(x) + FixedPointNumber(y)
return PaillierEncryptedNumber : z = E ( x ) + FixedPointNumber ( y )
def __add_fixpointnumber(self, encoded):
        """return PaillierEncryptedNumber: z = E(x) + FixedPointNumber(y)
        """
        if self.public_key.n != encoded.n:
            raise ValueError("Attempted to add numbers encoded against different public keys!")

        # their exponents must match, and align.
        x, y = self.__align_exponent(self, encoded)

        encrypted_scalar = x.public_key.raw_encrypt(y.encoding, 1)
        encryptednumber = self.__raw_add(x.ciphertext(False), encrypted_scalar, x.exponent)

        return encryptednumber
def __add_fixpointnumber ( self , encoded ) : if self . public_key . n != encoded . n : raise ValueError ( "Attempted to add numbers encoded against different public keys!" ) # their exponents must match, and align. x , y = self . __align_exponent ( self , encoded ) encrypted_scalar = x . public_key . raw_encrypt ( y . encoding , 1 ) encryptednumber = self . __raw_add ( x . ciphertext ( False ) , encrypted_scalar , x . exponent ) return encryptednumber