Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proper replacement for ed25519-java library #13

Open
davido opened this issue May 17, 2020 · 0 comments
Open

Proper replacement for ed25519-java library #13

davido opened this issue May 17, 2020 · 0 comments

Comments

@davido
Copy link

davido commented May 17, 2020

As pointed out in str4d/ed25519-java#30, there are issue with export/import of ed25519 key:

// Bug in net.i2p.crypto.eddsa and in sshd? Both also compare the
            // seed of the private key, but for a generated key, this is some
            // random value, while it is all zeroes for a key read from a file.
            return KeyUtils.compareKeys(a.getPublic(), b.getPublic())
                    && Objects.equals(((EdDSAKey) a.getPrivate()).getParams(),
                            ((EdDSAKey) b.getPrivate()).getParams());

The answer was to examine ed25519-elisabeth library.

However, ed25519-elisabeth library lacks the necessary classes required to allows to use it as a SecurityProvider. Furthermore it's keys do not properly implement java.security.Private/PublicKey and/or java.security.Signature. Until it does, it cannot really be use as a replacement for ed25519-java.

Perhaps a more appropriate approach would be to examine and fix:

  Both also compare the seed of the private key,
  but for a generated key, this is some random value,
  while it is all zeroes for a key read from a file.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant