pyecsca.codegen.builder module

Builder script.

Use it to render and build ECC implementations.

Examples

To list available implementation choices use the list subcommand.

builder list

To go deeper and examine the coordinates for a given curve model, e.g. the Short-Weierstrass one, use:

builder list shortw

To list formulas for a given coordinate system and curve model, e.g. projective on Short-Weierstrass curves, use:

builder list shortw projective

The following example builds an implementation for the HOST architecture, using the short-Weierstrass curve model, projective coordinates, add-2007-bl and dbl-2007-bl formulas with the left-to-right double-and-add scalar multiplier. Furthermore, it uses Barrett modular reduction.

builder build --platform HOST --red BARRETT -v shortw projective add-2007-bl dbl-2007-bl "ltr()" .

The following uses different formulas with the comb multiplier and specifies its width.

builder build --platform HOST --red BARRETT -v shortw projective add-1998-cmo dbl-1998-cmo "comb(width=5)" .