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

Can we use the NTT functionality of Crystals-Dilithium for LWE encryption? #54

Closed
lucy-sha512 opened this issue Nov 6, 2021 · 0 comments

Comments

@lucy-sha512
Copy link

Hi,
We are trying to implement LWE encryption using the structure of Crystals-Dilithium :
-- Our vectors and the data types are same as that of the Crystals-Dilithium Library
--- Q , invQ and all constants are same.
-- We are using Shake to compute A , s1 and s2

The only problem occurs during decryption:
We have public key : bt= As1+s2
Encryption : u= Ar ; c= bt r + bit.q/2

Decryption: c-s1u= bt r + bit.q/2 - s1 Ar = As1r + s2r + bit.q/2 - s1Ar

NTT multiplication 👍
public key : ntt(s1), polypointwise(bt,a, S1) , polyvec_add(bt, s2) , reduce (bt)
u= ntt(r) , polypointwise(u, A, r)
c: polypointwise(c1,bt, r), reduce(c1), polyvec_add( c1. bit.q/2) polyreduce(c) invntt_to_mont(c)

Decryption: d1= polypointwise(s, u) , reduce(d1) , invntt(d1)
d= poly_sub(c, d1)

We suspect that reduce() is causing the non cancellation of the bigger terms during decryption and we are not getting the final value as : s2r + bit.q/2.

How do you suggest we tackle this issue?

@gregorseiler gregorseiler closed this as not planned Won't fix, can't repro, duplicate, stale Sep 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants