Bip 32 Question

Bip 32 Question
2015-06-12 19:42 ` William Swanson
  
From: James Poole @ 2015-06-12 18:22 UTC (permalink / raw)
  To: bitcoin-development

[-- Attachment #1: Type: text/plain, Size: 497 bytes --]

Looking at the BIP32 definition, I hit a line that I would appreciate
clarification on.

https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki

Under the section "Private parent key → private child key" there is a step:

"The returned child key ki is parse256(IL) + kpar (mod n)."

Can someone help me understand what "n" is in the context of this
algorithm?  I very well could be looking right at it, but wanted to double
check if I am missing something.

Thanks,
James

[-- Attachment #2: Type: text/html, Size: 746 bytes --]

 permalink raw reply	[|nested]
2015-06-12 18:22 [Bitcoin-development] Bip 32 Question James Poole

  
From: William Swanson @ 2015-06-12 19:42 UTC (permalink / raw)
  To: James Poole;  Bitcoin Dev

The `n` is the curve order, as shown here:

https://en.bitcoin.it/wiki/Secp256k1

This step is necessary to keep you on the curve. The
secp256k1_ec_privkey_tweak_add function from libsecp256k1 handles this
automatically, but if you use OpenSSL or some non-EC math library, you
probably have to do it yourself.

-William

On Fri, Jun 12, 2015 at 11:22 AM, James Poole <james@microtrx•com> wrote:
> Looking at the BIP32 definition, I hit a line that I would appreciate
> clarification on.
>
> https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki
>
> Under the section "Private parent key → private child key" there is a step:
>
> "The returned child key ki is parse256(IL) + kpar (mod n)."
>
> Can someone help me understand what "n" is in the context of this algorithm?
> I very well could be looking right at it, but wanted to double check if I am
> missing something.
>
> Thanks,
> James



 permalink raw reply	[|nested]