France-ioi / AlgoreaBackend

Backend for the new Algorea platform
MIT License
1 stars 2 forks source link

Service for getting a token for editing another user's profile #1086

Closed GeoffreyHuck closed 1 month ago

GeoffreyHuck commented 1 month ago

fixes #1044

Encryption Algorithm

There are a few warnings on StackOverflow about using AES-128-ECB and AES-256-CBC, so the one implemented is AES-256-GCM (it includes a signature, which seems like a good idea but I don't know much about cryptography).

The most important thing for security is to make sure the nonce is always different.

Notes on the implementation:

I'm not sure what the tag (optional) the public tag generated by the encoding (for instance in GCM) means (in the issue).

Review

Easier to review all at once. But as usual the individual commit messages contain more info.

codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 100.00%. Comparing base (896e0ef) to head (7b9f3c4). Report is 3 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #1086 +/- ## ========================================= Coverage 100.00% 100.00% ========================================= Files 237 239 +2 Lines 14329 14384 +55 ========================================= + Hits 14329 14384 +55 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.