Skip to content
This repository has been archived by the owner on Oct 4, 2019. It is now read-only.

ECIP-1026: Modexp Precompiled Contract #67

Closed
wants to merge 1 commit into from
Closed

Conversation

sorpaas
Copy link
Contributor

@sorpaas sorpaas commented Jun 29, 2017

(Rendered)

Rationale

This allows for efficient RSA verification inside of the EVM, as well as other forms of number theory-based cryptography. Note that adding precompiles for addition and subtraction is not required, as the in-EVM algorithm is efficient enough, and multiplication can be done through this precompile via a * b = ((a + b)**2 - (a - b)**2) / 4.

The bit-based exponent calculation is done specifically to fairly charge for the often-used exponents of 2 (for multiplication) and 3 and 65537 (for RSA verification).

This is derived from EIP-198.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant