TFHE-rs Interoperability
Overview
Encoding differences
from concrete.fhe import tfhers
# This will create a TFHE-rs unsigned integer of 8 bits
# using the parameters from the json file
tfhers_type = tfhers.get_type_from_params(
"tfhers_params.json",
is_signed=False,
precision=8,
)
# Encoding could change depending on the parameters saved in 'tfhers_params.json'
# You should have the same result if message_modulus was equal to 4
assert (tfhers_type.encode(123) == [3, 2, 3, 1]).all()
assert tfhers_type.decode([3, 2, 3, 1]) == 123Parameter match
Scenarios
Serialization of ciphertexts and keys
Last updated
Was this helpful?