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 510 nano app implement signtransfer method #8

Merged
merged 21 commits into from
Nov 30, 2024

Conversation

keiff3r
Copy link

@keiff3r keiff3r commented Nov 28, 2024

No description provided.

Meg4me and others added 18 commits November 19, 2024 10:30
…into test/LDG-505--nano-app-implement-verifyaddress-test
Add support for parsing and displaying simple transfer transactions.
Signing implementation will follow in a subsequent commit.

Key changes:
- Replace generic transaction handling with specific simple transfer support
- Update transaction parsing to handle simple transfer payload format
- Add new UI flow to display simple transfer details including sender/recipient
- Switch from keccak to SHA256 for transaction hashing
- Update address handling to use 32-byte Concordium addresses
- Add base58 address encoding for better readability
- Remove unused transaction serialization code
- Update command enum to use SIGN_SIMPLE_TRANSFER

Technical details:
- Added transaction type enum and union to support multiple tx types
- Updated transaction context to store raw transaction type
- Added address format conversion utilities
- Simplified transaction parsing by removing generic structure
- Rename SIGN_TX instruction to SIGN_SIMPLE_TRANSFER for clarity
- Update sign_tx method to accept transaction type instruction
- Fix test_sign_tx_simple_transfer with correct transaction hex data
- Update test_error_cmd to use new instruction name
- Modify command sender to support different transaction signing types

This change enables proper testing of simple transfer signing and
generates corresponding golden snapshots.
- Change signature algorithm from ECDSA (secp256k1) to EdDSA (Ed25519)
- Reduce MAX_DER_SIG_LEN from 72 to 64 bytes for Ed25519 signatures
- Remove 'v' parameter as it's specific to ECDSA
- Simplify signature response format to raw bytes
- Update crypto_sign_message to use cx_eddsa_sign_no_throw
- Adjust test assertions for new signature format

This change implements the correct signature scheme for the protocol
and fixes the corresponding test cases.
Copy link

@github-advanced-security github-advanced-security bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CodeQL found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.

@keiff3r keiff3r marked this pull request as ready for review November 30, 2024 17:41
@keiff3r keiff3r assigned keiff3r and unassigned keiff3r Nov 30, 2024
@keiff3r keiff3r requested a review from a team November 30, 2024 17:42
@keiff3r keiff3r merged commit b5f576d into main Nov 30, 2024
39 of 44 checks passed
@keiff3r keiff3r deleted the feat/LDG-510--nano-app-implement-signtransfer-method branch December 4, 2024 10:58
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.

4 participants