Good morning ❤️ first of all thank you very much for your library. While playing around with it I ran into the problem that I wasn't able to import private/public ec keys when they use the curve brainpoolP256r1. I've got the error message from pointycastle: No algorithm registered of type ECDomainParameters with name: brainpoolP256r1"
After some investigation I found out that this should be fixable by specifying this curve as a parameter first and use it in the constructor of the ECPrivateKey and ECPublicKey classes like this:
final parameters = ECCurve_brainpoolp256r1();
final key = ECPrivateKey(
osp2i(x),
parameters,
);
So I added two optional parameters to the CryptoUtils.ecPrivateKeyFromDerBytes() and CryptoUtils.ecPublicKeyFromDerBytes() methods to overwrite the ECDomainParameters for special EC Curves which worked fine for me locally. I thought the ***KeyFromDerBytes() methods looked like a good place as they already have the bool pkcs8 optional parameter.
Good morning ❤️ first of all thank you very much for your library. While playing around with it I ran into the problem that I wasn't able to import private/public ec keys when they use the curve
brainpoolP256r1
. I've got the error message from pointycastle:No algorithm registered of type ECDomainParameters with name: brainpoolP256r1"
After some investigation I found out that this should be fixable by specifying this curve as a parameter first and use it in the constructor of the ECPrivateKey and ECPublicKey classes like this:
So I added two optional parameters to the
CryptoUtils.ecPrivateKeyFromDerBytes()
andCryptoUtils.ecPublicKeyFromDerBytes()
methods to overwrite the ECDomainParameters for special EC Curves which worked fine for me locally. I thought the ***KeyFromDerBytes() methods looked like a good place as they already have thebool pkcs8
optional parameter.