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

Port keep-network/keep-core/pkg/crypto/ephemeral #15

Merged
merged 2 commits into from
Oct 15, 2024
Merged

Conversation

pdyraga
Copy link
Member

@pdyraga pdyraga commented Jun 26, 2024

The source code of keep-network/keep-core/pkg/crypto/ephemeral has been
ported to this repository. The ultimate goal is to port the entire GJKR
algorithm from keep-core repository and parameterize it to work with any
ciphersuite. The ephemeral package is a dependency of gjkr package so it
had to be ported first.

To port the ephemeral package, I also had to port the box implementation
from keep-network/keep-common/pkg/encryption package. The box was only
used by ephemeral so I decided to simplify the code organization and place
the box implementation in the ephemeral package. This is the only change
compared to the original ephemeral implementation.

In a separate PR, I want to explore if we can use secp256k1 implementation
from btcsuite/btcd/btcec instead the one from ethereum/go-ethereum so
that we can avoid importing ethereum/go-ethereum into this repository.

The source code of `keep-network/keep-core/pkg/crypto/ephemeral` has been
ported to this repository. The ultimate goal is to port the entire GJKR
algorithm from `keep-core` repository and parameterize it to work with any
ciphersuite. The ephemeral package is a dependency of `gjkr` package so it
had to be ported first.

To port the `ephemeral` package, I also had to port the box implementation
from `keep-network/keep-common/pkg/encryption` package. The box was only
used by `ephemeral` so I decided to simplify the code organization and place
the box implementation in the `ephemeral` package. This is the only change
compared to the original `ephemeral` implementation.
The code ported from the other repository into `ephemeral` package has
been adjusted to use `testutils` package for assertions where
applicable. This change brings consistency between `ephemeral` and the
rest of the code in this repository.
@lukasz-zimnoch lukasz-zimnoch merged commit b12f0f1 into main Oct 15, 2024
2 checks passed
@lukasz-zimnoch lukasz-zimnoch deleted the ephemeral branch October 15, 2024 12:16
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.

2 participants