Skip to content
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

Feat/ldg 516 nano app implement exportprivatekey method #32

Merged
merged 19 commits into from
Dec 10, 2024

Conversation

keiff3r
Copy link

@keiff3r keiff3r commented Dec 9, 2024

No description provided.

- Added support for new key derivation paths by introducing `isNewPath` flag in `exportPrivateKeyContext_t`.
- Updated `exportPrivateKeySeed` and `exportPrivateKeyBls` functions to handle both legacy and new paths.
- Modified `handleExportPrivateKey` to parse `dataBuffer` for new path information and adjust key derivation path accordingly.
- Extended `display` buffer size in `exportPrivateKeyContext_t` to accommodate new path display information.
- Updated `derivation_path_keys_t` enum to include new path keys `NEW_ID_CRED_SEC` and `NEW_PRF_KEY`.
Add support for exporting private keys with different modes:
- Add new P1 parameters for export types (standard, recovery, prfkey_and_idcredsec)
- Add P2 parameter for BLS key export
- Implement export_private_key method with support for:
  - Identity index based export
  - IDP index based export
  - Different export types via P1 parameter

The implementation includes:
- Type safety using Literal types for export modes
- Proper data serialization for both identity and IDP index modes
- Context manager pattern for async response handling
- Adjust display string formatting to handle IDP and ID numbers correctly
- Fix offset calculation by using bin2dec return value
- Remove null terminator to ensure proper string concatenation
@keiff3r keiff3r marked this pull request as ready for review December 10, 2024 10:29
@keiff3r keiff3r requested a review from a team December 10, 2024 10:29
src/exportPrivateKey.c Fixed Show fixed Hide fixed
n4l5u0r
n4l5u0r previously approved these changes Dec 10, 2024
@keiff3r keiff3r dismissed n4l5u0r’s stale review December 10, 2024 11:16

The merge-base changed after approval.

@n4l5u0r n4l5u0r self-requested a review December 10, 2024 11:17
n4l5u0r
n4l5u0r previously approved these changes Dec 10, 2024
@keiff3r keiff3r requested a review from a team December 10, 2024 11:20
@keiff3r keiff3r dismissed n4l5u0r’s stale review December 10, 2024 11:21

The merge-base changed after approval.

Z4karia
Z4karia previously approved these changes Dec 10, 2024
n4l5u0r
n4l5u0r previously approved these changes Dec 10, 2024
@keiff3r keiff3r dismissed stale reviews from n4l5u0r and Z4karia via c234921 December 10, 2024 11:23
@n4l5u0r n4l5u0r self-requested a review December 10, 2024 11:28
@n4l5u0r n4l5u0r merged commit 837c7a8 into main Dec 10, 2024
29 of 30 checks passed
@n4l5u0r n4l5u0r deleted the feat/LDG-516--nano-app-implement-exportprivatekey-method branch December 10, 2024 11:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants