Implement Phase 2 roadmap tasks: EdDSA, X25519/X448, and ChaCha20-Poly1305 #371
+1,032
−25
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Implements modern cryptographic algorithms per ROADMAP_CN.md Phase 2 tasks 2.1-2.3: Ed25519/Ed448 signatures, X25519/X448 key exchange, and ChaCha20-Poly1305 AEAD cipher verification.
Related Issue
Addresses requirements in https://github.com/zhaozg/lua-openssl/blob/master/ROADMAP_CN.md#第二阶段短期目标-1-3个月
Type of Change
Changes Made
EdDSA Support (Ed25519/Ed448)
src/pkey.cto detect EdDSA key types and use NULL digest with one-shotEVP_DigestSign/EVP_DigestVerifyAPIX25519/X448 Key Exchange
openssl_derive()to accept X25519/X448 key types alongside existing DH/EC supportChaCha20-Poly1305 Verification
EVP_CTRL_GCM_*)Test Suites
test/eddsa.lua: 12 tests covering signatures, PEM/DER, edge casestest/xecdh.lua: 11 tests covering key exchange, serialization, determinismtest/chacha20.lua: 10 tests covering AEAD with AAD, authentication failuresDocumentation
Testing
Test Coverage: 221/221 tests passing
Security Scan: CodeQL reports 0 alerts
Checklist
OpenSSL Compatibility
Additional Notes
Usage Examples:
Backward Compatibility: All changes are additive. Existing API unchanged.
For development roadmap and planning, see:
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.