aldenml / ecc

elliptic-curve cryptography
MIT License
28 stars 1 forks source link

ecc_frost_ristretto255_sha512_trusted_dealer_keygen memory access out of bounds #85

Closed kaxxa123 closed 1 year ago

kaxxa123 commented 2 years ago

Tried to get your Frost implementation to work, but failed with "memory access out of bounds"

I observed that under: https://github.com/aldenml/ecc/blob/master/bindings/js/libecc-post.js

Module.ecc_frost_ristretto255_sha512_secret_share_shard_with_coefficients = ( const ptr_points = mput(points, n*ecc_frost_ristretto255_sha512_SCALARSIZE);

Shouldn't this be? const ptr_points = mput(points, n*ecc_frost_ristretto255_sha512_POINTSIZE);

aldenml commented 2 years ago

Hi @kaxxa123, thank you very much for reporting this bug. This code libecc-post.js is auto-generated, let me know if you need some help before I'm able to release a new version.