Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Support RSA signature verification #74
I propose to support RSA signature verification through a precompiled contract with appropriate fees.
With the current EVM, verification for very low key lengths is trivially implemented using the native 256 bit arithmetic, although it is useless due to inadequate security. Supporting bigger key lengths is prohibitive cost wise. (Requires implementing a bignum library for
Motivation: many PKI schemes, including those employed by government ID cards, rely on RSA. Supporting an easy way to verify a signature would mean to support authentication/authorization using those schemes in a smart contract.
High level method:
Returns a boolean.
Regarding padding schemes I would definitely include an option
Challenges: Where this gets complex is defining which key lengths and padding schemes to support and how to define the API. Size of
I add my vote to this proposal. The support of RSA signature verification will be a bridge to all applications build on electronic Identity Cards. Estonia, Germany and Belgium already use electronic ID card.
+1. Had a cool idea for a microtipping service for developers using ssh keys.
I would love to do
+1 for generic bigint capability! This would allow the implementation of just about any crypto on the Ethereum network.
The particular use-case I'm looking at is where an Ethereum contract is an "oblivious witness" to a particular type of transaction - it can verify the authenticity/integrity of the transaction, but doesn't know the contents of the transaction. Without bigint support, I can't cryptographically verify the transactions within the contract, which means I can't guarantee the state of the contract, which means the state becomes "optimistic" - ALL transactions are accepted and it's up to the client connecting to the contract to figure out which ones are actually valid. Nightmare.
Absolutely critical bigint methods:
And the following, if you're supporting decimals:
The above primitives can be used to trivally construct all of the following algorithms supporting numerous cryptographic applications:
referenced this issue
Nov 18, 2016
A small implementation of RSA signatures with Pkcs1.5 padding and SHA256 digest in https://github.com/adriamb/SolRsaVerify/blob/master/SolRsaVerify.sol