You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the only way to provide an elliptic key manually is to have a PEM-encoded public key written to the disk, and then pass that to use_elliptic_key_verifier. It would be helpful if once could also pass the 33-byte compressed version of the public key, just as bytes.
If I understand you correctly, you want an additional method to the library that would support setting the key param from memory rather than passing it from disk?
So, have an ec_key.Signer that takes the key directly rather than reading from a file and then have an use_elliptic_key_signer that passes the key bytes directly. Same for verifier, of course.
I'm not sure if this could also work for CLI though.
My Go dev's brain jumps to io.Reader so the caller can pass in any format regardless of bytes / file. If there's a direct equivalent in Python that could work nicely.
Activity
makew0rld commentedon Oct 22, 2025
Same goes for the signature file (sigstore/in-toto JSON) needing to be on the disk.
mihaimaruseac commentedon Oct 23, 2025
If I understand you correctly, you want an additional method to the library that would support setting the key param from memory rather than passing it from disk?
So, have an
ec_key.Signerthat takes the key directly rather than reading from a file and then have anuse_elliptic_key_signerthat passes the key bytes directly. Same for verifier, of course.I'm not sure if this could also work for CLI though.
makew0rld commentedon Oct 23, 2025
That's correct. And supporting a raw compressed key format (33 bytes) rather than only PEM.
I wasn't considering the CLI, only the library. I think it's fair for this option to not be available there.
mihaimaruseac commentedon Oct 24, 2025
That sounds good! Would you be willing to send a PR?
spencerschrock commentedon Oct 24, 2025
My Go dev's brain jumps to
io.Readerso the caller can pass in any format regardless of bytes / file. If there's a direct equivalent in Python that could work nicely.makew0rld commentedon Nov 8, 2025
Possibly in the future, although it's not a top priority right now.