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

Allows to sign using the BLS curve #121

Merged
merged 13 commits into from
Oct 30, 2024
Merged

Allows to sign using the BLS curve #121

merged 13 commits into from
Oct 30, 2024

Conversation

spalmer25
Copy link
Collaborator

@spalmer25 spalmer25 commented Oct 17, 2024

Associated LedgerHQ/ledger-app-database PR: LedgerHQ/ledger-app-database#279

@spalmer25 spalmer25 self-assigned this Oct 17, 2024
@spalmer25 spalmer25 force-pushed the palmer@functori@add-bls branch 7 times, most recently from c990563 to 09147e0 Compare October 22, 2024 11:01
@spalmer25 spalmer25 marked this pull request as ready for review October 22, 2024 11:02
src/keys.c Outdated Show resolved Hide resolved
src/keys.c Outdated Show resolved Hide resolved
src/keys.c Outdated Show resolved Hide resolved
src/keys.h Outdated Show resolved Hide resolved
src/crypto.h Outdated Show resolved Hide resolved
@spalmer25 spalmer25 force-pushed the palmer@functori@add-bls branch 4 times, most recently from c5c8a1c to 4591406 Compare October 24, 2024 12:47
Copy link
Collaborator

@ajinkyaraj-23 ajinkyaraj-23 left a comment

Choose a reason for hiding this comment

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

Check if eth apps do this or any other app does this? As a last resort we can just ask ledger if saving the private key to RAM is safe or should be avoided .

src/apdu_sign.c Outdated Show resolved Hide resolved
src/apdu_sign.c Show resolved Hide resolved
src/keys.h Outdated Show resolved Hide resolved
src/crypto.c Show resolved Hide resolved
 - use `cx_ecfp_256_public_key_t` instead of `cx_ecfp_public_key_t`
 because it will become an abstract type
 - create an union in order to be able to handle all
 `cx_ecfp_public_key_t` at the same time. `cx_ecfp_384_public_key_t`
 will be add later for BLS keys
 - alias `cx_ecfp_compressed_public_key_t` to differentiate it from
 `cx_ecfp_public_key_t`
 - use customize `cx_ecfp_public_key_t` to fit tezos compressed public
 key and merge them in a struct `tz_ecfp_compressed_public_key_t`
 - use directly derivation_type
 - inline derivation_mode
 - gen pk
 - sign
 - parsable in operations
As the BLS signature uses its own hash function
 - init hash state at first packet
 - let cx_hash_no_throw handle the hashing
@spalmer25 spalmer25 force-pushed the palmer@functori@add-bls branch from 4591406 to c4ef534 Compare October 25, 2024 11:16
Copy link
Collaborator

@ajinkyaraj-23 ajinkyaraj-23 left a comment

Choose a reason for hiding this comment

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

LGTM.

@spalmer25 spalmer25 merged commit 50ec8cf into main Oct 30, 2024
37 checks passed
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.

2 participants