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

Tests for cryptography related code #2

Open
5 tasks done
vidya88 opened this issue Sep 20, 2019 · 0 comments
Open
5 tasks done

Tests for cryptography related code #2

vidya88 opened this issue Sep 20, 2019 · 0 comments

Comments

@vidya88
Copy link

vidya88 commented Sep 20, 2019

@Retsediv commented on Mar 15

For now, all the testing was done manually. As a result, it takes a lot of time and can cause be the reason for some bugs. So, we should write automatic tests to cover at least some crucial part of the code.

The main problem is that we do not know yet how(and is it possible at all) to run an emulator and to test functions which require Ledger SDK. So, it could be a point of discussion.

So, as for us, the only way to write meaningful tests is to test apdu calls. We have a request for getting the public key and based on it, we can check the following:

  • Get the version and check if nothing fails
  • Get the public key and check if it's valid
  • Get the address and check whether this public key generates this address
  • Get a signed public key and check whether we can recover our public key from this signature
  • Sign some tx and check whether it is valid and check the inner hash of tx
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

No branches or pull requests

1 participant