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

Streaming hybrid encryption/decryption API #11

Open
charredlot opened this issue Jan 16, 2021 · 3 comments
Open

Streaming hybrid encryption/decryption API #11

charredlot opened this issue Jan 16, 2021 · 3 comments
Assignees

Comments

@charredlot
Copy link

Hi

I was wondering if y'all were planning on adding a streaming hybrid encryption/decryption API (similar to the existing streamingaead)? It would be useful for encrypting and decrypting large files.

Is your feature request related to a problem?

The existing HybridEncrypt API requires loading the entire plaintext into a slice which isn't great for large files.

Describe the solution you'd like

A streaming HybridEncrypt API that takes an io.Writer (and corresponding streaming HybridDecrypt of course) similar to streamingaead

Describe alternatives you've considered

  • We'd rather use tink than rolling our own out of the primitives.
  • We could chunk the file and call HybridEncrypt.Encrypt repeatedly but that seems inefficient for speed and file size and problematic when reassembling the chunks
  • I tried combining the existing hybrid encryption ECIES with the existing streamingaead in this commit and it functions, but I don't know if it makes sense to do that.

Additional context

@kste
Copy link
Contributor

kste commented Jan 19, 2021

Yes, it's definitely something we want to add and we have someone looking into this.

@gdbelvin
Copy link

gdbelvin commented Nov 4, 2022

I'd like to add my support for this.

@morambro morambro transferred this issue from tink-crypto/tink Jan 26, 2024
@lucastheisen
Copy link

lucastheisen commented Oct 10, 2024

Has there been any movement on this? I am also very interested in being able to encrypt large files with they hybrid approach. Also it would be nice if there was a way to know encrypted size ahead of time. Many data streaming libraries need to know the size of content before beginning the write.

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

No branches or pull requests

6 participants