View Issue Details

IDProjectCategoryView StatusLast Update
0008630GNUnetcore servicepublic2025-09-17 10:56
Reporterschanzen Assigned Toch3 Due Date
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Target Version0.25.0Fixed in Version0.25.0 
Summary0008630: Change symmetric encryption scheme to XChaCha20-Poly1305
DescriptionCurrently, we as using a AES-Twofish double encryption and HMAC.
For performance and security reasons, we should move to something more simple and standard.

After discussions we settled on XChaCha20-Poly1305 that is offered through a current dependency (libsodium).

I have reviewed the code in gnunet-service-core_kx.c and the changes are rather straight-forward.
I suggest that the implementation for both encryption schemes should live (teporarily) in the same source file and we guard the new implementation with a define. E.g.

#if CONG_CRYPTO_ENABLED
 // Do XChaCha20-Poly1305 encryption/decryption here
#else
 // Do current encryption/decryption here
#endif

I think should should possible with a couple of such #ifdefs.

This is, of course, a change that very much breaks the P2P protocol. So the above approach is important unless we want to keep this in a branch for a long time. Also this means this requires a "major" version bump.
TagsNo tags attached.

Relationships

child of 0008596 assignedch3 CONG meta issue 

Activities

schanzen

2024-03-12 11:45

administrator   ~0021857

Assigned to ch3 for now, but I can help with implementation.

schanzen

2024-03-12 11:49

administrator   ~0021858

We should also consider first testing the conceptual changes to CONG separately from the crypto.

schanzen

2024-03-12 11:55

administrator   ~0021859

We also could include authenticated data in the tag (e.g. the GNUNET_MessageHeader or any other metadata we will include in the EncryptedMessage struct)

schanzen

2024-03-12 13:04

administrator   ~0021865

Draft implementation in dev/schanzen/core_xchacha

schanzen

2025-07-28 17:40

administrator   ~0025576

We swapped this out for ChaCha20-IETF but really we may want to use XChaCha20 again: https://github.com/jedisct1/libsodium/issues/554

schanzen

2025-09-17 10:56

administrator   ~0025933

Released

Issue History

Date ModifiedUsernameFieldChange
2024-03-12 11:44schanzenNew Issue
2024-03-12 11:44schanzenStatusnew => assigned
2024-03-12 11:44schanzenAssigned To => ch3
2024-03-12 11:44schanzenIssue generated from: 0008597
2024-03-12 11:45schanzenNote Added: 0021857
2024-03-12 11:49schanzenNote Added: 0021858
2024-03-12 11:55schanzenNote Added: 0021859
2024-03-12 13:04schanzenNote Added: 0021865
2024-03-12 22:16schanzenRelationship addedchild of 0008596
2024-08-26 10:24schanzenTarget Version0.22.0 => 0.23.0
2024-11-14 08:46schanzenTarget Version0.23.0 => 0.24.0
2025-02-17 13:26schanzenTarget Version0.24.0 => 0.25.0
2025-03-27 08:31schanzenIssue cloned: 0009666
2025-07-28 17:40schanzenNote Added: 0025576
2025-09-16 10:05schanzenStatusassigned => resolved
2025-09-16 10:05schanzenResolutionopen => fixed
2025-09-16 10:05schanzenFixed in Version => 0.25.0
2025-09-17 10:56schanzenNote Added: 0025933
2025-09-17 10:56schanzenStatusresolved => closed