bcgit / bc-csharp

BouncyCastle.NET Cryptography Library (Mirror)
https://www.bouncycastle.org/csharp
MIT License
1.66k stars 554 forks source link

Private key parameters support in PqcPrivateKeyInfoFactory.CreatePrivateKeyInfo #454

Open nd1012 opened 1 year ago

nd1012 commented 1 year ago

It seems there is some code missing for creating private key info from FrodoPrivateKeyParameters.

peterdettman commented 1 year ago

Yes, actually there was quite a bit missing for Frodo, including entries in all the PQC factory classes, which I've now added. Thanks for the report.

nd1012 commented 1 year ago

Glad to help!

nd1012 commented 1 year ago

When I'm trying to implement NTRUEncrypt, I get the same problem with NtruPrivateKeyParameters. When I look for the sequence "ntru" in the PqcPrivateKeyInfoFactory.CreatePrivateKeyInfo code, I get no matches, so I assume the same issue also applies for NTRUSign, too.

nd1012 commented 8 months ago

FrodoKEM key info serialization has been fixed with the latest NuGet package version 2.3.0. Anyway, the problem with NTRUEncrypt key serialization still persists.