summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2016-06-28 12:01:34 +0930
committerbitcoindev <bitcoindev@gnusha.org>2016-06-28 03:36:41 +0000
commit862cf22d8d0aa1276722c65310c594a1e98bfeec (patch)
tree27f24376bdcd57339dab11293527f399ad5f79ca
parent7a23282b82205a6e3e87cfc65c9a1ea62709baa9 (diff)
downloadpi-bitcoindev-862cf22d8d0aa1276722c65310c594a1e98bfeec.tar.gz
pi-bitcoindev-862cf22d8d0aa1276722c65310c594a1e98bfeec.zip
[bitcoin-dev] BIP 151 use of HMAC_SHA512
-rw-r--r--72/d9831f47a4bb0fdf96b2e1f8b46057948c65ff57
1 files changed, 57 insertions, 0 deletions
diff --git a/72/d9831f47a4bb0fdf96b2e1f8b46057948c65ff b/72/d9831f47a4bb0fdf96b2e1f8b46057948c65ff
new file mode 100644
index 000000000..20e8dec2f
--- /dev/null
+++ b/72/d9831f47a4bb0fdf96b2e1f8b46057948c65ff
@@ -0,0 +1,57 @@
+Return-Path: <rusty@ozlabs.org>
+Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org
+ [172.17.192.35])
+ by mail.linuxfoundation.org (Postfix) with ESMTPS id C0D8D258
+ for <bitcoin-dev@lists.linuxfoundation.org>;
+ Tue, 28 Jun 2016 03:36:41 +0000 (UTC)
+X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6
+Received: from ozlabs.org (ozlabs.org [103.22.144.67])
+ by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 371FB255
+ for <bitcoin-dev@lists.linuxfoundation.org>;
+ Tue, 28 Jun 2016 03:36:41 +0000 (UTC)
+Received: by ozlabs.org (Postfix, from userid 1011)
+ id 3rds1305Xnz9snl; Tue, 28 Jun 2016 13:36:38 +1000 (AEST)
+From: Rusty Russell <rusty@rustcorp.com.au>
+To: "Jonas Schnelli" <dev@jonasschnelli.ch>
+User-Agent: Notmuch/0.21 (http://notmuchmail.org) Emacs/24.5.1
+ (x86_64-pc-linux-gnu)
+Date: Tue, 28 Jun 2016 12:01:34 +0930
+Message-ID: <87h9cecad5.fsf@rustcorp.com.au>
+MIME-Version: 1.0
+Content-Type: text/plain
+X-Spam-Status: No, score=-5.5 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED,
+ RP_MATCHES_RCVD autolearn=ham version=3.3.1
+X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on
+ smtp1.linux-foundation.org
+Cc: bitcoin-dev@lists.linuxfoundation.org
+Subject: [bitcoin-dev] BIP 151 use of HMAC_SHA512
+X-BeenThere: bitcoin-dev@lists.linuxfoundation.org
+X-Mailman-Version: 2.1.12
+Precedence: list
+List-Id: Bitcoin Protocol Discussion <bitcoin-dev.lists.linuxfoundation.org>
+List-Unsubscribe: <https://lists.linuxfoundation.org/mailman/options/bitcoin-dev>,
+ <mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=unsubscribe>
+List-Archive: <http://lists.linuxfoundation.org/pipermail/bitcoin-dev/>
+List-Post: <mailto:bitcoin-dev@lists.linuxfoundation.org>
+List-Help: <mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=help>
+List-Subscribe: <https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev>,
+ <mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=subscribe>
+X-List-Received-Date: Tue, 28 Jun 2016 03:36:41 -0000
+
+
+To quote:
+
+> HMAC_SHA512(key=ecdh_secret|cipher-type,msg="encryption key").
+>
+> K_1 must be the left 32bytes of the HMAC_SHA512 hash.
+> K_2 must be the right 32bytes of the HMAC_SHA512 hash.
+
+This seems a weak reason to introduce SHA512 to the mix. Can we just
+make:
+
+K_1 = HMAC_SHA256(key=ecdh_secret|cipher-type,msg="header encryption key")
+K_2 = HMAC_SHA256(key=ecdh_secret|cipher-type,msg="body encryption key")
+
+Thanks,
+Rusty.
+