hax icon indicating copy to clipboard operation
hax copied to clipboard

Missing f* files for nat_mod_macro

Open matthiasspielberg1 opened this issue 7 months ago • 3 comments

We are currently implementing KZG polynomial commitment protocol using the Bls12-381 pairing curve. When trying to verify our implementation we are missing some f* files that the curve is depending on (such as Num_bigint). We can't find these in the lib, is it possible to find these from somewhere?

@W95Psp

matthiasspielberg1 avatar May 12 '25 13:05 matthiasspielberg1

I think you are using the old hacspec library (https://github.com/hacspec/hacspec/tree/master/lib), however, this library is deprecated and the current version of hax doesn't support it.

I guess you are building on https://github.com/hacspec/specs/tree/main/bls12-381? This was written for hacspec against the deprecated hacspec lib, so sadly this spec will probably not work nicely with hax.

W95Psp avatar May 12 '25 13:05 W95Psp

You're correct, we are using https://github.com/hacspec/specs/tree/main/bls12-381. Is there anything we can do to fix this dependency issue, even though it's from the outdated hacspec lib?

matthiasspielberg1 avatar May 12 '25 15:05 matthiasspielberg1

Interesting question, we'll look into it.

karthikbhargavan avatar May 13 '25 13:05 karthikbhargavan

It seems everything is translating fine, however, num-bigint does not fully translate to fstar. The required operations are only addition, multiplication and bit access, so writing the fstar lib for this by hand should not be too hard. Any ideas on how to progress? @karthikbhargavan @W95Psp

cmester0 avatar May 19 '25 10:05 cmester0

Related https://github.com/cryspen/hax/issues/1093

spitters avatar Jun 20 '25 11:06 spitters

This issue has been marked as stale due to a lack of activity for 60 days. If you believe this issue is still relevant, please provide an update or comment to keep it open. Otherwise, it will be closed in 7 days.

github-actions[bot] avatar Aug 21 '25 00:08 github-actions[bot]

Is it still needed @matthiasspielberg1 ? For now, we're closing it as unplanned, but feel free to reopen the issue.

clementblaudeau avatar Aug 21 '25 11:08 clementblaudeau

We don’t need it anymore

tors. 21. aug. 2025 kl. 13.54 skrev Clément Blaudeau < @.***>:

clementblaudeau left a comment (cryspen/hax#1452) https://github.com/cryspen/hax/issues/1452#issuecomment-3210282381

Is it still needed @matthiasspielberg1 https://github.com/matthiasspielberg1 ? For now, we're closing it as unplanned, but feel free to reopen the issue.

— Reply to this email directly, view it on GitHub https://github.com/cryspen/hax/issues/1452#issuecomment-3210282381, or unsubscribe https://github.com/notifications/unsubscribe-auth/BGQEJ4FUW4PICU2OHKG6SOD3OWXPRAVCNFSM6AAAAAB455YAR2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTEMJQGI4DEMZYGE . You are receiving this because you were mentioned.Message ID: @.***>

matthiasspielberg1 avatar Aug 21 '25 11:08 matthiasspielberg1

The general issue is to have a Hax compliant hacspec library again. I believe we have another issue for that. In any case, that would still be useful.

spitters avatar Aug 21 '25 12:08 spitters