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
2answers
47 views

Which is cryptographically harder (higher cost to break), sha256 or secp256k1?

Which has a higher computational cost, to find the private key associated with a signature, or, a pre-image of a sha256 hash?
1
vote
0answers
24 views

I to want introduce myself to learn new and advanced technologies like AI, blockchain [closed]

I have completed 2days blockchain executive program two weeks back. Course covers high-level concept on blockchain, ethereum I have around 12+ yrs of IT experience and worked on different tools and ...
0
votes
0answers
43 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
0answers
133 views

Ethereum public key recovery validation

I always thought that only the person(s) in possession of the private key to an address would be able to spend or change state for that account. But by using the recover technique rather than the ...
2
votes
1answer
49 views

Can I know an address on another blockchain that was generated with the same key as an ETH address?

Let's assume another blockchain (blockchain ATH) uses the same protocol to derive addresses from private keys as the one used by Ethereum. If I see an ETH address then I know for sure that the ...
4
votes
1answer
306 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) ?...
2
votes
0answers
776 views

Ethereum Dapp Account Login Protocol with Metamask

I'm building an Ethereum dapp for users to use with Metamask. We're going to have an account management system and I was trying to follow this post on how to achieve a "password-less" account system ...
0
votes
1answer
213 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 ...
2
votes
0answers
41 views

In ENS, what does the secret phrase encrypt?

The Ethereum Name Service uses a secret phrase to encrypt the bid. What is encrypted, to later be revealed during the reveal phase?
5
votes
1answer
908 views

Authentication using ethereum account

Trying to figure out a way to Authenticate users them having an ethereum account. New to ethereum and cryptography in general and my thought may not be adequate. In essence I am thinking to be able ...
0
votes
1answer
109 views

How to prevent tampering of contract call from the web?

I have a project where users will be calling my contract from the web. I want to ensure they call the contract with exactly the parameters I give them. My strategy was to hash the combo of parameters, ...
0
votes
1answer
476 views

Create hash in c# and validate in solidity

I'm trying to build an app that will call a contract from javascript. I want the contract to validate that the parameters weren't tampered with. In order to do that, my plan was to figure out the ...
2
votes
0answers
379 views

OpenSSL error message when decrypting Ethereum encrypted private key

I'm trying to help a friend recover his password for an older format ethereum encrypted private key (EPK). My friend thinks he knows the password. My plan has been to use his best guess at the ...
0
votes
1answer
147 views

Gas limit exceeded despite function not being complex

I am writing a function which takes in a bytes32 message and validates it against a signature (this is done without hashing to save gas). I am able to call the recover function and have it execute but ...
0
votes
1answer
528 views

R,S,V ECDSA packet signatures

I am using BouncyCastle to generate .NET core packet signatures. I want to be able to get the v value for the Ethereum signature. To these ends, and with my understanding of the meaning of the v ...
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"...
1
vote
0answers
340 views

keccak256 returns 0x000000000000000

