Questions tagged [signature]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
8 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: const ethers = require('ethers'); const ...
0 votes
0 answers
5 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 }
0 votes
0 answers
8 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 ...
0 votes
0 answers
11 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 ...
1 vote
1 answer
1k views

Signature signed by go code but it can't verify on solidity

I used golang to generate a signature, but this signature failed to verify on smart contract. this is my golang code: func main() { pkStr := "...
2 votes
3 answers
719 views

Cross-posted from Stack-Overflow: Using Google Cloud Key Management Service to sign an Ethereum transaction

Cross-posted from question I've been working on writing a signer service for an Ethereum transaction manager and I need to sign Ethereum transactions using Google KMS Golang APIs. I'll try and ...
6 votes
1 answer
995 views

Signatures differ in web3js and web3j

I'm using web3J version 3.0.0-alpha4 and hit following problem. When I sign the same raw message (it's simply string like "TEST" for now) I get different signatures using web3js i web3j. The signature ...
0 votes
1 answer
1k views

How to extract or create a message with web3.js to sign with an external hardware device?

I'm using the Web3 library. I want to extract a signature hash from a Web3 transaction to send to an external hardware device, sign it there, then use the signature I get from there to broadcast my ...
12 votes
4 answers
6k views

Using AWS CloudHSM to sign transactions

Does somebody knows how to properly use AWS CloudHSM to sign ethereum transactions (Keccak256)?
2 votes
1 answer
114 views

How to derive ethereum address from Elliptic Curve secp256k1 - SHA256 Digest

I am using google cloud key management service to generate and manage keys. I have generated the HSM key for Asymmetric signing using Elliptic Curve secp256k1 - SHA256 Digest. The public key is ...
0 votes
2 answers
850 views

Best practice to store private key for containerized apps in the cloud

I am a crypto investor. I am staking a coin but the smart contract requires the user to claim and restake the rewards by transacting a smart contract function every 24 hours. Currently I am doing it ...
0 votes
1 answer
346 views

Problem with eth.sendRawTransaction in geth console

