Questions tagged [cryptography]

Discipline or techniques employed in protecting integrity or secrecy of electronic messages by converting them into unreadable (cipher text) form.

Filter by
Sorted by
Tagged with
3
votes
1answer
644 views

Does Ethereum support pairing operations?

I need to build an application that uses bilinear pairing operations for generating signatures. If I send a message with its signature to Ethereum, can Ethereum verify this message? Does the EVM ...
1
vote
0answers
17 views

Does the term “Ethereum ECDSA signature” have a consistent meaning?

If you were writing some instructions and one of them was: Provide the Ethereum ECDSA signature of the file using the person's Ethereum address. Would the above instruction have a consistent meaning ...
1
vote
1answer
111 views

Verify multiple state channel signatures in one transaction

What are some ways to verify multiple state channel signatures (using ECverify) in a single transaction?
0
votes
1answer
43 views

Sharing an verifiable secret message in a contract

I would like to hear your opinion on my idea to share a proof of a secret message in a contract, that users can verify later in a second phase when the message will be revealed. If the message is a ...
41
votes
4answers
19k views

Get public key of any ethereum account

Can I somehow get the public key of an ethereum account knowing just the corresponding ethereum address (e.g. 0x54dbb737eac5007103e729e9ab7ce64a6850a310)?
2
votes
0answers
14 views

What is the v part of transaction signature?

If I understand correctly when we send a transaction, we send an unsigned part m and a signature consisting of v, r, s. Each node verifies the signature by checking: hash(m,r) * publicKey + r = s * ...
0
votes
1answer
261 views

Correct way to easily call function with web3j from deployed contract

I am trying to call a function from a modified ERC20 contract and I can't manage to make it work. I am doing this with web3j from Android. I can connect to Infura. The contract is already deployed on ...
1
vote
0answers
31 views

How to compute pairing in a smart contract

I am working on the elliptic curve and pairing stuff in Ethereum smart contract. How can I compute pairing such e(p1,p2)? I know that we have a pre-compile pairing check in Ethereum client which is ...
116
votes
5answers
81k views

How are ethereum addresses generated?

What criteria does a valid Ethereum address need to fulfill? Is it just a random number in hexadecimal? Or does it need to be derived in a specific way, according to some cryptographic algorithms? ...
2
votes
2answers
135 views

Why does ecrecover() take signature parameters (v,r,s) instead of the full signature?

Is there any reason ecrecover() takes the (v, r, s) signature parameters instead of the full signature, given that these can be easily computed inside the function itself? I am asking because ...
2
votes
0answers
20 views

How to get ethereumjs-abi's soliditySHA3 and web3 sign equivalents in ethersjs?

Hello I'd like to create a hash using ethersjs that encodes a number of arguments. I previously used ethereumjs-abi's soliditySHA3 function but not sure which of ethersjs crypto utilities is the ...
0
votes
1answer
17 views

Is there any other signature mechanism like ECDSA to verify the signed message if its tampered or not?

I would like to know if there are other signature verification methods other than ECDSA, to verify the message (eg., string, number) signed by a signer. Actually if there are alternative algorithms ...
0
votes
0answers
34 views

Verification of ECDSA signature is not valid while testing HashDice.sol

