Skip to main content

Questions tagged [signature]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
11 views

How to use Uniswap's Universal Router without Permit2?

I need to use a geth node hosted account (no local access to the private key) to do some swaps with web3.py, but it seems like it's not possible to generate the Permit2 required signature with ...
aw3322's user avatar
  • 1
2 votes
1 answer
27 views

Is it possible to predict the signature(r,s) that will be generated?

look up the transaction (0xfefb2da535e927b85fe68eb81cb2e4a5827c905f78381a01ef2322aa9b0aee8e) where the ERC1820 contract was deployed on Ethereum, you will see the following. eth.getTransaction("...
imelon2's user avatar
  • 568
0 votes
0 answers
12 views

Validate the time a message was signed

How can I validate the block an off-chain signature was signed? Including the block hash in the signed data is not an option as it could be faked by a signature that was created at a later time. ...
wolf dun's user avatar
1 vote
1 answer
32 views

How to parse SIWE on chain?

I have a complex nested struct which contains a field capabilites: capabilities: [{ "sig": "...
NewToCode's user avatar
  • 121
1 vote
1 answer
32 views

Seeking DApps that use personal_sign, eth_signTypedData, and eth_signTypedData_v3 with ERC-1271 signature validation

I am currently working on a wallet and encountering challenges with testing signature verification locally. When using viem's verifyTypedData/verifyMessage methods in a local environment, I'm only ...
cmptrwizard's user avatar
0 votes
2 answers
27 views

Is it possible to validate the Metamask personal_sign in the back end?

I am trying to understand the point of signing a personal message in the client. I guess this is usefull to confirm that the user is the owner of the address. But since this sign is done in the client ...
Enzo's user avatar
  • 177
2 votes
1 answer
65 views

C code to sign a message compatible (such that can be verified) with Metamask, mycrypto, etc

I am on macOS and trying to put together the code to sign (and once I succeed to verify) a message with an Ethereum private key. So, the private key (just used to test, no funds there lol) is: ...
capodieci's user avatar
0 votes
1 answer
38 views

Is it possible to create a transaction as an admin and send it but with someone else paying for the gas fees?

I have a mintToken method in my smart contract that is onlyAdmin. The problem I have is that I don't want to pay for the transactions for my users every time I execute this function (and it also can't ...
Falcon Stakepool's user avatar
0 votes
0 answers
19 views

How to sign meta transactions using ethers and OpenZeppelin

I'm currently following this guide https://docs.openzeppelin.com/defender/v2/guide/meta-tx but have realised too late that there are a lot of errors assigned to it. I am wondering if anyone has a ...
Zhi's user avatar
  • 11
1 vote
0 answers
20 views

How to create types for structs that have contract types instead of address?

The struct I want to sign using ether's v5.7 (or 6) is as following, struct Order { ... IERC20 token, uint256 tokenAmount, ... } Now if I change IERC20 to address in the struct and the ...
Ren's user avatar
  • 37
1 vote
1 answer
106 views

signTypedData_v4

I'm using web3j library i want to sign a structured message butmy code return wrong signature (my code work for signTypedData_v3 and return currect signature) but how can i modify my code to can sign ...
luntik's user avatar
  • 23
2 votes
1 answer
42 views

Public key encryption using metamask on solidity smart contract

Questions: In Solidity, how can we fetch the encrypted public key for the wallet directly from the smart contract using solidity? I have managed to retrieve it using JavaScript, but I need to know ...
No One's user avatar
  • 21
0 votes
0 answers
57 views

EIP-712: practical usage of the verifyingContract in the eip712Domain structure

Is the verifyingContract field in the eip712Domain used anywhere practically, e.g. calling to verify the signature, etc. etc.? Or is it just another protection trick for signature replay attacks? ...
Mila A's user avatar
  • 1,254
0 votes
0 answers
86 views

EIP-2612 Permit Signature Phishing Scam

I have fallen for a phishing scam which resulted in drainage of a single asset from my wallet after signing a permit signature request via browser wallet. Going back to the phishing site I can see ...
Tom Heaps's user avatar
1 vote
1 answer
168 views

Getting incorrect signer address on verifying the signature with the generated hash of the signed message in solidity

Basically on verifying the signature with the generated hash of the signed message, I'm getting the correct signer on JS, but not on Solidity. JS Code (According to Keir Finlow-Bates' suggestion): ...
SYED ASAD KAZMI's user avatar
1 vote
1 answer
21 views

how can I sign a typedData with @safe-global/protocol-kit?

how can I sign a typedData with @safe-global/protocol-kit api? I have objects like this const data = { domain, types, message }
coco irons's user avatar
0 votes
0 answers
19 views

Eth_sign, blind singing and MM signing

Having some confusion on what is what here. Is there difference in enabling eth_sign in metamask with blind signing on ledger? Many web3 sites today require user to sign message as log in method. I ...
Blissful's user avatar
  • 382
0 votes
0 answers
15 views

Understanding the number of aggregations of BLS signatures

I know there are about 1 million validators in the consensus layer. As far as I understand, BLS signatures from some of these are aggregated in each block. But how does this happen in practice? In the ...
user's user avatar
  • 1
2 votes
1 answer
125 views

Why does a wallet user need to sign a message to login?

We all know how Ethereum signing works for user authentication. MetaMask asks you to sign, you sign it and application's server validates it and, if true, allows you to use services. Assume that in my ...
Neo's user avatar
  • 103
1 vote
1 answer
53 views

Can a validator include transactions with invalid signatures?

On Ethereum and ʙꜱᴄ an invalid signature (for exampler s v==0) has a 0x0 address. It’s only the signature that determine who is the ᴇᴏᴀ being used. Now, the yellow paper tell in which case a ...
user2284570's user avatar
  • 1,018
3 votes
1 answer
125 views

Phishing scam - fake website - Metamask signature - where to see the list of signatures?

I admit my defences were down due to gold checkmark on Twitter. See my video and report to @support: https://twitter.com/marsXRobertson/status/1752663546335224083 I didn't observe any tokens moving ...
Mars Robertson's user avatar
0 votes
0 answers
53 views

How to sign a UserOperation using Java and Web3j in alchemy API

I am using Java and Web3j to create code to execute a UserOperation using Alchemy's API. In order to sign the UserOperation, the following code was created and signed, resulting in the following ...
Ken Yurino's user avatar
0 votes
1 answer
36 views

Cannot verify signature

I have been trying to do it but it always return me false, tried a lot of ways but I don't know. Here is the smart contract function _verify( bytes32 hashedMessage, bytes memory ...
AndRockSYS's user avatar
2 votes
1 answer
206 views

Why the signature is different when using ethers v6 and foundry?

I'm using ethers v6 and foundry to test message signing. Though having the same hashed message and the signer private key, I can't find out why the signature is different. The following is my script. ...
Johnson's user avatar
  • 73
0 votes
1 answer
94 views

How is signing a hash different from signing a message?

I've got an Arduino microcontroller (ATmega328P) where I can use the following code (borrowed from here) snippet to sign an arbitrary message . First, I take the keccak256 hash of the message, and ...
Ryan's user avatar
  • 92
1 vote
1 answer
346 views

backend based signature verification

I'm new in web3 and I'm trying to develop a way to authenticate users in my dapp. I'm used to using the old and safe method with email + password to do that, but recently I realised that I could use ...
whoami's user avatar
  • 13
0 votes
1 answer
62 views

recoverPublicKey() returns undefined

function hashData(){ const data = { sendAmount: sendAmount, recipient: recipient, sender: address } return keccak256(utf8ToBytes(JSON.stringify(data))); } function ...
derkangkino's user avatar
4 votes
0 answers
100 views

BLS signatures and the Splitting Zero attack

In 2021 security researcher Quan Thoi Minh Nguyen published two papers ("0" and "Attacks and weaknesses of BLS aggregate signatures") where he highlighted some security weaknesses ...
BrainGrind's user avatar
1 vote
1 answer
347 views

How to generate a signature in foundry if Private key is a string?

I have been testing some contract that includes EIP712 signatures, with foundry. As per this doc we need to pass the private key which is being accepted as a uint256. (uint8 v, bytes32 r, bytes32 s) = ...
Zartaj Afser's user avatar
  • 4,414
1 vote
1 answer
118 views

Why does Metamsk display the sign data as unicode question marks and other various characters when signing a message with Viem?

I'm trying to sign a message in Viem and recover the signer in Solidity, it works as expected, however, the Metamask pop-up window displays the data to be signed incorrectly. Here is my Viem ts code: ...
Rohan Nero's user avatar
  • 1,607
1 vote
1 answer
316 views

How can I create a message hash in Solidity that matches Viem?

I'm creating a message hash with Viem in typescript and in Solidity, however, I can't seem to get the hash in Solidity to match the one created with Viem. My viem code: const hashedMessage = ...
Rohan Nero's user avatar
  • 1,607
1 vote
1 answer
83 views

Cannot create the same ECDSA signature with Web3.py and ethers.js

I have the following (simplified) contract that uses ECDSA to validate message authenticity: pragma solidity ^0.8.18; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; ...
Sebastian Dine's user avatar
0 votes
1 answer
250 views

How to import an existing private key into AWS KMS?

Is there a way to import into AWS Key Management Service an already existing private key so I can sign transactions with that wallet? I have found some tutorials online (like this one: https://www....
Falcon Stakepool's user avatar
0 votes
1 answer
161 views

How to sign the hash of a message using EIP712?

There are many guides and online services on how to sign a message using eip712. But they all apply to messages. Now, if I already have the hash of my message, how to use MetaMask without other third ...
user2284570's user avatar
  • 1,018
1 vote
0 answers
40 views

Make AA wallet signature permanent

I have a 0xsequence wallet which implements AA, I am signing a EIP712 message using signTypedData and verifying with the SignatureChecker.sol using the function isValidSignatureNow. Everything seems ...
Biel43's user avatar
  • 11
0 votes
1 answer
90 views

Send transaction only with signature

As far as I know, Metamask does not allow to sign transaction without broadcasting it to the network. So I can not generate a transaction on my server and pass it to the frontend that will sign me the ...
airled's user avatar
  • 101
0 votes
0 answers
150 views

Signature verification using ecsign and ecrecover

I am using web3.js library to sign a transaction and then verify it from the smart contract. The Signature generated on FrontEnd and as well as from the smart contract are not same.. This is the ...
hammad ali's user avatar
0 votes
1 answer
87 views

Is nonce necessary to prevent signature replay on smart contracts if the method is idempotent?

I have a smart contract in which only I can submit transactions through onlyOwner modifier. If users want to interact with the contract, I make the users sign the parameters of the method and verify ...
Ahmet Yazıcı's user avatar
0 votes
2 answers
149 views

ECDSA.recover versus ECDSA.tryRecover

Is one of these better than the other? How do you decide which one to use? I see that they take different forms of the signature and hashed message but I'm wondering more about whether one is better ...
user127148's user avatar
0 votes
1 answer
71 views

Signature verification using web3js

I am using web3 library to sign a transaction and then verify it from the smart contract. The signature is not verifying. This is the frontend code const DomainSeparator = ethers.keccak256( ...
Abdul Samad's user avatar
0 votes
1 answer
33 views

How signature verification works?

I have read that to sign a message we need the private key but in the below code snippet hasing is done in the 'getMessageHash' function and 'signing' is done in the 'getEthSignedMessageHash' function....
kumar's user avatar
  • 61
2 votes
0 answers
43 views

Why are my EIP-712 signatures different in Ruby and JavaScript?

I'm trying to sign data using EIP-712 standard and my signatures from Ruby and JavaScript don't match when the data is in bytes. They work fine when the data is a string. I'm using eth.rb in Ruby and ...
Bolo's user avatar
  • 121
0 votes
1 answer
90 views

A special private key that can be used to make a TX to a certain wallet ONLY

I want to be able to archive this: a private key or its substitute (P) of a user wallet is stored on a server there're 100s of user wallets there, hence 100s of (P) too server isn't a safe ...
nicholas.fowler's user avatar
0 votes
1 answer
24 views

what to do with a negative or r>curve.n/2 "r" in ecdsa signature

Hey guys it's your fellow beginner developer here again. Enough with chit chat! Last time I asked you guys about signature and how to generate recoveryID for v of the signature and learnt new stuff. ...
NIMA Shahahmadian's user avatar
2 votes
1 answer
50 views

Why are the params from the request object in reverse order between personal_sign and eth_sign?

Why are the params from the request object in reverse order between personal_sign and eth_sign? For example, the personal_sign request object has the hex message in params[0]: // Request { "id&...
jiamijiang's user avatar
1 vote
3 answers
273 views

ethereum-cryptography.js Problem recovering public-key from signature

Based on the following from ethereum-cryptography documentation: Upgrading from 1.0 to 2.0: secp256k1 module was changed massively: before, it was using noble-secp256k1 1.7; now it uses safer noble-...
Pedram Paravarpishe's user avatar
1 vote
2 answers
1k views

Can your Metamask get hacked by signing a message, no gas?

If I log into a new project with Metamask, and the operation costs no gas, can I get hacked? Does no gas mean you are safe when signing with Metamask?
kintsukuroi's user avatar
0 votes
2 answers
68 views

provide steps to deploy this contract from solidity by example

When i tried deploying this contract using 10 ethers, and then providing : claimPayment() -> amount - 9000000000000000000 i.e 9 ethers -> nonce - 123 -> signature - ...
ImBatman's user avatar
0 votes
1 answer
102 views

Ethers.js recovers wrong address when signing its transactions with elliptic.js

Can someone show me how to correctly sign an ether's unsigned transaction hash using elliptic npm package. Below is my attempt (with some random private key) and transaction should ideally fail with &...
kuco 23's user avatar
  • 278
1 vote
0 answers
15 views

Given a public key, is it possible to create a challenge that would produce a known signature, if signed by the corresponding private key?

Noob alert! Since hardware wallets don't support decryptWithPrivateKey function, I would like to make a workaround using signatures If it's possible to create the challenge, that would produce a pre-...
Anton Makiievskyi's user avatar

1
2 3 4 5
11