dajiaji / pyhpke

A Python Implementation of HPKE (Hybrid Public Key Encryption)
MIT License
7 stars 4 forks source link

implemented DeriveKeyPair #133

Closed Aurvandill closed 1 year ago

Aurvandill commented 1 year ago

relates to issue #9

Aurvandill commented 1 year ago

perhabps i should move the derive_key_pair Function from the KEM class to the corresponding KEMPrimitvesInterface (eg. EC, X25519, X448) subclass. what's your opinion on that @dajiaji

Aurvandill commented 1 year ago

@dajiaji did you already have time to take a look?

dajiaji commented 1 year ago

Thanks for your contribution!

I'll check your PR now.

dajiaji commented 1 year ago

perhabps i should move the derive_key_pair Function from the KEM class to the corresponding KEMPrimitvesInterface (eg. EC, X25519, X448) subclass. what's your opinion on that @dajiaji

Thanks. I'm very happy if you could move it to the subclasses of KEPrimitivesInterface.

Aurvandill commented 1 year ago

ok i will move it into the KEMPrimitivesInterface and revert the version bump later today :) thanks for taking a look

codecov-commenter commented 1 year ago

Codecov Report

Attention: 9 lines in your changes are missing coverage. Please review.

Comparison is base (bd7748a) 86.70% compared to head (feb6b1c) 87.24%. Report is 2 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #133 +/- ## ========================================== + Coverage 86.70% 87.24% +0.54% ========================================== Files 29 29 Lines 782 839 +57 ========================================== + Hits 678 732 +54 - Misses 104 107 +3 ``` | [Files](https://app.codecov.io/gh/dajiaji/pyhpke/pull/133?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Ajitomi+Daisuke) | Coverage Δ | | |---|---|---| | [pyhpke/kem.py](https://app.codecov.io/gh/dajiaji/pyhpke/pull/133?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Ajitomi+Daisuke#diff-cHlocGtlL2tlbS5weQ==) | `94.87% <100.00%> (+0.13%)` | :arrow_up: | | [pyhpke/kem\_primitives/x25519.py](https://app.codecov.io/gh/dajiaji/pyhpke/pull/133?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Ajitomi+Daisuke#diff-cHlocGtlL2tlbV9wcmltaXRpdmVzL3gyNTUxOS5weQ==) | `100.00% <100.00%> (+4.16%)` | :arrow_up: | | [pyhpke/kem\_primitives/x448.py](https://app.codecov.io/gh/dajiaji/pyhpke/pull/133?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Ajitomi+Daisuke#diff-cHlocGtlL2tlbV9wcmltaXRpdmVzL3g0NDgucHk=) | `100.00% <100.00%> (+4.16%)` | :arrow_up: | | [pyhpke/kem\_primitives\_interface.py](https://app.codecov.io/gh/dajiaji/pyhpke/pull/133?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Ajitomi+Daisuke#diff-cHlocGtlL2tlbV9wcmltaXRpdmVzX2ludGVyZmFjZS5weQ==) | `57.89% <100.00%> (+2.33%)` | :arrow_up: | | [pyhpke/kem\_interface.py](https://app.codecov.io/gh/dajiaji/pyhpke/pull/133?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Ajitomi+Daisuke#diff-cHlocGtlL2tlbV9pbnRlcmZhY2UucHk=) | `66.66% <50.00%> (-2.09%)` | :arrow_down: | | [pyhpke/kem\_key\_interface.py](https://app.codecov.io/gh/dajiaji/pyhpke/pull/133?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Ajitomi+Daisuke#diff-cHlocGtlL2tlbV9rZXlfaW50ZXJmYWNlLnB5) | `81.81% <50.00%> (-7.08%)` | :arrow_down: | | [pyhpke/keys/ec\_key.py](https://app.codecov.io/gh/dajiaji/pyhpke/pull/133?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Ajitomi+Daisuke#diff-cHlocGtlL2tleXMvZWNfa2V5LnB5) | `70.49% <80.00%> (+0.31%)` | :arrow_up: | | [pyhpke/keys/x25519\_key.py](https://app.codecov.io/gh/dajiaji/pyhpke/pull/133?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Ajitomi+Daisuke#diff-cHlocGtlL2tleXMveDI1NTE5X2tleS5weQ==) | `81.81% <75.00%> (-0.69%)` | :arrow_down: | | [pyhpke/keys/x448\_key.py](https://app.codecov.io/gh/dajiaji/pyhpke/pull/133?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Ajitomi+Daisuke#diff-cHlocGtlL2tleXMveDQ0OF9rZXkucHk=) | `81.81% <75.00%> (-0.69%)` | :arrow_down: | | [pyhpke/kem\_primitives/ec.py](https://app.codecov.io/gh/dajiaji/pyhpke/pull/133?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Ajitomi+Daisuke#diff-cHlocGtlL2tlbV9wcmltaXRpdmVzL2VjLnB5) | `88.13% <85.18%> (-0.44%)` | :arrow_down: | ... and [1 file with indirect coverage changes](https://app.codecov.io/gh/dajiaji/pyhpke/pull/133/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Ajitomi+Daisuke)

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

Aurvandill commented 1 year ago

@dajiaji I'm done with the changes :)

dajiaji commented 1 year ago

Thanks for the great work! Approved.