While practising on the ethereum contract HashDice.sol using truffle, the verification of the ECDSA signature is getting invalid after running the test script. describe('verify()', () => { it('...
0
votes
1answer
65 views

ECC scalar multiplication

I'm now trying to use scalar multiplication to recover v, but I have questions with ECC scalar multiplication. I'm wondering if the following equations are correct. If scalar * P = Q, then scalar * (...
0
votes
1answer
447 views

Mist Wallet Stuck on “Connected to Node”

It got about 80% of the way through the blockchain download, then it just stopped and went to "finding peers" So I closed the wallet, restarted the PC, and now it just gets stuck on "connected to node"...
1
vote
1answer
463 views

ecrecover on bytes32 array elements

I am creating a contract which will allow an atomic transfer of a token with only the buyer needing to pay gas (instead of both parties). I am doing this by creating an agreement with price, quantity ...
2
votes
1answer
112 views

Algorand: What is the purpose of VRF

In the paper describing Algorand,two reasons are given to use verifiable random functions/cryptographic Sortion: Sortition provides two important properties: First, given a random seed, the VRF ...
2
votes
0answers
29 views

Azure Blockchain Service node properties [closed]

What exactly are Access key 1, Access key 2, Member account, Web socket, DNS, creater account, etc. of a node in Azure Blockchain Service? I am getting confused as to what are these. Also what are the ...
1
vote
1answer
31 views

Using `recoverPersonalSignature` from `eth-sig-util` to verify message signed with go-ethereum's `crypto` package

I am using https://godoc.org/github.com/ethereum/go-ethereum/crypto#Sign to sign an arbitrary message and trying to recover the signer address using sigUtil.recoverPersonalSignature(https://www.npmjs....
5
votes
2answers
8k views

How can I get a mnemonic phrase from a private key?

I have a private key for my wallet and also a keystore for it. I want to use it in MEWConnect. Is there a way to get a mnemonic phrase from a private key?
1
vote
1answer
34 views

Why is privateKey padded before secp256k1 signing?

I am checking how the Ethereum handles signing but I can't figure out why the math.PaddedBigBytes is necessary: func Sign(digestHash []byte, prv *ecdsa.PrivateKey) (sig []byte, err error) { if ...
0
votes
1answer
25 views

MITM attack in hosted wallets

i have a question: in the web wallets(hosted wallets)when user want to make a transaction and send the information to the wallet server , can a one change the information(man in the middle attack)?
0
votes
1answer
63 views

Generate Public Key

I use the command: > eth.getTransaction("0xac844bd1107761fec3abe2f55bf739f0e7cc6dd1cd169a60176bfb22 9826b5a8") Where the brackets contain the hash of the successful transaction. This is what I ...
2
votes
2answers
1k views

How to calculate an Ethereum Contract's address during its creation using the Solidity language?

Now I know and have read the other thread saying that a contract's address is created deterministically via RLP encoding the creator's address and his nonce and then hashed with Keccak-256 but the ...
1
vote
1answer
92 views

How is multiparty computation (MPC) possible using Ethereum?

MPC involves running calculations on numbers, perhaps from different parties, and sharing the result without anyone seeing the underlying data. Even the person operating the computer cannot access the ...
1
vote
1answer
53 views

Is it possible to have multiple private keys for a single public address? [duplicate]

Since the ratio of all possible digits (please correct my math if I am wrong) of a public key versus private is: 1/79228162514264337593543950336 for public (40^16): 1 461 501 637 330 902 918 203 684 ...
1
vote
1answer
130 views

Validating RSA, Ed25519 and ECDSA signatures in solidity

I am writing a contract in solidity for verifying multiple signature schemes.I found that solidity supports ECDSA, but how do I add check for RSA and Ed25519. is there any existing method/library ...
14
votes
8answers
1k views

Would it be profitable enough to do a Master's degree in blockchain technologies (focused on ethereum above all)?

The end of my university studies is getting closer and closer. I'm sure I want to do a Masters degree, but I have some doubts. About a month ago my university released a Masters degree completely on ...
0
votes
0answers
30 views

Does the use of Non-interactive zero-knowledge proof (zk-snark) will eliminate the use of (consensus algorithm e.g. work proof)?

The privacy of the blockchain transaction is a high-demand topic these days due to some application use case requiring strict privacy protection. Some of the techniques applied to blockchain ...
4
votes
2answers
224 views

How to guarantee IPFS file access based on Non Fungible Token ownership (or security)?

The file is too big to be stored on the blockchain, so it is stored on IPFS. Only the person who owns a unique Non Fungible Token (or a Security Token) can access it. Of course I can encrypt the file ...
3
votes
0answers
54 views

Cheap EC Operations on Unsupported Curves

I want to be able to verify signatures created by smart meters. Unfortunately, their signature algorithm doesn't use curve ALT_BN_128 but BrainpoolP256r1. I wrote this verification algorithm that ...
32
votes
6answers
18k views

ecrecover from Geth and web3.eth.sign

I have tried to use ecrecover() to verify the signature of a message. I have looked at lots of references here and elsewhere, like: https://lab-blog.ey.com/2016/12/19/ecrecover/ How does one ...
94
votes
2answers
55k views

Which cryptographic hash function does Ethereum use?

Many sources refer to the use of the "SHA3" cryptographic hash function within Ethereum, but the Ethereum project began before the SHA3 standard was finalised, and there was some confusion/controversy ...
0
votes
1answer
29 views

How did cryotokitties create the image of the cats?

For cryptoKitties, the images of the cats are based on gene, for example, color, curve type etc. and the image of the cat will be created, how does the image created, it is by programming running ...
3
votes
2answers
217 views

Confidential value transfers

Is there currently any way to do confidential transactions with Ethereum for a custom token? If not, is there any work/research being done on how this might be possible?
18
votes
2answers
5k views

Is it safe to reuse Ether addresses?

I believe it's viewed as unsafe in Bitcoin because of the way transactions are signed. Is this also true for Ether addresses?
4
votes
1answer
391 views

How to use Ethereum precompile bn256Pairing to check equality on symmetric groups?

The address 0x8 contains bn256Pairing pre-compiled contract on Byzantium release. I have the following questions : If I have G_1 = G_2, i.e., a symmetric pairing, is it possible to check e(a_1, b_1) ?...
0
votes
1answer
46 views

Is S of the signature(R,S) invalid when it is larger than N/2 in Ethereum? [duplicate]

In ECDSA, both signature(r,s) and (r,-s) are valid. However, in Bitcoin, it seems that the signature fails to be verified when s-part in the signature is bigger than half of the group order from this ...
2
votes
1answer
186 views

Decrypt message on-chain

I want to store some data in smart contract and then decrypt it on chain. Pseudocode: contract EncryptedData { bytes data; string public decryptedData; constructor(bytes data_) public { ...
2
votes
1answer
91 views

How to get 0x0 from ecrecover?

I have a fair understanding of how ecrecover works, but I don't know how to enforce a parameter set that will deterministically return the 0x0 address. I need this in my contract tests. Is this even ...
28
votes
2answers
11k views

How to encrypt a message with the public-key of an Ethereum address

I am writing some code in nodejs/browser. I have successfully created ethereum-addresses with the secp256k1-library. I was also able to sign and verify messages. Now I want to encrypt/decrypt a ...
0
votes
1answer
274 views

How to sign a transaction using nodejs crypto?

I have a js client, web API Js client send some data in JSON format, API prepare a transaction to be send to a smart contract, than it returns transaction raw to client to be signed locally, and ...
1
vote
4answers
2k views

Decryption in a smart contract

I have a key pair: The data is encrypted off-chain: and it is saved into the following smart contract: contract Foo { string data; } Can I decrypt stored data on-chain, assuming I provide a ...
5
votes
1answer
1k views

Understanding Ethereum signatures

I would like to understand exactly which signatures are used in the Ethereum. Here https://bitcoin.stackexchange.com/questions/12554/why-the-signature-is-always-65-13232-bytes-long it says that there ...
1
vote
0answers
78 views

Ecrecover wrong address is returned

I'm trying to validate signed data with ecrecover. The message is signed like this on the FE: return this.web3.eth.personal.sign( `${nonce}`, publicAddress ).then( ( signature ) => { ...
0
votes
1answer
319 views

How to get private key with web3 v0.2.x?

web3 version 1.x has the decrypt method, which decrypts a keystore v3 JSON. By using it the following way, I can get the private key easily: web3.eth.accounts.decrypt(keystoreJsonV3, password); But ...
8
votes
4answers
1k views

How can I verify a secp256r1 signature using solidity

Sorry if you find these questions are basic, but I am new to encryption. As far as I know, Solidity have ecrecover function for this purpose, but it use secp256k1 signature. which I am intend to use ...
2
votes
1answer
402 views

HD wallet public to public key derivation and non-hardened keys

This question is about hierarchical deterministic wallets and the bip32 standard which, as I understand it, allows you to deterministically derive child private/public key pairs from a master seed ...
10
votes
3answers
1k views

Can ZKSnarks be implemented on the Ethereum ecosystem?

Since Zcash seems to have it's ZKSnarks implementation finished (or almost at least). And versions of JPMorgan's Quorum had appeared with ZKsnarks implementations included see: https://www.coindesk....
0
votes
1answer
17 views

Is it possible to provide some manual data to create private key for the ethereum account?

We were trying to provide some manual data to create the private key if I want to create a new ethereum account using this private key.