Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.

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
1
vote
1answer
102 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?
37
votes
3answers
16k 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)?
1
vote
1answer
40 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 ...
0
votes
1answer
229 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 ...
110
votes
4answers
75k views

How are ethereum addresses generated?

What criteria does a valid ethereum address need to fulfil? Is it just a random number in hexadecimal? Or does it need to be derived in a specific way, according to some cryptographic algorithm? What ...
1
vote
2answers
87 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 ...
0
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 ...
14
votes
8answers
772 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
1answer
47 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
414 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"...
0
votes
0answers
22 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 ...
1
vote
1answer
438 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
2answers
89 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
40 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 ...
29
votes
6answers
16k 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 ...
2
votes
1answer
55 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 ...
3
votes
2answers
5k 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?
89
votes
2answers
50k 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
23 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
213 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?
0
votes
0answers
22 views

Genesis.json Change Name from ETH to Any other [duplicate]

I want to change the name of the currency while setting up my private ethereum node, is it possible ? and if possible how can we change it ?
6
votes
4answers
2k views

Proving the Existence of Logs to the Blockchain

To preface this: I'm not entirely sure this question makes any sense. Just a thought I had that I wanted to check the feasibility of. I'm pretty sure it is possible to use a Merkle proof to show that ...
16
votes
2answers
4k 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
319 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
39 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 ...
0
votes
0answers
12 views

if RecoverCompact succeeds, does it prove that signature is right?

eth not use VerifySignature to ensure signature,but use recovecompact func, does it means that signature is right if recoverPlain succeeds, // Validate the transaction sender and it's sig. Throw // ...
2
votes
1answer
106 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
47 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 ...
27
votes
2answers
10k 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
151 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 ...
2
votes
1answer
631 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
62 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
231 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 ...
0
votes
0answers
165 views

Encryption with Ethereum Keys for all Clients (iOS,Android,Web)

I was trying to encrypt data with Ethereum Key pairs. So far, I have managed to encrypt and decrypt data with these keys using ECIES schema on eth-crypto. Eth-crypto is a package which is built on top ...
2
votes
1answer
292 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
13 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.
1
vote
2answers
259 views

Can private keys change once created?

Can private keys change once the public key (address) is created?
0
votes
1answer
72 views

How to define 2048-bit integers on smart contracts?

As we know solidity supports only 256-bit big integers. But for crypto primitives (sometimes) we need bigger integers, e.g. 2048-bit. Question: how can we define 2048-bit integers on a smart contract ...
27
votes
5answers
9k views

How can I sign a piece of data with the private key of an Ethereum address?

I would like to use the key pair of one of my Ethereum accounts to sign a piece of data. How can this be done?
2
votes
0answers
32 views

Why is an ephemeral key used in creating a digital signature?

When creating the 'S' component of a digital signature, both the actual private key and an ephemeral private key are used. The reasoning I've read is to ensure that the sender’s actual private key ...
3
votes
1answer
194 views

Zero Knowledge v Multi Party Computation (MPC)

I am struggling with understanding the difference between the two. From what I am putting together, they have different adversarial models, MPC adds the condition of collusion between parties i.e. ...
0
votes
3answers
237 views

how to generate mnemonics from randombytes

I am able to get the randombytes using react-native-crypto-js const words = CryptoJS.lib.WordArray.random(32); Is that possible to generate mnemonics using random bytes.
1
vote
1answer
54 views

Is it possible to create one-time addresses, like in monero?

In http://src.getmonero.org/library/Zero-to-Monero-1-0-0.pdf, chapter "5.2 One-time addresses", there is description of how to create them. The problem is that Monero uses Ed25519 and Ethereum ...
2
votes
1answer
34 views

How to get two points (x, y) from an encoded pubkey?

this gives a valid address from two points; address(uint256(keccak256(abi.encodePacked(point[0], point[1]))) & 0x00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF); but does that mean that if you are ...
1
vote
0answers
68 views

Ethereum geth node sync problem

I have to ethereum geth node runing as testnet syncmode=full on aws both running on same hardware and bandwidth why one is syncing very slow and other one is syncing fast? and if I will stop the ...
0
votes
1answer
71 views

Estimation of gas in web3js 0.20

Q:- While sending only Ether One wallet to another wallet(NO SMART CONTRACT), do we need to define the default gas limit and price? i.e. 21000 * 3 OR 21000 * 4 OR 21000 * 5 etc Or I've need to use ...
3
votes
1answer
420 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 ...