pyecsca.codegen.common module
Common codegen utilities.
-
class Platform(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases: EnumDefine
Platform to build for.
-
HOST = 'HOST'[source]
-
XMEGA = 'CW308_XMEGA'[source]
-
STM32F0 = 'CW308_STM32F0'[source]
-
STM32F3 = 'CW308_STM32F3'[source]
-
NANO = 'CWNANO'[source]
-
classmethod names()[source]
-
classmethod values()[source]
-
class DeviceConfiguration(model, coords, formulas, scalarmult, hash_type, mod_rand, mult, sqr, red, inv, platform, keygen, ecdh, ecdsa, defines=None)[source]
Bases: Configuration
A device configuration that includes the platform and choices
specific to the pyecsca-codegened implementations.
-
platform:
Platform
[source]
The platform to build for.
-
keygen:
bool
[source]
Whether the key-generation command is present.
-
ecdh:
bool
[source]
Whether the ECDH command is present.
-
ecdsa:
bool
[source]
Whether the ECDSA command is present.
-
defines:
Optional
[MutableMapping
[str
, Any
]] = None[source]
Optional defines passed to the compilation.
-
model: CurveModel[source]
-
coords: CoordinateModel[source]
-
formulas: FrozenSet[Formula][source]
-
scalarmult: ScalarMultiplier[source]
-
hash_type: HashType[source]
-
mod_rand: RandomMod[source]
-
mult: Multiplication[source]
-
sqr: Squaring[source]
-
red: Reduction[source]
-
inv: Inversion[source]