rnp icon indicating copy to clipboard operation
rnp copied to clipboard

Fix Botan's "warning: 'Kyber1024' is deprecated"

Open ni4 opened this issue 1 year ago • 5 comments

Description

The following warning is issued if PQC support is enabled:

warning: 'Kyber1024' is deprecated: Use Kyber1024_R3 [-Wdeprecated-declarations]
    Botan::KyberMode result = Botan::KyberMode::Kyber1024;

ni4 avatar Jun 24 '24 11:06 ni4

cc @falko-strenzke @TJ-91

ni4 avatar Jun 24 '24 11:06 ni4

OK, we will take care, hopefully in the next week.

falko-strenzke avatar Jun 25 '24 04:06 falko-strenzke

Botan renamed the enum values and deprecated the old ones. Botan 3.0 up to 3.1.1 only know the old values, 3.2.0 and upwards know the new values and the deprecated old values. I will make a PR to fix this for the time being. We won't need the fix any more when Botan releases the final ML-KEM implementation and we switch to that.

Also note that Botan 3.2.0 (and probably some versions below, I did not check) will emit a lot of warnings about deprecated Kyber 90s. However, this is a problem in the Botan Header and I cannot really do anything here. Newer versions are fine.

TJ-91 avatar Jul 09 '24 16:07 TJ-91

Quick look at https://pkgs.org/search/?q=Botan shows that most systems use Botan 2.x, and ones which use 3.x are already 3.2+. So probably it would be easier solution to require Botan 3.2.+ if PQC is enabled, I doubt that somebody would stick to 3.1.

ni4 avatar Jul 29 '24 13:07 ni4

That's easier, yes. I changed it to require Botan 3.2

TJ-91 avatar Jul 30 '24 05:07 TJ-91