From bcb1166e524c3fb1fad66af8ddd4bf3a4161a7dc Mon Sep 17 00:00:00 2001
From: obscuren <geffobscura@gmail.com>
Date: Mon, 19 Jan 2015 11:22:56 +0100
Subject: Added 0 key proof error

Private key \x00\x00...\x00 returns the _exact_ same public key as \x11
\x11...\x11. Currently investigating.
---
 crypto/crypto_test.go | 13 +++++++++++++
 1 file changed, 13 insertions(+)

(limited to 'crypto')

diff --git a/crypto/crypto_test.go b/crypto/crypto_test.go
index b579e6e4e..41c05a242 100644
--- a/crypto/crypto_test.go
+++ b/crypto/crypto_test.go
@@ -6,6 +6,9 @@ import (
 	"fmt"
 	"testing"
 	"time"
+
+	"github.com/ethereum/go-ethereum/ethutil"
+	"github.com/obscuren/secp256k1-go"
 )
 
 // These tests are sanity checks.
@@ -47,3 +50,13 @@ func BenchmarkSha3(b *testing.B) {
 
 	fmt.Println(amount, ":", time.Since(start))
 }
+
+func Test0Key(t *testing.T) {
+
+	key := ethutil.Hex2Bytes("1111111111111111111111111111111111111111111111111111111111111111")
+
+	p, err := secp256k1.GeneratePubKey(key)
+	addr := Sha3(p[1:])[12:]
+	fmt.Printf("%x\n", p)
+	fmt.Printf("%v %x\n", err, addr)
+}
-- 
cgit v1.2.3