Skip to content

Commit

Permalink
added octet string processing for ML-DSA
Browse files Browse the repository at this point in the history
  • Loading branch information
dghgit committed Aug 23, 2024
1 parent c8fe4d7 commit 1fc6958
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,16 @@ else if (algOID.equals(NISTObjectIdentifiers.id_ml_dsa_44)
null);
}
}
else if (keyObj instanceof DEROctetString)
{
byte[] data = ASN1OctetString.getInstance(keyObj).getOctets();
if (keyInfo.getPublicKeyData() != null)
{
MLDSAPublicKeyParameters pubParams = PublicKeyFactory.MLDSAConverter.getPublicKeyParams(spParams, keyInfo.getPublicKeyData());
return new MLDSAPrivateKeyParameters(spParams, data, pubParams);
}
return new MLDSAPrivateKeyParameters(spParams, data, null);
}
else
{
throw new IOException("not supported");
Expand Down

0 comments on commit 1fc6958

Please sign in to comment.