pyecsca.ec.transformations module

Provides functions for transforming curves to different models.

M2SW(params)[source]

Convert a Montgomery curve to ShortWeierstrass.

Parameters:

params (DomainParameters) – The domain parameters to convert.

Return type:

DomainParameters

Returns:

The converted domain parameters.

M2TE(params)[source]

Convert a Montgomery curve to TwistedEdwards.

Parameters:

params (DomainParameters) – The domain parameters to convert.

Return type:

DomainParameters

Returns:

The converted domain parameters.

M2E(params)[source]

Convert a Montgomery curve to Edwards.

Parameters:

params (DomainParameters) – The domain parameters to convert.

Return type:

DomainParameters

Returns:

The converted domain parameters.

TE2M(params)[source]

Convert a TwistedEdwards curve to Montgomery.

Parameters:

params (DomainParameters) – The domain parameters to convert.

Return type:

DomainParameters

Returns:

The converted domain parameters.

TE2E(params)[source]

Convert a TwistedEdwards curve to Edwards.

Parameters:

params (DomainParameters) – The domain parameters to convert.

Return type:

DomainParameters

Returns:

The converted domain parameters.

TE2SW(params)[source]

Convert a TwistedEdwards curve to ShortWeierstrass.

Parameters:

params (DomainParameters) – The domain parameters to convert.

Return type:

DomainParameters

Returns:

The converted domain parameters.

SW2M(params)[source]

Convert a ShortWeierstrass curve to Montgomery.

Parameters:

params (DomainParameters) – The domain parameters to convert.

Return type:

DomainParameters

Returns:

The converted domain parameters.

SW2TE(params)[source]

Convert a ShortWeierstrass curve to TwistedEdwards.

Parameters:

params (DomainParameters) – The domain parameters to convert.

Return type:

DomainParameters

Returns:

The converted domain parameters.

SW2E(params)[source]

Convert a ShortWeierstrass curve to Edwards.

Parameters:

params (DomainParameters) – The domain parameters to convert.

Return type:

DomainParameters

Returns:

The converted domain parameters.