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

Benchmark crypto-cpp #636

Closed
war-in opened this issue Jan 5, 2023 · 1 comment
Closed

Benchmark crypto-cpp #636

war-in opened this issue Jan 5, 2023 · 1 comment
Assignees
Labels
question Further information is requested

Comments

@war-in
Copy link
Collaborator

war-in commented Jan 5, 2023

Feature Request

We would like to use more cryptography from the crypto-cpp library. If the results will be promising we will probably use crypto-cpp to replace some functions:

  • private_to_stark_key
  • verify
  • sign
  • pedersen_hash
@war-in war-in added the enhancement New feature or request label Jan 5, 2023
@war-in war-in added this to the Remove cairo-lang dependency milestone Jan 5, 2023
@cptartur
Copy link
Member

cptartur commented Jan 5, 2023

From my testing it seems:

  • verify has similar performance in cpp and python
  • hash is faster in cpp for longer inputs, for short python is faster
  • sign is substantially lower in cpp, 6-10x slower than python implementation

sign is problematic enough that I'd say it currently prevents us from using crypto-cpp version at all. It is probably the most often used crypto operation in starknet.py and 6-10x slowdown would be noticeable to all users.

@cptartur cptartur added question Further information is requested and removed enhancement New feature or request labels Jan 5, 2023
@cptartur cptartur closed this as completed Jan 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants