pyecsca.sca.attack.leakage_model module

Provides leakage models to simulate leakage.

class Noise[source]

Bases: object

class ZeroNoise[source]

Bases: Noise

class NormalNoice(mean, sdev)[source]

Bases: Noise

https://www.youtube.com/watch?v=SAfq55aiqPc

class LeakageModel[source]

Bases: ABC

An abstract leakage model.

num_args: ClassVar[int][source]
class Identity[source]

Bases: LeakageModel

Identity leakage model, leaks the thing itself.

num_args: ClassVar[int] = 1[source]
class Bit(which)[source]

Bases: LeakageModel

Bit leakage model, leaks a selected bit.

num_args: ClassVar[int] = 1[source]
class Slice(begin, end)[source]

Bases: LeakageModel

Slice leakage model, leaks a slice of bits.

num_args: ClassVar[int] = 1[source]
class HammingWeight[source]

Bases: LeakageModel

Hamming-weight leakage model, leaks the Hamming-weight of the thing.

num_args: ClassVar[int] = 1[source]
class HammingDistance[source]

Bases: LeakageModel

Hamming-distance leakage model, leaks the Hamming-distance between the two things.

num_args: ClassVar[int] = 2[source]
class BitLength[source]

Bases: LeakageModel

Bit-length leakage model, leaks the bit-length of the thing.

num_args: ClassVar[int] = 1[source]