OSDN Git Service

Merge pull request #201 from Bytom/v0.1
[bytom/vapor.git] / crypto / ed25519 / ed25519_test.go
index 5fe1ef1..08728e0 100644 (file)
@@ -9,7 +9,6 @@ import (
        "bufio"
        "bytes"
        "compress/gzip"
-       "crypto"
        "crypto/rand"
        "encoding/hex"
        "os"
@@ -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