Move away from libsodium and only use OpenSSL #969

Closed
opened 2025-08-19 18:41:43 +00:00 by raito · 2 comments
Owner

As @alois31 noticed, we have 2 cryptography libraries linked in Lix: libsodium & OpenSSL.

libsodium is only used to perform ed25519 signatures in one place: valid path info signatures.

This is a critical operation for anyone running a binary cache with trust constraints, libsodium is/was known for how easy is it to use and is a fork of NaCl, a library maintained by famed academical cryptographers.

OpenSSL can perform ED25519 signatures, the big question is whether we can replicate the exact same format.

As @alois31 noticed, we have 2 cryptography libraries linked in Lix: libsodium & OpenSSL. libsodium is only used to perform ed25519 signatures in one place: valid path info signatures. This is a critical operation for anyone running a binary cache with trust constraints, libsodium is/was known for how easy is it to use and is a fork of NaCl, a library maintained by famed academical cryptographers. OpenSSL can perform ED25519 signatures, the big question is whether we can replicate the exact same format.
Owner

As discussed on matrix here, libsodium has had some quality bugs where they shipped some busted link flags a while ago, but in general screwing up crypto without it being detected quickly is pretty hard to do, so this is not the highest priority project. Nevertheless, having less code is good :)

As [discussed on matrix here](https://matrix.to/#/!lymvtcwDJ7ZA9Npq:lix.systems/$Vzq5O0Ol_15kDFoPhocSVJOTlGPOPh3qUBNMMW-YtRs?via=lix.systems&via=matrix.org&via=catgirl.cloud), libsodium has had some quality bugs where they shipped some busted link flags a while ago, but in general screwing up crypto without it being detected quickly is pretty hard to do, so this is not the highest priority project. Nevertheless, having less code is good :)
Member

This issue was mentioned on Gerrit on the following CLs:

  • commit message in cl/4073 ("libstore: use OpenSSL for Ed25519 signatures")
<!-- GERRIT_LINKBOT: {"cls": [{"backlink": "https://gerrit.lix.systems/c/lix/+/4073", "number": 4073, "kind": "commit message"}], "cl_meta": {"4073": {"change_title": "libstore: use OpenSSL for Ed25519 signatures"}}} --> This issue was mentioned on Gerrit on the following CLs: * commit message in [cl/4073](https://gerrit.lix.systems/c/lix/+/4073) ("libstore: use OpenSSL for Ed25519 signatures")
Sign in to join this conversation.
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lix-project/lix#969
No description provided.