4

I understand that the Private Key and Address pair is generated from the Seed + index number. Is there anywhere where I can find the mathematical formula beside decoding the wallet code ? Thank you.

1

You can find the entry point of generating a new address in e.g. the JS client library iota.lib.js found here on GitHub. For more details you have to look into the Signing class found here on GitHub.

The following code snippet is from the first linked class.

/**
*   Generates a new address
*
*   @method newAddress
*   @param      {string} seed
*   @param      {int} index
*   @param      {int} security      Security level of the private key
*   @param      {bool} checksum
*   @returns    {string} address     Transaction objects
**/
api.prototype._newAddress = function(seed, index, security, checksum) {

    var key = Signing.key(Converter.trits(seed), index, security);
    var digests = Signing.digests(key);
    var addressTrits = Signing.address(digests);
    var address = Converter.trytes(addressTrits)

    if (checksum) {
        address = Utils.addChecksum(address);
    }

    return address;
}
| improve this answer | |
0

The private/public keypair is computed by an algorithm. The algorithm in the wallet's code is the formula. Don't expect to find something different than this algorithm.

| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.