Skip to content

Commit

Permalink
Don't support old Kyber format
Browse files Browse the repository at this point in the history
  • Loading branch information
peterdettman committed Nov 29, 2024
1 parent a663e85 commit 0f3e412
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions crypto/src/security/PublicKeyFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -314,17 +314,6 @@ internal static MLDsaPublicKeyParameters GetMLDsaPublicKey(MLDsaParameters mlDsa
if (oct.GetOctetsLength() == publicKeyLength)
return MLDsaPublicKeyParameters.FromEncoding(mlDsaParameters, encoding: oct.GetOctets());
}
else if (obj is Asn1Sequence seq)
{
var rho = Asn1OctetString.GetInstance(seq[0]);
var t1 = Asn1OctetString.GetInstance(seq[1]);

if (rho.GetOctetsLength() == DilithiumEngine.SeedBytes &&
t1.GetOctetsLength() == publicKeyLength - DilithiumEngine.SeedBytes)
{
return new MLDsaPublicKeyParameters(mlDsaParameters, rho.GetOctets(), t1.GetOctets());
}
}
}
catch (Exception)
{
Expand Down

0 comments on commit 0f3e412

Please sign in to comment.