mullvad / oqs-rs

Rust bindings and key exchange for liboqs (Open Quantum Safe), a library for quantum-resistant cryptographic algorithms
35 stars 4 forks source link

Setup travis #10

Closed faern closed 6 years ago

faern commented 6 years ago

Nice to get some automatic testing. It's easy to commit something that works for you but might break on stable or vice verse.

Currently only builds Linux. Better to get it on one platform than none I thought. This is the platform where we will release it first anyway, so should be fine for now.


This change is Reviewable

faern commented 6 years ago

Adding @DMarby here as well. Maybe you have some tips and tricks on how to set up Travis in a convenient way? I mostly copy approximately what I usually use.

faern commented 6 years ago

Review status: 0 of 3 files reviewed at latest revision, 2 unresolved discussions.


.travis.yml, line 14 at r1 (raw file):


before_install:
  - sudo add-apt-repository ppa:elt/libsodium -y

This PPA does not have the very latest libsodium, but I did not find a newer one. Problem is that Travis runs Ubunut 14.04, so it does not exist in the standard repos.


oqs/src/kex.rs, line 363 at r1 (raw file):

    test_full_kex!(full_kex_code_mcbits, CodeMcbits);
    test_full_kex!(full_kex_ntrl, Ntru);
    // test_full_kex!(full_kex_sidh_iqc_ref, SidhIqcRef);

I could not run SidhIqcRef nor LweFrodo. Can you see if you can get it going on your machine? Maybe some compiler flag to liboqs missing or something. For LweFrodo I get an error return value from the new function, but for SidhIqcRef I get a segfault :(

I'm thinking it would be nice if we add Cargo features for each algorithm and then only those selected will be compiled in to OqsKexAlg, so unsupported ones don't even exist. The most awesome would be if we could make build.rs detect which ones are supported and automatically activate those. But that is a much later feature.


Comments from Reviewable

mvd-ows commented 6 years ago

Review status: 0 of 3 files reviewed at latest revision, 2 unresolved discussions.


.travis.yml, line 14 at r1 (raw file):

Previously, faern (Linus Färnstrand) wrote…
This PPA does not have the very latest libsodium, but I did not find a newer one. Problem is that Travis runs Ubunut 14.04, so it does not exist in the standard repos.

Generally speaking, are there any good workarounds for this? To supply it with the latest version of a lib, I mean. I suppose the installation package could be included in the repo but that's a bit smelly :-)


oqs/src/kex.rs, line 363 at r1 (raw file):

Previously, faern (Linus Färnstrand) wrote…
I could not run `SidhIqcRef` nor `LweFrodo`. Can you see if you can get it going on your machine? Maybe some compiler flag to `liboqs` missing or something. For `LweFrodo` I get an error return value from the `new` function, but for `SidhIqcRef` I get a segfault :( I'm thinking it would be nice if we add Cargo features for each algorithm and then only those selected will be compiled in to `OqsKexAlg`, so unsupported ones don't even exist. The most awesome would be if we could make `build.rs` detect which ones are supported and automatically activate those. But that is a much later feature.

Interesting. Will check. IIRC there are other external dependencies required to support the full set of algorithms.


Comments from Reviewable

faern commented 6 years ago

Review status: 0 of 3 files reviewed at latest revision, 2 unresolved discussions.


.travis.yml, line 14 at r1 (raw file):

Previously, mvd-ows wrote…
Generally speaking, are there any good workarounds for this? To supply it with the latest version of a lib, I mean. I suppose the installation package could be included in the repo but that's a bit smelly :-)

I definitely don't think it should be in the repo. Better then to have a separate repo or other hosting location where one can fetch the install from then. I mean, we could grab the latest deb by url and just manually install, the benefit of a PPA is that we get updates (lol, not here since the PPA is outdated, but in general)


Comments from Reviewable

mvd-ows commented 6 years ago

Reviewed 3 of 3 files at r1. Review status: all files reviewed at latest revision, 2 unresolved discussions.


Comments from Reviewable

mvd-ows commented 6 years ago

Reviewed 1 of 1 files at r2. Review status: all files reviewed at latest revision, 2 unresolved discussions.


Comments from Reviewable