-
Notifications
You must be signed in to change notification settings - Fork 4
feat: setup hw crypto #295
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
Conversation
Caution Review failedThe pull request is closed. WalkthroughIntegrates hardware crypto APIs into eid-wallet pages. On onboarding/verify, checks for default keypair, generates if missing, and includes publicKey in provisioning requests. On sign, verifies key existence, builds a signed payload, generates a real signature via signPayload, and posts it to the redirect URI. Minor import/order adjustments. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant OnboardingPage
participant CryptoHW
participant Provisioner
User->>OnboardingPage: Open page (onMount)
OnboardingPage->>CryptoHW: exists("default")?
alt Missing key
OnboardingPage->>CryptoHW: generate("default")
end
OnboardingPage->>CryptoHW: getPublicKey("default")
OnboardingPage->>Provisioner: POST { ..., publicKey }
Provisioner-->>OnboardingPage: 200/response
sequenceDiagram
participant User
participant SignPage
participant CryptoHW
participant Backend
User->>SignPage: Initiate sign
SignPage->>CryptoHW: exists("default")?
alt No key
SignPage-->>User: Error "Default key pair does not exist"
else Has key
SignPage->>SignPage: Build signedPayload {sessionId, publicKey, message}
SignPage->>CryptoHW: signPayload("default", JSON.stringify(signedPayload))
CryptoHW-->>SignPage: signature
SignPage->>Backend: POST signedPayload(+signature) to redirect_uri
Backend-->>SignPage: Response
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (3)
✨ Finishing Touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
Description of change
Issue Number
Type of change
How the change has been tested
Change checklist
Summary by CodeRabbit
New Features
Improvements