mte/unikernel/duniverse/mirage-crypto/ec/native/README.md
2025-11-11 02:07:51 +01:00

1,018 B

Generated code from fiat

This directory includes several files ("p*.h") that are generated by fiat. The GNUmakefile provides targets to generate these files.

The file "inversion_template.h" is copied from the fiat-crypto repository at e31a36d5f1b20134e67ccc5339d88f0ff3cb0f86 (inversion-c/inversion_template.c), and has some modifications: the "inversion" function is declared "static", and the convenience function "inversion" is provided.

The "*_stubs.c" files are handcrafted.

The "p*_tables_32/64.c" are generated from ../gen_tables (see each file's header) and contain pre-computed data to speed up scalar multiplication for ECDSA. The 64- and 32-bit tables must be respectively generated from a 64-bit or 32-bit build of gen_tables.

Code from BoringSSL

The code in "curve25519_tables.h", and large parts of "curve25519_stubs.c" and "point_operations.h" (excluding scalar multiplication) originate from BoringSSL. Minor adjustments have been done manually.