Im trying to use the following code with nodejs to create a raw transaction: const ethTx = require('ethereumjs-tx').Transaction; const txParams = { nonce: '0x0', gasPrice: '0x3B9ACA00', ...
0 votes
1 answer
86 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....
0 votes
2 answers
438 views

How can i add a delegate on gnosis safe?

The code on the website here is not working for me: https://safe-docs.dev.gnosisdev.com/safe/docs/tutorial_tx_service_set_delegate/ I'm trying like this: import requests import time import sha3 ...
2 votes
1 answer
93 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 ...
1 vote
1 answer
45 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 ...
0 votes
1 answer
434 views

How can i verify more params with _hashTypedDataV4 from openzeppelin?

i'm trying to implement a 712 typed signature with openzeppelin: The contract has two functions: struct ProofData { address user; } bytes32 constant TYPE_HASH_EASY = keccak256("ProofData(...
1 vote
1 answer
257 views

Odd length hex issue when trying to RLP encode transaction

I'm trying to RLP encode a transaction I get from the mempool to get the signed transaction hex using ethersjs. Here's how the tx looks like initially: { "blockHash": null, "...
0 votes
1 answer
925 views

Calling signature functions in web3.js 1.0 reports invalid address and cannot read address property

I am doing a project with inserted Metamask to achieve on-click blockchain account login. When I am calling the signature function web3.eth.sign("Hello world", "...
3 votes
1 answer
54 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 ...
0 votes
1 answer
30 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 ...
0 votes
0 answers
27 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 ...
2 votes
1 answer
442 views

Decoding signature for verification not working

I'm trying to verify a signature, but when I decode it, the function reverts. This is the function I'm using function source(bytes memory signature) public returns (bytes32 r, bytes32 s, uint8 v) { ...
1 vote
2 answers
128 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-...
2 votes
1 answer
142 views

Can I use a BLS12-381 private key to sign Ethereum transactions?

I'm new to cryptography and I've recently been studying BLS signatures. Please forgive me if I make any mistakes while writing. I've tried generating a BLS key pair and using the private key to derive ...
0 votes
2 answers
1k views

eth.sign() method giving error

I am using eth.sign from Ethereum wallet developer terminal and getting following error rejection Error: Returned Error: The method eth_sign does not exist/is not available Please advise whats the ...
2 votes
1 answer
461 views

How to retrieve transaction hash value from the Promise object using web3js?

I'm trying to retrieve the transaction hash value after I call my smart contract method. My Promise object looks like below. returnPromise: Promise { "pending" } ​ <state>: "...
5 votes
1 answer
275 views

Is it possible to use non-deterministic ECDSA signatures schemes for signing Ethereum transactions/messages?

Is it possible to use a non-deterministic/probabilistic (choosing k randomly and not HMAC-derived from msgHash + privKey like RFC 6979 states) ECDSA signature scheme for Ethereum Signatures? If yes, ...
1 vote
1 answer
52 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. ...
0 votes
1 answer
1k views

Keccak256 hash different in solidity and web3js

I am trying to sign a message in NodeJS and verify the signature with smart contract. Here is my code: async function prepareAndSignMessage(to, amount, referenceTransaction){ let contractInstance =...
1 vote
1 answer
1k views

How does a message signed in Remix IDE?

What is signing method that is used in remix IDE and how is the hash value calculated from the message that is being signed?
0 votes
1 answer
701 views

Solidity: recover address from hashed message

I recently was going through some sol contracts, because I am planning to create my own one. So I stumbled upon this function call: function tryRecover(bytes32 hash, bytes memory signature) internal ...
1 vote
2 answers
1k views

How to extract signature from web3.eth.sign or web3.personal.sign

In React Typescript (.tsx file), I'm trying to use web3.eth.sign to validate an account. The signature is being generated properly, but I can't seem to get the signature out of the callback function. ...
0 votes
1 answer
330 views

How to generate the correct hash for signatures?

I want to create a hash in JavaScript for a signature. The hash needs to have the same output as this in solidity: keccak256(abi.encodePacked(address, bytes32)) My solution in JavaScript so far ...
0 votes
1 answer
65 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 ...
0 votes
1 answer
389 views

Retrieving the original message from an ETH transaction

When someone is simply sending ETH from one address to another, and assuming that person does not include a custom message in the transaction, then what exactly is the message that is sent on the ...
2 votes
1 answer
999 views

How to sign a message with Gnosis safe?

I need to sign the message to claim tokens in claim.hydradx.io and I am trying to have a text of my message following the intruction below: If you have entered your ETH address manually, you will ...
0 votes
1 answer
492 views

How does Opensea mobile app manage "Log in with metamask / trust / rainbow"?

So I was playing around with opensea today and noticed a login feature that uses crypto wallets. I am curious to understand how they achieved it in a native app. The flow is something like this User ...
1 vote
1 answer
77 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 ...
1 vote
1 answer
400 views

signTransaction produces huge signature, which fails with 'ECDSA: invalid signature length'

I'm trying to create a transaction (created with populateTransaction), and sign it offchain (the above result, passed as a parameter to signTransaction), but it seems it produces an invalid signature (...
2 votes
2 answers
1k views

How to decode a transaction to verify its signature in Javascript?

I noticed that it's possible to sign a transaction with a wrong private key. I took the following example found at https://github.com/ethereumjs/ethereumjs-tx const EthereumTx = require('ethereumjs-...
0 votes
1 answer
34 views

recoverPublicKey() returns undefined

function hashData(){ const data = { sendAmount: sendAmount, recipient: recipient, sender: address } return keccak256(utf8ToBytes(JSON.stringify(data))); } function ...
2 votes
3 answers
1k views

I want to get Public key from transaction

I want to get public key from transaction. For example, TXID : 0x191095343fd26cbb4c58996aa6512d5cdf43281d565072bab8d0d5ea9e3d644e I have tried "Get Raw Transaction Hex" in etherscan and use ...
0 votes
1 answer
625 views

How can I manually calculate a transaction hash of a transaction JSON object

So I have a transaction. I have a transaction that I would like to manually calculate the hash: { "hash": "0xf4584008cc70f2f532765a2f035a2525992a258b2d2afd6b49ad5b2857a6197d", &...
2 votes
1 answer
140 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) = ...
3 votes
0 answers
59 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 ...
0 votes
1 answer
1k views

Power of signing transactions and what you can do with that

I have been playing around with state channels and am starting to see the power of signing information/transactions, but haven't got a completely clear idea of what I can do with them. I think I can ...
1 vote
1 answer
88 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: ...
1 vote
1 answer
169 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 = ...
1 vote
2 answers
562 views

ECRecover not recovering correct address, but works with ethers.js library

Im trying to test some signature verification in Solidity. I have generated the signature with nodejs using the ethers.js library. The signature successfully verifies in nodejs. I have tried to verify ...

1
2 3 4 5
11