Skip to contents

Splits x into integer and fractional parts, encrypts each part as a separate PaillierCiphertext, and packages the result as a PaillierEncryptedReal so that later additions and subtractions can be performed via R's arithmetic operators.

Usage

encrypt_real(public_key, x, den)

Arguments

public_key

a PaillierPublicKey.

x

a real number.

den

the denominator used to scale the fractional part. The same denominator must be used at encryption and decryption.