public inbox for bitcoindev@googlegroups.com
 help / color / mirror / Atom feed
From: William Swanson <swansontec@gmail•com>
To: James Poole <james@microtrx•com>
Cc: Bitcoin Dev <bitcoin-development@lists•sourceforge.net>
Subject: Re: [Bitcoin-development] Bip 32 Question
Date: Fri, 12 Jun 2015 12:42:46 -0700	[thread overview]
Message-ID: <CABjHNoR=jrXixMdsESugw=ZgAVc87gJck48ozLT7XcFr4+Zr_g@mail.gmail.com> (raw)
In-Reply-To: <CAN4RR9gRQCEkns21OTCpWmGOftFXbR-cLWuJX805iPjGATmLyQ@mail.gmail.com>

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



      reply	other threads:[~2015-06-12 19:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-12 18:22 James Poole
2015-06-12 19:42 ` William Swanson [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CABjHNoR=jrXixMdsESugw=ZgAVc87gJck48ozLT7XcFr4+Zr_g@mail.gmail.com' \
    --to=swansontec@gmail$(echo .)com \
    --cc=bitcoin-development@lists$(echo .)sourceforge.net \
    --cc=james@microtrx$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox