[WebGPU Plugin EP] implements signing verification#809
Open
prathikr wants to merge 8 commits into
Open
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds RSA-SHA256 signature verification for the WebGPU plugin EP manifest. Before using a fetched manifest to determine which WebGPU EP package to download, the code now fetches a corresponding .sig file from the CDN, decodes the base64 signature, and verifies it against a hardcoded RSA-4096 public key using OpenSSL. This prevents tampering with the manifest in transit or on the CDN.
Changes:
- Added
VerifyRsaSha256Signatureutility function inep_utils.cc/husing OpenSSL'sEVP_DigestVerify*API to verify RSA-SHA256-PKCS1v15 detached signatures. - Integrated manifest signature verification into
FetchManifestinwebgpu_ep_bootstrapper.cc, embedding the RSA-4096 public key and fetching the.sigfile alongside the manifest. - Added OpenSSL as a build dependency (
find_package+target_link_libraries) inCMakeLists.txt.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
sdk_v2/cpp/src/ep_detection/webgpu_ep_bootstrapper.cc |
Adds public key constant, fetches .sig file, and calls signature verification before parsing the manifest. Currently points to dev URL (must be changed to prod). |
sdk_v2/cpp/src/ep_detection/ep_utils.h |
Declares VerifyRsaSha256Signature with documentation. |
sdk_v2/cpp/src/ep_detection/ep_utils.cc |
Implements RSA-SHA256 signature verification using OpenSSL BIO/EVP APIs. |
sdk_v2/cpp/CMakeLists.txt |
Adds find_package(OpenSSL CONFIG REQUIRED) and links OpenSSL::Crypto. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.