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

ECIES for Cosigner Security #162

Closed
wants to merge 10 commits into from
Closed

Conversation

agouin
Copy link
Member

@agouin agouin commented Jun 20, 2023

Add option to use ECIES + ECDSA (fast) for cosigner encryption+signature instead of RSA + P5S (slow)

With RSA (20-60ms per block sign)

D[2023-06-20|20:59:28.017] I am the raft leader. Managing the sign process for this block module=validator chain_id=chain-1 height=20 round=0 step=2
D[2023-06-20|20:59:28.077] Have threshold peers                         module=validator chain_id=chain-1 height=20 round=0 step=2
D[2023-06-20|20:59:28.078] Number of ephemeral parts for peer           module=validator peer=1 count=1 chain_id=chain-1 height=20 round=0 step=2
D[2023-06-20|20:59:28.078] Number of ephemeral parts for peer           module=validator peer=3 count=1 chain_id=chain-1 height=20 round=0 step=2
D[2023-06-20|20:59:28.088] Received signature from peer                 module=validator peer=1 chain_id=chain-1 height=20 round=0 step=2
D[2023-06-20|20:59:28.090] Received signature from peer                 module=validator peer=3 chain_id=chain-1 height=20 round=0 step=2
D[2023-06-20|20:59:28.090] Done waiting for cosigners, assembling signatures module=validator chain_id=chain-1 height=20 round=0 step=2
D[2023-06-20|20:59:28.123] Have threshold peers                         module=validator chain_id=chain-1 height=20 round=0 step=2
D[2023-06-20|20:59:28.123] Number of ephemeral parts for peer           module=validator peer=2 count=1 chain_id=chain-1 height=20 round=0 step=2
D[2023-06-20|20:59:28.123] Number of ephemeral parts for peer           module=validator peer=3 count=1 chain_id=chain-1 height=20 round=0 step=2
D[2023-06-20|20:59:28.138] Received signature from peer                 module=validator peer=3 chain_id=chain-1 height=20 round=0 step=2
D[2023-06-20|20:59:28.140] Received signature from peer                 module=validator peer=2 chain_id=chain-1 height=20 round=0 step=2
D[2023-06-20|20:59:28.140] Done waiting for cosigners, assembling signatures module=validator chain_id=chain-1 height=20 round=0 step=2
D[2023-06-20|20:59:28.141] I am the raft leader. Managing the sign process for this block module=validator chain_id=chain-1 height=20 round=0 step=3
D[2023-06-20|20:59:28.176] Have threshold peers                         module=validator chain_id=chain-1 height=20 round=0 step=3
D[2023-06-20|20:59:28.176] Number of ephemeral parts for peer           module=validator peer=2 count=1 chain_id=chain-1 height=20 round=0 step=3
D[2023-06-20|20:59:28.176] Number of ephemeral parts for peer           module=validator peer=3 count=1 chain_id=chain-1 height=20 round=0 step=3
D[2023-06-20|20:59:28.178] I am the raft leader. Managing the sign process for this block module=validator chain_id=chain-1 height=20 round=0 step=3
D[2023-06-20|20:59:28.187] Received signature from peer                 module=validator peer=2 chain_id=chain-1 height=20 round=0 step=3
D[2023-06-20|20:59:28.194] Received signature from peer                 module=validator peer=3 chain_id=chain-1 height=20 round=0 step=3
D[2023-06-20|20:59:28.194] Done waiting for cosigners, assembling signatures module=validator chain_id=chain-1 height=20 round=0 step=3

With ECIES (3-5ms per block sign):

D[2023-06-20|20:51:41.768] I am the raft leader. Managing the sign process for this block module=validator chain_id=chain-2 height=35 round=0 step=3
D[2023-06-20|20:51:41.768] I am the raft leader. Managing the sign process for this block module=validator chain_id=chain-2 height=35 round=0 step=3
D[2023-06-20|20:51:41.768] Generated nonces                             module=validator cosigner=3 chain_id=chain-2 height=35 round=0 step=3
D[2023-06-20|20:51:41.769] Received nonces                              module=validator cosigner=1 chain_id=chain-2 height=35 round=0 step=3
D[2023-06-20|20:51:41.769] Have nonces from threshold number of cosigners module=validator chain_id=chain-2 height=35 round=0 step=3
D[2023-06-20|20:51:41.769] Received nonces                              module=validator cosigner=2 chain_id=chain-2 height=35 round=0 step=3
D[2023-06-20|20:51:41.770] Received signature part                      module=validator cosigner=3 chain_id=chain-2 height=35 round=0 step=3
D[2023-06-20|20:51:41.771] Received signature part                      module=validator cosigner=1 chain_id=chain-2 height=35 round=0 step=3
D[2023-06-20|20:51:41.771] Assembled full signature                     module=validator chain_id=chain-2 height=35 round=0 step=3
D[2023-06-20|20:51:42.722] I am the raft leader. Managing the sign process for this block module=validator chain_id=chain-1 height=41 round=0 step=1
D[2023-06-20|20:51:42.723] Generated nonces                             module=validator cosigner=3 chain_id=chain-1 height=41 round=0 step=1
D[2023-06-20|20:51:42.723] I am the raft leader. Managing the sign process for this block module=validator chain_id=chain-1 height=41 round=0 step=1
D[2023-06-20|20:51:42.724] Received nonces                              module=validator cosigner=2 chain_id=chain-1 height=41 round=0 step=1
D[2023-06-20|20:51:42.724] Have nonces from threshold number of cosigners module=validator chain_id=chain-1 height=41 round=0 step=1
D[2023-06-20|20:51:42.724] Received nonces                              module=validator cosigner=1 chain_id=chain-1 height=41 round=0 step=1
D[2023-06-20|20:51:42.724] Received signature part                      module=validator cosigner=3 chain_id=chain-1 height=41 round=0 step=1
D[2023-06-20|20:51:42.725] Received signature part                      module=validator cosigner=2 chain_id=chain-1 height=41 round=0 step=1
D[2023-06-20|20:51:42.725] Assembled full signature                     module=validator chain_id=chain-1 height=41 round=0 step=1
I[2023-06-20|20:51:42.726] Signed proposal                              module=validator chain_id=chain-1 height=41 round=0 type=SIGNED_MSG_TYPE_PROPOSAL sig=F57E5253CC1D ts=1687294302 node=chain-1-val-0-node-1-TestMultipleChainHorcrux:1234

@agouin agouin mentioned this pull request Jul 13, 2023
@agouin
Copy link
Member Author

agouin commented Jul 13, 2023

Continued in #171

@agouin agouin closed this Jul 13, 2023
@agouin agouin mentioned this pull request Jul 14, 2023
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.

1 participant