-
Notifications
You must be signed in to change notification settings - Fork 435
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
Add sig api with picnic #120
Add sig api with picnic #120
Conversation
…ipt executable, added TODO in test_sig.
I'm getting following error, please fix: |
Apparently, picnic is in master? (but without test_sig?) |
Yeah there's been a bit of confusion about this PR and what should be added. I'm working with @smashra to try to sort it out and will update you on here in the next few days. |
Removing make and build steps from download-and-setup-picnic.sh as they are being taken care of from the main Makefile with configure options in configure.ac. |
Made for making --with-m4ri-dir option consistent with others. Please update your branch. |
Can you please create another pull request to fix this:Made for making --with-m4ri-dir option consistent with others.Such that I can check in picnic code. |
Sorry, the bold and caps was a mistake, totally unintentional. |
Please fix these warning: src/sig_picnic/external/Picnic-master/preprocessMatrices.c:70:23: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare] |
Since Picnic-master is an external dependency, can we compile that directory without -Werror while the upstream provider considers whether to adopt the changes or not? |
Ok.
…On Fri, Jun 30, 2017 at 10:56 AM, Douglas Stebila ***@***.***> wrote:
Since Picnic-master is an external dependency, can we compile that
directory without -Werror while the upstream provider considers whether to
adopt the changes or not?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#120 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ANmJw2w_lpbi29-W1cF6qF6gUrqc42_Zks5sJQyWgaJpZM4NYcKN>
.
|
I'm already getting name collision error: ./.libs/liboqs.a(libpicnic_la-LowMC.o): In function Douglas, we discussed to not enable picnic by default but why does |
@smashra Apparently there were non-namespaced names added in the merge of Kyber (#131) and these weren't caught by Travis since Travis isn't correctly catching all failures (open issue #130). So I think the sequence of operations would be:
|
@smashra, the last commit #6153022 removed the Picnic matrices preprocessing in the download-and-setup-picnic.sh script. How do you propose we setup Picnic after downloading it? |
It's done through root or main make file.am.
You'll see when you run make test.
…On Tue, Jul 18, 2017 at 3:14 PM Christian Paquin ***@***.***> wrote:
@smashra <https://github.com/smashra>, the last commit #6153022 removed
the Picnic matrices preprocessing in the download-and-setup-picnic.sh
script. How do you propose we setup Picnic after downloading it?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#120 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ANmJw_PNrdA2s50DX2BFvJj1rwqLFV3Fks5sPQQHgaJpZM4NYcKN>
.
|
OK, works for me. Is there a reason why the matrices preprocessing is not part of the make (vs. make test)? I updated the README to include "make test" as a step when building Picnic. When are you planning to merge this with master? I'm working on fixing the Windows build; if this is going in soon, I'll wait to also include the sig api and Picnic. |
The reason is consistency on my end with respect to passing compiler and
directory flags, considering that it is an external component, such that it
appears more like an internal project from build perspective.
Please wait for an hour, I'm in the process of merging some mac related
updates.
Thanks for waiting.
…On Tue, Jul 18, 2017 at 4:58 PM, Christian Paquin ***@***.***> wrote:
OK, works for me. Is there a reason why the matrices preprocessing is not
part of the make (vs. make test)? I updated the README to include "make
test" as a step when building Picnic. When are you planning to merge this
with master? I'm working on fixing the Windows build; if this is going in
soon, I'll wait to also include the sig api and Picnic.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#120 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ANmJw-uxu8ewizhVPdkwraHBOfe8e__3ks5sPRx2gaJpZM4NYcKN>
.
|
…npaquin/liboqs into add-sig-api-with-picnic
@christian: I have merged my changes, please go ahead.
On Tue, Jul 18, 2017 at 5:13 PM, Shravan Mishra <shravan.mishra@gmail.com>
wrote:
… The reason is consistency on my end with respect to passing compiler and
directory flags, considering that it is an external component, such that it
appears more like an internal project from build perspective.
Please wait for an hour, I'm in the process of merging some mac related
updates.
Thanks for waiting.
On Tue, Jul 18, 2017 at 4:58 PM, Christian Paquin <
***@***.***> wrote:
> OK, works for me. Is there a reason why the matrices preprocessing is not
> part of the make (vs. make test)? I updated the README to include "make
> test" as a step when building Picnic. When are you planning to merge this
> with master? I'm working on fixing the Windows build; if this is going in
> soon, I'll wait to also include the sig api and Picnic.
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <#120 (comment)>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/ANmJw-uxu8ewizhVPdkwraHBOfe8e__3ks5sPRx2gaJpZM4NYcKN>
> .
>
|
I tested the build with your commits @smashra; looks good. |
Great!
…On Tue, Jul 18, 2017 at 7:22 PM Christian Paquin ***@***.***> wrote:
I tested the build with your commits @smashra <https://github.com/smashra>;
looks good.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#120 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ANmJw1LU_PWyDm2Dh0KiX3BcRPlMEtrjks5sPT4vgaJpZM4NYcKN>
.
|
I get a warning during compilation on macOS
|
…api-with-picnic # Conflicts: # .travis-tests.sh # Makefile.am
@smashra There's still a failure in one of the macOS builds due to a header not being in the right location. Can you look into that? |
Is it beacause of the merge? I'll look into it.
…On Tue, Jul 25, 2017 at 8:17 AM Douglas Stebila ***@***.***> wrote:
@smashra <https://github.com/smashra> There's still a failure in one of
the macOS builds due to a header not being in the right location. Can you
look into that?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#120 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ANmJw7ViObm-uQCO7crF783emwxRcONpks5sRdzVgaJpZM4NYcKN>
.
|
I'm looking at
https://travis-ci.org/open-quantum-safe/liboqs/builds/254945234?utm_source=github_status&utm_medium=notification
where one of the mac has sig_picnic enabled.
I don't see any errors.
Where should I look ?
Sincerely
Shravan
On Tue, Jul 25, 2017 at 8:29 AM, Shravan Mishra <shravan.mishra@gmail.com>
wrote:
… Is it beacause of the merge? I'll look into it.
On Tue, Jul 25, 2017 at 8:17 AM Douglas Stebila ***@***.***>
wrote:
> @smashra <https://github.com/smashra> There's still a failure in one of
> the macOS builds due to a header not being in the right location. Can you
> look into that?
>
> —
> You are receiving this because you were mentioned.
>
>
> Reply to this email directly, view it on GitHub
> <#120 (comment)>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/ANmJw7ViObm-uQCO7crF783emwxRcONpks5sRdzVgaJpZM4NYcKN>
> .
>
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are a bunch of changes that seem unrelated to Picnic, and I think might be artifacts of merges with master. Shravan, can you please check to see what the code actually should be, as in some cases it doesn't reflect what's in master now?
configure.ac
Outdated
ARG_ENABL_SET([kex-sidh-iqc-ref], [enable KEX-SIDH-IQC-REF.]) | ||
AM_CONDITIONAL([kex_sidh_iqc_ref], [test "x$kex_sidh_iqc_ref" = xtrue]) | ||
AM_CONDITIONAL([USE_SIDH_IQC], [test "x$kex_sidh_iqc_ref" = xtrue]) | ||
|
||
|
||
AM_CPPFLAGS="-g -std=gnu11 -Wno-unused-function -Werror -Wpedantic -Wall -Wextra -DCONSTANT_TIME" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this line changing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a duplicate, there is another AM_CPPFLAGS below. Needs to be removed. Merge artifact.
configure.ac
Outdated
@@ -120,6 +126,35 @@ case $host_os in | |||
;; | |||
esac | |||
|
|||
AC_ARG_WITH( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are lines 129-149 changing? Doesn't seem related to the Picnic commit.
configure.ac
Outdated
@@ -129,6 +164,8 @@ SRCDIR=${SRCDIR}" src/crypto/aes src/crypto/rand src/crypto/sha3 src/crypto/rand | |||
|
|||
# KEX | |||
SRCDIR=${SRCDIR}" src/kex" | |||
SRCDIR=" src/common src/crypto/aes src/kex src/sig src/crypto/rand src/crypto/sha3" | |||
SRCDIR=${SRCDIR}" src/crypto/rand_urandom_aesctr src/crypto/rand_urandom_chacha20" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this line changing? Doesn't seem related to the Picnic commit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again this whole block is duplicated. Merge didn't go well.
configure.ac
Outdated
AM_CPPFLAGS=${AM_CPPFLAGS}" -DENABLE_NTRU" | ||
SRCDIR=${SRCDIR}" src/kex_ntru" | ||
fi | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are these lines changing? Doesn't seem related to the Picnic commit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if test x"$kex_ntru" = x"true"; then
AM_CPPFLAGS=${AM_CPPFLAGS}" -DENABLE_NTRU"
SRCDIR=${SRCDIR}" src/kex_ntru"
fi
should not be there because its enabled by default.
@@ -158,6 +200,12 @@ if test x"$kex_code_mcbits" = x"true"; then | |||
fi | |||
if test x"$kex_sidh_iqc_ref" = x"true"; then | |||
AM_CPPFLAGS=${AM_CPPFLAGS}" -DENABLE_SIDH_IQC_REF" | |||
SRCDIR=${SRCDIR}" src/kex_sidh_iqc_ref" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this line changing? Doesn't seem related to the Picnic commit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Its more like bringing the am_cppflags and srcdir under one if conditional.
set-picnic-var.sh
Outdated
#!/bin/sh | ||
export PICNIC_PARAMS_PATH=$PWD/src/sig_picnic/external/Picnic-master/precomputed_data/ | ||
echo $PICNIC_PARAMS_PATH | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the purpose of this script? There's no explanation in the README of its role.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not using it anywhere. Because precomputed data is created by Makefile.am there is no additional setup required.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, so can we delete it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we can delete it.
@@ -20,7 +20,7 @@ typedef struct OQS_RAND OQS_RAND; | |||
/** | |||
* OQS PRNG object | |||
*/ | |||
typedef struct OQS_RAND { | |||
struct OQS_RAND { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this changing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang was giving error on doing
typedef struct OQS_RAND {
}OQS_RAND;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be
typedef struct OQS_RAND OQS_RAND;
struct OQS_RAND { ... };
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The above change already exists in rand.h.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I see, thanks.
* master: Enable or disable each algorithm (open-quantum-safe#158) Add sig api with picnic (open-quantum-safe#120) AppVeyor badge should point to master branch. copy header files instead of link (open-quantum-safe#157) Windows continuous integration (open-quantum-safe#155) Bring macOS build config closer to original. Try a few changes to see if we can narrow down the bug. Switch to a different version of Xcode and set travis-tests to fail on error. Fix windows build july2017 (open-quantum-safe#151) Fix unknown pseudo-op: .global under macOS (open-quantum-safe#152)
This pull request proposes a new signature API modeled after the kex api, and adds the Picnic signature scheme.
Picnic must currently be downloaded and set up (to generate parameters) using a script (download-and-setup-picnic.sh). We can migrate to a git submodule at a later time, after this PR is reviewed.
The Visual Studio build has not yet been modified to support Picnic; this will be done after this PR is reviewed.