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
0
votes
1answer
25 views

For a given contract address, does a private key exist that maps to it?

I was reading this section from Mastering Ethereum. This specific part caught my attention: However, not all Ethereum addresses represent public–private key pairs; they can also represent contracts, ...
0
votes
0answers
14 views

Can anyone assist with this contract code project of transferring any deposited eth in my contract to another contract?

const TX = require('ethereumjs-tx').Transaction let Web3 = require('web3') let url ='HTTP://127.0.0.1:7545' let web3 = new Web3(url) const contract_account1 ='...
0
votes
0answers
600 views

My metamask was hacked. How to safely remove my staked tokens?

Yesterday my metamask was hacked. It happened when I was adding metamask to a reformatted laptop. My working theory is that I downloaded an illegal copy of metamask from chrome and that stole my funds....
0
votes
0answers
9 views

Does Dapps such as Uniswap and Sushiswap transactions are made 100% on-chain?

I'm just wondering, it looks like Dapps such as Uniswap and Sushiswap transactions are made 100% on-chain, because some claimed those apps are 100% decentralized. Is it true that all transactions are ...
2
votes
1answer
36 views

Can you potentially mine for anything?

This is more of a general "blockchain" question and not specific to Ethereum so if I'm off topic here I would appreciate it if you could direct me to a more relevant stackexchange maybe. On ...
0
votes
1answer
29 views

How i can start Trading My Token

I have created token also its live on BSCSCAN , how I can start trading on it. I tried via pancakes but there I have to deposit BNB for LP is there any other way?
0
votes
1answer
27 views

How i can burn my Tokens?

how i can burn my tokens please help me also when my token is live on bscscan will its graph live also or i have to make >? and how i can make my tokens on sale like i have to make another contract ...
4
votes
1answer
47 views

How to convert public key (64 bytes) to compressed public key (33 bytes)

I currently have a generated 64-byte public key that has been recovered from an Ethereum transaction. How do I convert this key into a 33-byte compressed public-key? The problem I'm having seems ...
4
votes
2answers
5k views

Defi-Staking is it 100% safe?

I was reading on crypto staking, more precisely Defi-Staking on Binance: https://www.binance.com/en/defi-staking While I am not a native english speaker I could understand that there is no risk in ...
1
vote
0answers
17 views

How to store in `address` two kinds of addresses at once?

I have a set of address values, each of them can contain a real Ethereum account (user account or contract) or a "virtual" address (an address pseudo-randomly generated by my contract, in ...
0
votes
0answers
25 views

ETH sent to an address that was generated for contracts, how can I recover?

I have transferred money to an ethereum address that belongs to the smart contracts. const priv = "0x" + crypto.randomBytes(32).toString("hex"); const pub = "0x" + util....
0
votes
2answers
19 views

can we create our own cryptography system and use it with ethereum or hyperledger fabric frameworks?

i have a project where we have to build a fuzzy encryption for biomedical data like DNA and use it on blockchain for storage. So is it possible to create our own cryptography scheme on Ethereum and ...
0
votes
0answers
10 views

How can I generate hash of string received from function argument

I want to generate hash of string received through function argument. Sha256 require bytes in argument. How can I convert and then save hash in _hash variable. struct ORGANIZATION{ bytes32 hash; ...
0
votes
0answers
9 views

how to implement privcacy-preserving light clients on Ethereum?

background:One key example is that can be used to implement privacy-preserving light clients (the light client hands the server an encrypted index i, the server computes and returns data[0] * (i = 0) +...
1
vote
0answers
43 views

Deriving a Bitcoin Address from Ethereum Private Key

There have been many answers about how to derive an Ethereum Address from a Bitcoin private key, but a curious problem has led me to ask how one would do the reverse. I'm sure it's possible because ...
1
vote
1answer
46 views

Messaging platform with public-private key pairs as identifier [closed]

Is there any platform available for Ethereum address 0x1d53.. to message 0xcc23..., and so on? It seems like there would be a lot of demand for something like that, which suggests it exists. Off-chain,...
0
votes
0answers
95 views

AES in Solidity

I need to encrypt and decrypt AES in Solidity. I know that this results in the ciphertext and the plaintext being publicly readable but I'm not trying to hide anything, just verify that a given ...
0
votes
1answer
30 views

Cryptographic limit to total accounts on Ethereum

Factoring in birth day attacks and all that, with 256-bit elliptic curve cryptography, what is the maximum number of accounts that are secure? It isn't 2^256 since then any time you generate a random ...
0
votes
1answer
26 views

Cryptographic hash of the entire Ethereum database

I need a cryptographic hash of the entire Ethereum database (of the information in all blocks up to a certain block number). Is there a service that calculates this hash?
0
votes
1answer
118 views

Blockchain without cryptocurrency

I am new to blockchain and am having certain doubts. Can we substitute cryptocurrency to carry out blockchain operations in any way ? Actually what i feel is that the volatility in cryptocurrencies ...
2
votes
0answers
28 views

how to calculate the message part for pedersen hash in solidity

I am trying to implement pedersen hash using solidity. Is it possible to implement and how to split the message according to the conditions of pedersen hash.
1
vote
1answer
31 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 ...
4
votes
1answer
39 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 * ...
1
vote
0answers
77 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 ...
3
votes
0answers
179 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
29 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
113 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('...
2
votes
0answers
32 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
114 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....
1
vote
1answer
45 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
28 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
65 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 ...
1
vote
1answer
171 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
84 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
277 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 ...
3
votes
0answers
60 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 ...
5
votes
2answers
1k 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 ...
0
votes
1answer
91 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
32 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 ...
2
votes
1answer
146 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
1answer
434 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 { ...
0
votes
1answer
63 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 ...
4
votes
1answer
147 views

How to get the zero address 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 ...
0
votes
1answer
463 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
0answers
102 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 ) => { ...
4
votes
2answers
311 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
1answer
510 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 ...
0
votes
1answer
20 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.
0
votes
1answer
485 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 ...
5
votes
1answer
2k 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 ...