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

Elliptic curve support #200

Merged
merged 22 commits into from
Dec 19, 2023
Merged

Conversation

salvatorelaiso
Copy link
Collaborator

This PR extends JWEHelper class capabilities to handle encryption and decryption with the use of EC Keys.
The above functionalities are tested in the corresponding unit tests.

It also adds EC keys based integration test with new files while leaving the RSA integration test intact.

This PR provides a new JWK Schema as per TODO:

# TODO - dynamic schemas loader if EC or RSA
# jwk: JwkSchema

The usage of this dynamic schema handling by Pydantic is documented through a simple test added in the file test_jwk, named test_dynamic_schema_validation.

The old schemas are retained for compatibility purpose until migration to this newer schemas.

Closed #102

Copy link
Member

@peppelinux peppelinux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small things to be fixed before the merge

example/satosa/integration_test/settings_ec.py Outdated Show resolved Hide resolved
pyeudiw/sd_jwt/__init__.py Outdated Show resolved Hide resolved
@salvatorelaiso salvatorelaiso marked this pull request as draft December 14, 2023 10:13
Salvatore Laiso added 9 commits December 14, 2023 11:25
Move the validation at the end of the initialization since some fields are transformed by the `__init__` function rather than simply loaded.
Move the validation at the end of the initialization since some fields are transformed by the `__init__` function rather than simply loaded.

Update the above commit with respect to the new modifications.
@salvatorelaiso salvatorelaiso marked this pull request as ready for review December 18, 2023 12:00
Migrate tests to EC keys.
Remove duplicated code.
@peppelinux peppelinux merged commit c56bc43 into italia:dev Dec 19, 2023
4 checks passed
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

Successfully merging this pull request may close these issues.

Tests for Elliptic Curve
2 participants