The project aims to simplify the usage of ECC curve (curve25519) with Diffie-Hellman Key exchange. The work is inline with the Account Aggregator Specification.
Apache License 2.0
13
stars
20
forks
source link
Enable the hex based key support for getSharedKey api #24
The update allows the getSharedKey API to accept a simple hex-encoded 32 bytes (64 hex characters) and autodetect them for generation of the shared secret keys.
Motivation and Context
This change is essential as some of the good C libraries do not generate a PEM or X509 encoded spec for X25519. Instead of spending time to convert such keys, it would be easier to auto-detect it within this framework. Also the change ensures compatibility to RFC7748
The given PR will fix only the getSharedKey API. The same fix is needed in other API's as well. They would be raised as independent PR.
Types of changes
[ ] Bug fix (non-breaking change which fixes an issue)
[X] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
Checklist
[ ] My change requires a change to the documentation.
Description
The update allows the getSharedKey API to accept a simple hex-encoded 32 bytes (64 hex characters) and autodetect them for generation of the shared secret keys.
Motivation and Context
This change is essential as some of the good C libraries do not generate a PEM or X509 encoded spec for X25519. Instead of spending time to convert such keys, it would be easier to auto-detect it within this framework. Also the change ensures compatibility to RFC7748
The given PR will fix only the getSharedKey API. The same fix is needed in other API's as well. They would be raised as independent PR.
Types of changes
Checklist