-
Notifications
You must be signed in to change notification settings - Fork 181
fix: use elliptic DER bytes directly for ECDSA signatures #1210
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
base: dev
Are you sure you want to change the base?
Conversation
chore: fix mobile deploy pipelines v2.6.8 rd2 (selfxyz#1159)
chore: fix build version numbers for v2.6.8
release: v2.6.8 rd3
chore: address staging branch issues pr selfxyz#1169 (selfxyz#1178)
…ing-with-id-picker chore: update staging; release id picker `v.2.6.8`
WalkthroughReplaced hex-based DER signature conversion with direct number[] casting in ECDSA signing paths within two utilities. No control-flow or API changes; only the method of constructing signature bytes was updated. Removed TypeScript ignore comments and Buffer.from usage. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (2)
common/src/utils/passports/genMockIdDoc.ts (1)
226-270: Consider extracting duplicate sign() logic.The
sign()function here duplicates logic fromgenMockPassportData.ts(lines 143-188). Consider extracting to a shared utility module for maintainability.common/src/utils/passports/genMockPassportData.ts (1)
179-179: Approve correct ECDSA DER byte usage
- genMockPassportData and genMockIdDoc now correctly emit raw DER bytes.
- Recommend adding TS-level unit tests to cover ECDSA mock data generation and parsing via
extractRSFromSignature.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
common/src/utils/passports/genMockIdDoc.ts(1 hunks)common/src/utils/passports/genMockPassportData.ts(1 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{js,ts,tsx,jsx,sol,nr}
📄 CodeRabbit inference engine (.cursorrules)
**/*.{js,ts,tsx,jsx,sol,nr}: NEVER log sensitive data including PII (names, DOB, passport numbers, addresses), credentials, tokens, API keys, private keys, or session identifiers.
ALWAYS redact/mask sensitive fields in logs using consistent patterns (e.g.,***-***-1234for passport numbers,J*** D***for names).
Files:
common/src/utils/passports/genMockPassportData.tscommon/src/utils/passports/genMockIdDoc.ts
common/src/**/*.{ts,tsx,js,jsx}
⚙️ CodeRabbit configuration file
common/src/**/*.{ts,tsx,js,jsx}: Review shared utilities for:
- Reusability and modular design
- Type safety and error handling
- Side-effect management
- Documentation and naming clarity
Files:
common/src/utils/passports/genMockPassportData.tscommon/src/utils/passports/genMockIdDoc.ts
🔇 Additional comments (1)
common/src/utils/passports/genMockIdDoc.ts (1)
261-261: Critical fix approved: consistent with genMockPassportData.ts.The change correctly handles DER bytes from elliptic. Same validation recommendations apply.
Summary by CodeRabbit