public inbox for bitcoindev@googlegroups.com
 help / color / mirror / Atom feed
* [Bitcoin-development] Bip 32 Question
@ 2015-06-12 18:22 James Poole
  2015-06-12 19:42 ` William Swanson
  0 siblings, 1 reply; 2+ messages in thread
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	[flat|nested] 2+ messages in thread

* Re: [Bitcoin-development] Bip 32 Question
  2015-06-12 18:22 [Bitcoin-development] Bip 32 Question James Poole
@ 2015-06-12 19:42 ` William Swanson
  0 siblings, 0 replies; 2+ messages in thread
From: William Swanson @ 2015-06-12 19:42 UTC (permalink / raw)
  To: James Poole; +Cc: 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	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-06-12 19:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-12 18:22 [Bitcoin-development] Bip 32 Question James Poole
2015-06-12 19:42 ` William Swanson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox