formosa-crypto / formosa-mlkem

Other
11 stars 7 forks source link

Make the `ref` implementation accepted by the safety checker #4

Open vbgl opened 1 year ago

vbgl commented 1 year ago

The changes in this PR and the changes to the safety checker enabling annotations (https://github.com/jasmin-lang/jasmin/pull/362) make the safety analysis of the keypair function go through.

Quick measurements show that these changes have no impact on the run-time performance (this REF version is already quite slow).

I’ve no clue about what impact they may have about the correctness proofs.

vbgl commented 1 year ago

I may have a different workaround for NTT: tweak the safety checker (https://github.com/jasmin-lang/jasmin/pull/384) rather than changing the analyzed program.

vbgl commented 1 year ago

With small fixes & improvements to the safety checker (https://github.com/jasmin-lang/jasmin/pull/384, https://github.com/jasmin-lang/jasmin/pull/387), the three main entrypoints of the ref implementations can be verified for safety with the changes made in this PR:

Beware that safety analysis is costly. Witnesses report about 6h of computation for keypair and nearly 16h for decaps, encaps being somewhere in between.