@Test
    public void testVectors() throws Exception {
        List<TestVector> vectors = TestUtils.readTestVectors("crypto/eddsa.txt");

        for (TestVector vector : vectors) {
            String errMsg = vector.getString("name");
            String algorithm = vector.getString("algorithm");
            byte[] secretKey = vector.getBytes("secret_key");
            byte[] publicKey = vector.getBytes("public_key");
            byte[] message = vector.getBytes("message");
            byte[] signature = vector.getBytes("signature");

            assertEquals(errMsg + ", algorithm:", "Ed25519", algorithm);

            KeyFactory keyFactory = KeyFactory.getInstance("Ed25519", conscryptProvider);

            Signature signer = Signature.getInstance("Ed25519", conscryptProvider);
            signer.initSign(keyFactory.generatePrivate(new RawKeySpec(secretKey)));
            signer.update(message);
            byte[] sig = signer.sign();
            assertArrayEquals(errMsg + ", signature:", signature, sig);

            Signature verifier = Signature.getInstance("Ed25519", conscryptProvider);
            verifier.initVerify(keyFactory.generatePublic(new RawKeySpec(publicKey)));
            verifier.update(message);
            assertTrue(verifier.verify(sig));
        }
    }
Implements a KeySpec that contains the raw bytes of a key.
common/src/test/java/org/conscrypt/EdDsaTest.java