5
3
I'd like to use Bouncy Castle to generate the keypair for use with all *coin variants.
Is this the correct implementation to get the correct ECC curve that the *coin variants use?
Org.BouncyCastle.Crypto.AsymmetricCipherKeyPair GenerateKeys(int keySize)
{
var gen = new Org.BouncyCastle.Crypto.Generators.ECKeyPairGenerator();
var secureRandom = new Org.BouncyCastle.Security.SecureRandom();
var keyGenParam = new Org.BouncyCastle.Crypto.KeyGenerationParameters(secureRandom, keySize);
gen.Init(keyGenParam);
return gen.GenerateKeyPair();
}
1@LamonteCristo can we now know 5 years later? :P – knocte – 2018-01-06T18:23:52.923
IIRC, bitcoin uses an ECDSA key that is hashed using RIPEMD-160. For the particulars, you should look at the bitcoin wiki or vanitygen.
– Nick ODell – 2012-12-20T01:53:24.730@NickODell I ported Base58Check (RIPE160 + Sha256) to .NET / C# and that is passing all tests. All I need help with is the ECDSA curve. I think Bouncy is the only way... – goodguys_activate – 2012-12-20T01:59:33.873
I just checked, and you are correct about it doing sha256 first. Out of curiosity, what are you making that requires generating keys but can't use bitcoind? – Nick ODell – 2012-12-20T02:32:28.780
@NickODell I'm afraid I can't announce anything now. I'll have a timeline in Feb. – goodguys_activate – 2012-12-20T02:59:03.190