pyecsca.ec.key_generation module

Provides a key generator for elliptic curve keypairs.

class KeygenAction(params)[source]

Bases: ResultAction

A key generation.

params: DomainParameters[source]
exit(result)[source]
property result: Any[source]

The result of the action.

inside: bool[source]
class KeyGeneration(mult, params, affine=False)[source]

Bases: object

Key generator.

Parameters:
  • mult (ScalarMultiplier) – The scalar multiplier to use during key generation.

  • params (DomainParameters) – The domain parameters over which to generate the keypair.

  • affine (bool) – Whether to transform the public key point to the affine form during key generation.

mult: ScalarMultiplier[source]
params: DomainParameters[source]
affine: bool[source]
generate()[source]

Generate a keypair.

Return type:

Tuple[Mod, Point]

Returns:

The generated keypair, a tuple of the private key (scalar) and the public key (point).