Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #879

Merged
merged 4 commits into from
Feb 19, 2024
Merged

Fixes #879

merged 4 commits into from
Feb 19, 2024

Conversation

tmontaigu
Copy link
Contributor

No description provided.

@cla-bot cla-bot bot added the cla-signed label Feb 14, 2024
@tmontaigu tmontaigu force-pushed the fixes branch 2 times, most recently from cb42636 to fee1ac3 Compare February 14, 2024 16:30
@IceTDrinker
Copy link
Member

erm, was a bit fast, maybe a test to check the bit not degree ?

@tmontaigu
Copy link
Contributor Author

what kind of test ?

@IceTDrinker
Copy link
Member

checking the bit not degree is correct where it was not before for the boolean block ?

@tmontaigu
Copy link
Contributor Author

Ok so quick update the degree problem is actually present for all operations

@IceTDrinker
Copy link
Member

Ok so quick update the degree problem is actually present for all operations

Hmm, ok then tests for all boolean blocks

@IceTDrinker
Copy link
Member

And maybe use the % 2 in all look up tables for boolean blocks LUTs

@tmontaigu
Copy link
Contributor Author

Its not as easy I think because in shortint, boolean ops use a after_bixor, after_bitand not the degree of a LUT and its that estimation that seems to not be correct

@IceTDrinker
Copy link
Member

ah yes

@IceTDrinker
Copy link
Member

but wouldn't we see that in the output of bit ops in integer as well then ?

@tmontaigu
Copy link
Contributor Author

I don't think we really check for the degree, and here we are in a special case where the block only has 1 bit take (Degree(1)) whereas in integer, the degree is always 3 for each block at least (unless its a trivial, but again, we don't really check degree)

I will try to fix after_bitand/bitor/bitxor in this pr add add part of the test hlapo from #850 with added degree checks

We used `after_bitand/or/xor` on the ct_left
**after** the lut had changed its degree.
So the `after_bit` function computed the
resulting using a wrong degree for the left
ct.
@tmontaigu tmontaigu force-pushed the fixes branch 2 times, most recently from f0e8860 to dcc2662 Compare February 16, 2024 15:19
Comment on lines +323 to +327
let a = cttrue.expand();
let b = cffalse.expand();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we check the degree here as well in the various compressed/compact etc. encryptions ? I believe you have the helper function to do that

I'm guessing PK as well ?

This is getting annoying, sorry :/

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

encrypt_one_block does not leak information
on the message.
BooleanBlocks are meant for when we want to
be explicit that the value is a boolean
and are ok for this to be public.

Thus it needs to correctly set the degree to 1
for other operations to properly take advantage of that
@tmontaigu tmontaigu merged commit ebce4fc into main Feb 19, 2024
32 checks passed
@tmontaigu tmontaigu deleted the fixes branch February 19, 2024 09:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants