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

ALSZ assert #34

Open
MartKro opened this issue Aug 20, 2019 · 1 comment
Open

ALSZ assert #34

MartKro opened this issue Aug 20, 2019 · 1 comment

Comments

@MartKro
Copy link

MartKro commented Aug 20, 2019

I have seen the following code snippers in the alsz-ot-snd/rcv.cpp implementation:

assert(CheckConsistency(&check_queue, check_chan)); //CheckConsistency(&check_queue, check_chan);

//assert(CheckConsistency(&check_queue, check_chan)); //CheckConsistency(&check_queue, check_chan);

Especially the first definition seems very dangerous (since come compilers like gcc optimize asserts out so that the methods inside assert are not evaluated. What is the purpose of this? What is the intended way to evaluate the asserts?

@dd23
Copy link
Member

dd23 commented Aug 20, 2019

As far as I know asserts are only omitted, when NDEBUG is defined or passed as compile flag (-DNDEBUG), so the code should be fine as long as NDEBUG isn't defined.

There is also another consistency check without an assert that will always happen, independent of NDEBUG.

The consistency check is described in the paper on page 8 in step 3: https://eprint.iacr.org/2015/061

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