rustpq / pqcrypto

Rust Post-Quantum cryptography
212 stars 38 forks source link

pqcrypto-rainbow test fails compilation #42

Closed mouse07410 closed 1 year ago

mouse07410 commented 2 years ago

Relevant (IMHO) error

$ cargo test
.  .  .
error: use of deprecated constant `ffi::PQCLEAN_RAINBOWVCIRCUMZENITHAL_CLEAN_CRYPTO_PUBLICKEYBYTES`: Insecure cryptography, do not use in production
    --> pqcrypto-rainbow/src/ffi.rs:1183:40
     |
1183 |             let mut pk_alt = vec![0u8; PQCLEAN_RAINBOWVCIRCUMZENITHAL_CLEAN_CRYPTO_PUBLICKEYBYTES];
     |                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.  .  .
warning: `pqcrypto-rainbow` (lib test) generated 234 warnings (171 duplicates)
error: could not compile `pqcrypto-rainbow` due to 153 previous errors; 234 warnings emitted
warning: build failed, waiting for other jobs to finish...
thomwiggers commented 2 years ago

You need to enable the insecure-cryptography feature. I might need to point this out in more places.

mouse07410 commented 2 years ago

I did not enable insecure crypto for the build. So, why is it being tested (and then fails)?

I'd suggest that if it's supposed to be disabled - it should be disabled completely: doesn't get compiled or tested, unless a special setting is given.

thomwiggers commented 1 year ago

Closed by #43