verify-blob laods entire payload into memory
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.
- https://github.com/sigstore/cosign/blob/647eca1376ea75b3af88cd65f8f35f9e37ecd671/cmd/cosign/cli/verify/verify_blob.go#L181
I am working on this
@ramonpetgrave64 how big do you want me to make the buffer?
@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.