I am using the keccak256 hashing algo to retrieve a message for a signature however I am getting the return value above. Here is the code: function adminAuthorizedSwap(string price, string quantity, ...
1
vote
1answer
427 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 ...
0
votes
1answer
580 views

How to call Internal functions ? or how to protect Withdraw and kill functions?

I had some function like withdraw and self-destruct functions set as internal, but I can't call them from "Mist", then I turned them to public but I set the modifier : modifier isOwner() { if (msg....
0
votes
1answer
49 views

Should investors add token address to their account to receive the ICO rewards?

I just created a token in blockchain and when I test it on Rikenby network but no tokens appear on my wallet until I added the Token address to watch list. 1- Is that normal that investors should add ...
1
vote
1answer
616 views

Is it possible to create an X.509 certificate from an Ethereum/Bitcoin private key?

We all love Ethereum/Bitcoin (i.e. EC secp256k1) private keys, because they let us sign transactions. However, browsers don't support those keys for authentication -- what they do (sort of) support is ...
3
votes
0answers
306 views

Can the precompiles in Byzantium for pairings be used for implementation of BLS verification?

I am looking into implementing some operations for the BLS signature scheme in Solidity, using the new precompiled contracts for pairing operations released with Byzantium. In BLS verification, to ...
2
votes
1answer
346 views

How do I split a signature into v, r, and s parts in python?

I've got a signature, as a python bytes object, and want to split it into the components v, r, and s. I understand the details of what needs to be done, by reading: What's the best way to ...
1
vote
1answer
159 views

Does the private and public keys determine each other uniquely?

I wonder whether for each private/public key there correspond a unique public/private key? Of course, it must be computationally infeasible to compute the private key from the public key, but does ...
1
vote
1answer
601 views

What happens on hash collisions for, e.g., transactions, blocks, and contracts?

What happens on hash collisions for, e.g., transactions, blocks, and contracts? What happens if, say, two transactions hash to the same value? In this case, we say that a hash-collision occured. I'...
1
vote
1answer
97 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?
1
vote
0answers
53 views

Similar to currency-abstraction, could there be cryptography-abstraction (free market for digital signatures on a single state)?

Currency-abstraction for mining rewards was planned for Serenity, and so on, and so is out there as an idea. I thought about "signature-abstraction", so that different digital signatures could compete ...
1
vote
0answers
233 views

Homomorphic Secret Sharing

Speaking of Ethereum blockchain, Is it possible to perform homomorphic secret sharing algorithmic calculations like SSS/pVSS/VSS on-chain? or should this be calculations performed off-chain
1
vote
2answers
589 views

Hiding an answer/vote on the blockchain

I understand that every transaction is visible on the blockchain but would it be possible to create a DApp that allows people to vote in disguise? not showcasing their vote till the votingprocess is ...
3
votes
1answer
909 views

Brute-forcing private keys

In this post by an Ethereum engineer taken from the Ethereum wiki about brute-forcing private keys, he writes: "Public keys are sized so that, absent a breakthrough in solving the discrete ...
1
vote
2answers
2k views

Using Web3j to load a smart contract, how do i specify my credentials?

I am using the Web3j library to generate a Java wrapper for my solidity contract, i have already deployed the contract to the blockchain and it has been mined, i now want to load the contract in java ...
4
votes
1answer
111 views

Can an Ethereum key generated on a laptop be brute-forced by someone else because of low entropy?

I read this and this tweets. Though, I understand that this issue occur because some people use the same private key mentioned in a blog/forum. But, on the first tweet, people were talking about the ...
2
votes
1answer
580 views

EIP-198 and RSA verify use cases

I was reading this post: https://medium.com/@alexberegszaszi/lets-bring-the-70s-to-ethereum-48daa16a4b51 and i'm a bit unclear about some of the details. I was hoping someone can shed some more light ...
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 ...
0
votes
1answer
227 views

Encryption of keystore, keys and cryptographic library usage locations

I understand that another question posted has mentioned that the keystore has aes-128-ctr encryption: What is the strength of Mist wallet encryption? Key Derivation Function uses scrypt (where the ...
1
vote
1answer
1k views

Is it possible to hack an ethereum account? [duplicate]

I want to know if is it possible to hack an Ethereum account?
2
votes
2answers
414 views

What will happen if 2 cold storage (Ether) generates a same private key

I am new to crypto world trying to understand the Ether wallet generation process with the private key. Let us say 2 person A and B are buying a cold storage device "Ledger Nano S" and setting it up ...
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 ...
3
votes
2answers
240 views

Securely send symmetrically encrypted data to contract?

Hey there I was wondering what the best technique would be for sending encrypted data to a contract, which can later be decrypted, either by the initial user, or by the contract itself, but not anyone ...
23
votes
1answer
11k views

What does v, r, s in eth_getTransactionByHash mean?

In Ethereum JSON-RPC I found the return is: Returns Object - A transaction object, or null when no transaction was found: hash: DATA, 32 Bytes - hash of the transaction. nonce: QUANTITY - the number ...
11
votes
1answer
719 views

Ethereum signature verification not matching

What I want to achieve is sign a message and then verify the signature whether verified by same address or not. Contract to Invoke ecrecover method to verify the address contract MyAuth { ...
0
votes
1answer
290 views

Private ledgers on a Ethereum Blockchain Network

We are exploring one use case to connect a million customers with a bank. Since customers' transactions should be private to them, we want to understand whether we can have concept of private ledger ...
28
votes
6answers
15k 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 ...
34
votes
3answers
15k 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)?
3
votes
1answer
492 views

Is there any way to create an ethereum account from RSA key?

I have my very private RSA key: -----BEGIN PRIVATE KEY----- MIIJQQIBADANBgkqhkiG9w0BAQEFAASCCSswggknAgEAAoICAQDI0vCkxjyJQ7b7 MVJKKXVTFSH3yN5xWozV1pZ8grTTr6dL90bmeCHIw9PnsZRJWsAhstnSnLm1v7KE kkNqFi2s+...
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 ...
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 ...
14
votes
1answer
2k views

Getting the wrong address back from ecrecover

When I sign a string using the following code I get back a different address to the one I signed with. The address returned is different for different strings. const util = require('ethereumjs-util') ...
8
votes
1answer
4k views

Getting an address from ethereumjs-utils ecrecover

I am trying to sign a string using web3.eth.sign() and then get the public key I signed with from the signature. To do this I am using ecrecover() from ethereumjs-utils, which returns a buffer. When I ...
5
votes
2answers
2k views

How to implement cryptographic algorithms in smart contracts?

I need to implement cryptographic algorithms such as AESCCM and elliptic curve algorithms (ECDSA, ECIES) within a smart contract. Is there any implementation of such algorithms in Solidity or Serpent? ...