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

Ed25519 & ECC support #13

Open
ctrlcctrlv opened this issue Oct 14, 2015 · 13 comments
Open

Ed25519 & ECC support #13

ctrlcctrlv opened this issue Oct 14, 2015 · 13 comments

Comments

@ctrlcctrlv
Copy link

ECC keys were recently added to GnuPG, and various RFCs are open or accepted for it:

https://www.gnupg.org/faq/whats-new-in-2.1.html
https://www.ietf.org/id/draft-koch-eddsa-for-openpgp-03.txt
https://www.gnupg.org/documentation/manuals/gcrypt/ECC-key-parameters.html#ECC-key-parameters
https://tools.ietf.org/html/rfc6637
https://www.ietf.org/mail-archive/web/openpgp/current/msg07321.html

However, openpgp-php doesn't support ECC keys. I've been trying to add it myself, but it's quite difficult. I'm not sure what key fields I should use, for example.

Anyone have any ideas or want to take a crack at it? ECC keys are awesome and super useful.

@singpolyma
Copy link
Owner

Do you have a PHP library for ECC that you're using?

@ctrlcctrlv
Copy link
Author

Yep, libsodium-php, but I want to make it so that people can export their keys in GnuPG format.

@Rotzbua
Copy link

Rotzbua commented Dec 15, 2017

You can use openssl for encryption and signing. Of course you need a modern openssl version which support ecc.

@Mikiya83
Copy link

Any news about ECC support ?
Thanks

@sartor
Copy link

sartor commented Mar 4, 2021

I need this feature too

@Rotzbua
Copy link

Rotzbua commented Mar 5, 2021

@sartor Then implement it and create a pr.

@mpdude
Copy link

mpdude commented Jun 1, 2021

Could anyone give some starting pointers what would be needed for this extension? In particular for adding the necessary import/export formats (“packet” in GPG speak?), when libsodium would be used for the heavy lifting parts?

@mpdude
Copy link

mpdude commented Nov 13, 2021

@singpolyma do you think you could give some starting pointers what needs to be done for this?

@singpolyma
Copy link
Owner

I have put in the extensions needed for ECDH, ECDSA, and EdDSA key parsing, serialization, and fingerprint calculation 3b62407

@singpolyma
Copy link
Owner

Support for verifying Ed25519 signatures: fe63af6

@singpolyma
Copy link
Owner

sodium will not be able to support the full range of OpenPGP ECC options, since it is limited to 25519 curve, but it's a start

@mpdude
Copy link

mpdude commented Nov 17, 2021

😮

🕺🏼 Thank you @singpolyma!

Now I will have to learn how to use it.

My goal is writing a pure-PHP CLI that can be used by Git instead of a full GPG implementation, and just for signing.

Maybe that can lower the barrier for PHP devs to start signing their Git commits.

@Rotzbua
Copy link

Rotzbua commented Nov 17, 2021

@mpdude As mentioned in #13 (comment) just use openssl. I already implemented it years ago. Unfortunately the code is lost 😢 and the only thing I remember that I used normal openssl for the ecc crypto part. Good luck 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants