What is the Elliptic Curve algorithm used in Ripple to generate public / private key pairs?

2

The algorithm used by bitcoin to generate keys is secp256k1, is it the same for ripple?

Steven Zeiler

Posted 2013-12-14T21:24:10.093

Reputation: 21

Answers

2

Yes in ripple-lib the default elliptic curve is set in sjcl-custom/sjcl-secp256k1.js

// Overwrite NIST-P256 with secp256k1 so we're on even footing
sjcl.ecc.curves.c256 = new sjcl.ecc.curve(...)

Then in keypair.js when a new key pair is instantiated its _curve attribute is set to secp256k1.

function KeyPair() {
  this._curve  = sjcl.ecc.curves['c256'];
  this._secret = null;
  this._pubkey = null;
};

Steven Zeiler

Posted 2013-12-14T21:24:10.093

Reputation: 53