OSDN Git Service

modify import path (#1805)
[bytom/bytom.git] / crypto / ed25519 / ed25519_test.go
index 68e14a4..f4ceef2 100644 (file)
@@ -9,14 +9,13 @@ import (
        "bufio"
        "bytes"
        "compress/gzip"
-       "crypto"
        "crypto/rand"
        "encoding/hex"
        "os"
        "strings"
        "testing"
 
-       "github.com/bytom/crypto/ed25519/internal/edwards25519"
+       "github.com/bytom/bytom/crypto/ed25519/internal/edwards25519"
 )
 
 type zeroReader struct{}
@@ -62,34 +61,6 @@ func TestSignVerify(t *testing.T) {
        }
 }
 
-func TestCryptoSigner(t *testing.T) {
-       var zero zeroReader
-       public, private, _ := GenerateKey(zero)
-
-       signer := crypto.Signer(private)
-
-       publicInterface := signer.Public()
-       public2, ok := publicInterface.(PublicKey)
-       if !ok {
-               t.Fatalf("expected PublicKey from Public() but got %T", publicInterface)
-       }
-
-       if !bytes.Equal(public, public2) {
-               t.Errorf("public keys do not match: original:%x vs Public():%x", public, public2)
-       }
-
-       message := []byte("message")
-       var noHash crypto.Hash
-       signature, err := signer.Sign(zero, message, noHash)
-       if err != nil {
-               t.Fatalf("error from Sign(): %s", err)
-       }
-
-       if !Verify(public, message, signature) {
-               t.Errorf("Verify failed on signature from Sign()")
-       }
-}
-
 func TestGolden(t *testing.T) {
        // sign.input.gz is a selection of test cases from
        // http://ed25519.cr.yp.to/python/sign.input