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

Implement method to determine which encryption algorithm is used for key generation - ECDSA or ED25519 #2170

Open
agadzhalov opened this issue Feb 28, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@agadzhalov
Copy link
Contributor

Having the private/public key It would be beneficial for users to be able to determine which type of encryption algorithm (ECDSA,ED25519) was used for the key generation.

How is this possible in cryptography:

  1. Having the private key we can extract the type of algorithm that is used for generation.
  2. By having the private key in DER encoded format.
  3. Then decoding it using a ASN1 decoder (just an example tool) most likely a third party library for JS project
  4. Then after decoding, it will return whether the key is secp256k1 or curveEd25519

For the purpose

  1. Good research on what third library should be used
    1. One possible solution is asn1js library would be for the decoding
    2. In Java SDK bouncycastle is used. A check can be done if there's alternative for JavaScript.
      1. Example in Java SDK: fromBytesDER
      2. Example in C++ SDK: decode
  2. Tests with a lot of different keys (at least hundred).
    1. Same/different byte lengths
    2. Same/different types (ECDSA, ED25519, RSA, Blowfish, Twofish, DES, TripleDES)
@agadzhalov agadzhalov added the enhancement New feature or request label Feb 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant