Skip to content

verify-blob laods entire payload into memory #4112

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

Open
ramonpetgrave64 opened this issue Mar 12, 2025 · 3 comments · May be fixed by #4159
Open

verify-blob laods entire payload into memory #4112

ramonpetgrave64 opened this issue Mar 12, 2025 · 3 comments · May be fixed by #4159
Labels
enhancement New feature or request

Comments

@ramonpetgrave64
Copy link
Contributor

ramonpetgrave64 commented Mar 12, 2025

Description

Currently, when calling cosign’s verify-blob subcommand, it will actually load the entire message into memory first, before passing it to the SignerVerifier.VerifySignature() method. This means that verifying a 1GB file will use an additional 1GB of memory. This is likely undesirable, so this issue is requesting that it instead pass along an io.Reader of the file, so it can be streamed, instead of pre-loaded.

@ramonpetgrave64 ramonpetgrave64 added the enhancement New feature or request label Mar 12, 2025
@krisharyan
Copy link

I am working on this

@krisharyan
Copy link

@ramonpetgrave64 how big do you want me to make the buffer?

@ramonpetgrave64
Copy link
Contributor Author

@krisharyan117 Can you explain a bit more, or open a draft PR, if you're ready?

1KB sounds like an okay buffer size, if the performance is still good.

@krisharyan krisharyan linked a pull request Apr 10, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants