public inbox for bitcoindev@googlegroups.com
 help / color / mirror / Atom feed
From: Arik Sosman <me@arik•io>
To: Erik Aronesty <erik@q32•com>,
	Bitcoin Protocol Discussion
	<bitcoin-dev@lists•linuxfoundation.org>
Subject: Re: [bitcoin-dev] An alternative to BIP 32?
Date: Fri, 19 Mar 2021 19:08:39 -0700	[thread overview]
Message-ID: <23C3AD3A-DB4B-4E0B-9280-2F102CA43703@arik.io> (raw)
In-Reply-To: <CAJowKg+DHsJR4eeHbYgwe79C-U9WZ1-iUyxNLxw9EfD6mQQLBw@mail.gmail.com>

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

Hi Erik,

Would sha256-hmac(nonce, publicKeyPoint) still be a suitable/safe alternative without relying on sha3? That should at the very least eliminate length extension attacks.

Best,
Arik

> On Mar 19, 2021, at 6:32 PM, Erik Aronesty via bitcoin-dev <bitcoin-dev@lists•linuxfoundation.org> wrote:
> 
> use sha3-256.  sha256 suffers from certain attacks (length extension,
> for example) that could make your scheme vulnerable to leaking info,
> depending on how you concatenate things, etc.  better to choose
> something where padding doesn't matter.
> 
> On Fri, Mar 19, 2021 at 7:28 PM vjudeu via bitcoin-dev
> <bitcoin-dev@lists•linuxfoundation.org> wrote:
>> 
>> I recently found some interesting and simple HD wallet design here: https://bitcointalk.org/index.php?topic=5321992.0
>> Could anyone see any flaws in such design or is it safe enough to implement it and use in practice?
>> If I understand it correctly, it is just pure ECDSA and SHA-256, nothing else:
>> 
>> masterPublicKey = masterPrivateKey * G
>> masterChildPublicKey = masterPublicKey + ( SHA-256( masterPublicKey || nonce ) mod n ) * G
>> masterChildPrivateKey = masterPrivateKey + ( SHA-256( masterPublicKey || nonce ) mod n )
>> 
>> Also, it has some nice properties, like all keys starting with 02 prefix and allows potentially unlimited custom derivation path by using 256-bit nonce.
>> _______________________________________________
>> bitcoin-dev mailing list
>> bitcoin-dev@lists•linuxfoundation.org
>> https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev
> _______________________________________________
> bitcoin-dev mailing list
> bitcoin-dev@lists•linuxfoundation.org
> https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev


[-- Attachment #2: Message signed with OpenPGP --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2021-03-20  2:15 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-19 19:46 vjudeu
2021-03-20  1:32 ` Erik Aronesty
2021-03-20  2:08   ` Arik Sosman [this message]
2021-03-22 12:05     ` Erik Aronesty
2021-03-20 10:08 ` Tim Ruffing
2021-03-20 20:25 vjudeu
2021-03-20 20:25 vjudeu
2021-03-21 21:45 ` Tim Ruffing
2021-03-22  7:51 vjudeu

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=23C3AD3A-DB4B-4E0B-9280-2F102CA43703@arik.io \
    --to=me@arik$(echo .)io \
    --cc=bitcoin-dev@lists$(echo .)linuxfoundation.org \
    --cc=erik@q32$(echo .)com \
    --cc=linuxfoundation@arik$(echo .)io \
    /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