kframework / k-legacy

The K tools (deprecated, see README)
http://kframework.org
Other
146 stars 61 forks source link

add ecdsa public key recovery function to KRYTPO module #2334

Closed dwightguth closed 6 years ago

dwightguth commented 6 years ago

Please don't merge this yet, it's computing incorrect senders. I will investigate further tomorrow.

dwightguth commented 6 years ago

Okay, this is ready for review. I tested with the evm semantics. There seems to be another bug somewhere but it's unrelated to the crypto built-in. I'll investigate tomorrow.

dwightguth commented 6 years ago

I can do that tomorrow, yeah, but I'm not entirely sure what good it will do because I will have to derive the test input and outputs from running the test code in a debugger and inspecting the outputs, in which case I'm not really testing anything. I can tell you that the code correctly computes the senders of transactions in the evm semantics though.

msaxena2 commented 6 years ago

@dwightguth Is it possible to find a standard set of values that we can test against? Like some documentation with an example online?

dwightguth commented 6 years ago

I'll look tomorrow, maybe ethereumj has tests.

dwightguth commented 6 years ago

@msaxena2 I added a test for public key recovery by manually translating the test inputs and outputs for a test that came from ethereumj into K. Can we get this merged now that it's tested and documented?

msaxena2 commented 6 years ago

@dwightguth Lgtm. Will merge as soon as tests pass.