{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Configuration space\n", "This notebook explores the configuration space of Elliptic Curve crypto\n", "implementations.\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "An ECC implementation configuration in **pyecsca** has the following attributes: " ] }, { "cell_type": "code", "metadata": {}, "source": [ "from typing import get_args\n", "from pyecsca.ec.configuration import Configuration\n", "from dataclasses import fields\n", "\n", "for field in fields(Configuration):\n", "\tname = field.name\n", "\ttp = field.type\n", "\tdoc = tp.__doc__\n", "\tif get_args(field.type):\n", "\t\tdoc = get_args(field.type)[0].__doc__\n", "\tprint(name, tp)\n", "\tprint(\" \", doc.strip().split(\"\\n\")[0])\n", "\tif hasattr(tp, \"names\"):\n", "\t\tfor enum_name in tp.names():\n", "\t\t\tprint(\" \", enum_name)\n", "\tprint()" ], "outputs": [], "execution_count": null }, { "cell_type": "markdown", "metadata": {}, "source": "It is represented by the [Configuration](../api/pyecsca.ec.configuration.rst#pyecsca.ec.configuration.Configuration) class." }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Enumerating configurations\n", "\n", "The possible configurations can be generated using the [all_configurations()](../api/pyecsca.ec.configuration.rst#pyecsca.ec.configuration.all_configurations) function.\n", "The whole space of configurations is quite huge.\n", "\n", "