Skip to content

Conversation

ChoHee15
Copy link

@ChoHee15 ChoHee15 commented Jul 4, 2025

Overview

This PR adds a design document for Peer Cache Encryption Storage in Dragonfly's P2P file transfer system. This is part of the preparation for the GLCC project.

Changes

Add systems-analysis/peer-cache-encryption-storage.md design document
Propose P2P Peer Cache Encryption Storage implementation.

Key Features

Data Security: Introduces encryption for cached data to protect sensitive information.
Backward Compatible: Maintains existing Dragonfly functionalities and is configurable as an optional feature.
Seamless Integration: Integrates with the existing Persistent Cache workflow.
Minimal Overhead: Aims for minimal performance impact during encryption/decryption.

@LunaWhispers
Copy link
Contributor

@ChoHee15 Implementation can add some text introduction here as appropriate. Also for the encryption algorithm, the advantages of choosing it can be analyzed.

@LunaWhispers
Copy link
Contributor

@ChoHee15 Please remember to check my comments in your commits!

@ChoHee15
Copy link
Author

I will add more detail to design and implementation.

Signed-off-by: chohee <[email protected]>
@LunaWhispers
Copy link
Contributor

Please do not add the ‘dragonfly-client-crypto’ module, it will affect the structure of the client code, please make sure to modify this part again.

@LunaWhispers
Copy link
Contributor

You select Manager to store key, so you need add Manager design to here

## Compatibility

1. **Backward Compatibility**: The existing `Task` and `PersistentCacheTask` functionalities will remain unchanged for non-encrypted operations. The encryption feature will be optional and configurable.
2. **Configuration**: New encryption-related configurations will be added with sensible defaults (e.g., encryption disabled by default).
Copy link
Contributor

Choose a reason for hiding this comment

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

For the configuration, you can elaborate on where the encryption configuration should be specified, and add an example. I suggest putting it in the client's yaml file.


## Compatibility

1. **Backward Compatibility**: The existing `Task` and `PersistentCacheTask` functionalities will remain unchanged for non-encrypted operations. The encryption feature will be optional and configurable.
Copy link
Contributor

Choose a reason for hiding this comment

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

One thing to consider here. The same client, if the encryption configuration is changed, how to unify the management and identification of encrypted and non-encrypted tasks on the backend at this time.

Copy link
Contributor

Choose a reason for hiding this comment

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

@ChoHee15 Where is this part of the design presented


```rust
// dragonfly-client-storage/src/content.rs
pub async fn write_persistent_cache_piece<R: AsyncRead + Unpin + ?Sized>(
Copy link
Contributor

Choose a reason for hiding this comment

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

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