Skip to content

Replace Crypt::NaCl::Sodium with Crypt::Ed25519#1182

Merged
richvdh merged 7 commits intodevelopfrom
rav/sodium_must_die
Jan 5, 2022
Merged

Replace Crypt::NaCl::Sodium with Crypt::Ed25519#1182
richvdh merged 7 commits intodevelopfrom
rav/sodium_must_die

Conversation

@richvdh
Copy link
Member

@richvdh richvdh commented Dec 23, 2021

First we vendor in Protocol::Matrix. Then we patch it to use Crypt::Ed25519 instead of Crypt::NaCl::Sodium. Then we switch the rest of sytest to use Crypt::Ed25519.

Hopefully fixes #1114, and generally makes sytest a whole lot easier to install.

I want to update Protocol::Matrix to drop the dependency on
`Crypt::NaCl::Sodium`, so this is a first step.
This essentially applies my patch at
https://rt.cpan.org/Public/Bug/Display.html?id=140079 to our vendored copy of
`Protocol::Matrix`, as a first step for dropping the dep on
`Crypt::NaCl::Sodium`.
This requires two classes of changes:

 * `Crypt::Ed25519::eddsa_verify($msg, $pub_key, $sig)` is pretty
    much a drop-in replacement for
    `Crypt::NaCl::Sodium->sign->verify($sig, $msg, $pub_key)`, modulo the order
    of the arguments.

 * We need a shim to recreate `Crypt::NaCl::Sodium->sign->keypair`.
@richvdh richvdh requested a review from a team as a code owner December 23, 2021 12:51
@richvdh richvdh force-pushed the rav/sodium_must_die branch from b25db66 to db8946d Compare December 23, 2021 12:56
Copy link
Member

@clokep clokep left a comment

Choose a reason for hiding this comment

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

Looks OK overall, but I had a few questions!

@richvdh richvdh requested a review from clokep January 5, 2022 13:43
Copy link
Member

@clokep clokep left a comment

Choose a reason for hiding this comment

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

LGTM!

@richvdh richvdh merged commit 13f436b into develop Jan 5, 2022
@richvdh richvdh deleted the rav/sodium_must_die branch January 5, 2022 14:40
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.

install-deps.pl fails to build libsodium with gcc 11.2.1

2 participants