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

introduce streaming access to storage items #3604

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

TychoVrahe
Copy link
Contributor

introducing access to slices of data from storage.

as preparation for #2521 , where it is needed for accessing homescreen image in memory constraint environment.

@TychoVrahe TychoVrahe self-assigned this Mar 14, 2024
@TychoVrahe TychoVrahe removed the request for review from andrewkozlik March 14, 2024 14:58
@prusnak
Copy link
Member

prusnak commented Mar 14, 2024

IIRC homescreen is stored as unencrypted value in the storage, no?

If that is the case, I propose to allow streaming only for the unencrypted values. It does not feel right to allow streaming for the encrypted ones.

@TychoVrahe
Copy link
Contributor Author

Homescreen is indeed unencrypted, i wanted to keep the API universal but its not strictly needed at this point.

just to be clear what this does: basically you can request just part of the stored data, at given offset with specified length. Encrypted items are decrypted at each separate request and just the requested part is copied into the output buffer. IMO this should be fine from security point of view, but it is some added complexity.

@prusnak
Copy link
Member

prusnak commented Mar 14, 2024

Let's not add features we have no use case for. Especially when it comes to the storage.

@Hannsek Hannsek requested a review from matejcik May 7, 2024 12:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🔎 Needs review
Development

Successfully merging this pull request may close these issues.

2 participants