rnpgp / rnp

RNP: high performance C++ OpenPGP library used by Mozilla Thunderbird
https://www.rnpgp.org
Other
201 stars 55 forks source link

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

Open ni4 opened 5 months ago

ni4 commented 5 months ago

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 commented 5 months ago

cc @falko-strenzke @TJ-91

falko-strenzke commented 5 months ago

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

TJ-91 commented 4 months ago

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.

ni4 commented 3 months ago

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.

TJ-91 commented 3 months ago

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