0

I am trying to verify an RSA signature using Ethereum smart contract. I have some doubts regarding my design.

I am using the precompile at address 0X05 to generate s^e mod n, where s is the signature to be verified, e is the exponent used during key generation. n is from the public Key. I understand that I have to provide s, e and n as uint256.

Reference.

I will compare the value obtained as output from precompile to compare with the original message's hex. Is this the right way?

I am able to get e as a number in JavaScript but s and n I have are buffers. how do I convert them to integer to use in the smart contract invocation?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.