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
0answers
8 views

Is there only one valid r,s,parity for a given transaction signed by one private key?

As I understand it in secp256k1 there are infinitely many secrets which, for the same message to be signed, can lead to a valid signature. So the same private key can sign the exact same message and ...
0
votes
0answers
6 views

Do I need the IV, Ciphertext, and MAC to decrypt a message? Are any of these optional?

This it the encrypted message: { iv: '06ec88010977a8867a8851771b0558bd', ephemPublicKey: '...
0
votes
0answers
26 views

Trust Wallet mnemonic gives binascii.Error: Non-hexadecimal digit found

It's impossible to extract the private key from Trust Wallet. Trying to use their mnemonic in python gives me this error. There isn't a fully working solution on stack for this particular problem. ...
0
votes
0answers
7 views

What is a "short commitment" or "short proof"?

I'm trying to understand how RSA accumulators work, and I am unable to find what people mean when they say "short commitment" or "short proof." Does it refer a commitment or proof ...
0
votes
1answer
19 views

Smart contract Diffie-Hellman elliptic curve key exchange

Two accounts want to use a smart contract to exchange (with SSTORE) the public parameters for a Diffie-Hellman key exchange, and use their private keys to generate the shared symmetric key. Is there ...
0
votes
1answer
33 views

Can I store a "truly private" variable with EIP712?

I've come across EIP712 utilities in open zepplin. I also found a contract using a draft version here. I've modified their contract to something more akin to what I want to do. I was curious about ...
2
votes
1answer
58 views

How to think about the permanence of cryptographically signed messages?

I'm making a couple of assumptions about signing messages from an ethereum wallet (Metamask), like the one in the screenshot: "By default" -- without extra work on the part of 1inch -- no ...
1
vote
0answers
8 views

Understanding Hash Lock Atomic Swaps

I have trouble understanding how exactly atomic swaps take place in HTLCs. Let's take the generic example: Alice wants to trade 1 BTC with Bob in exchange for 15 ETH. Alice creates a contract where ...
0
votes
1answer
19 views

Some problem with key storage

Is there any solution if the key is lost in Ethereum or Bitcoin? Can I use the some algorithm, which can bind key and biometrics, to solve this problem? Why don't Ethereum/Bitcoin use it?
0
votes
0answers
13 views

Authenticating tokenUri before minting?

i'm tinkering with a concept for NFT minting with generative music and art and trying to work out the best way to make sure that people can only mint essentially ‘approved’ content. I.e from the ...
0
votes
0answers
21 views

ERC-721 metadata encrypted: how to deal with the transfer of ownership

I'm struggling with the following problem: I want a ERC-721 with some metadata encrypted so that only the owner can access it. The issue is: at the time of transfer, how can the metadata be encrypt ...
0
votes
0answers
12 views

Is it cryptographically secure to encrypt messages using Ethereum EOA addresses?

I understand that it is possible to do this, and have messages decrypted by the private key of an Ethereum account, but I am wondering if it is cryptographically secure (or ideally, how secure) it is ...
0
votes
1answer
88 views

Java Keccak 256 hashing implementation of multiple inputs

What's the best way to achieve the equivalent hashing in Java as below in Solidity? keccak256(abi.encodePacked(arg1,arg2,...))
0
votes
1answer
41 views

Decentralized Mobile Wallets (esp. Metamask): Security of Private Keys

I'm interested in the Metamask App (Android) and I'm wondering how exactly the sending of funds works: Since the 12 words (and the corresponding private key) are generated on my mobile device (correct?...
1
vote
1answer
33 views

Is it possible to create a vault that will open itself after a countdown (dead man's switch) on blockchain?

I know I can put an encrypted data and a timer in the contract, but what about the key? People can't know the key. It must be only used when the countdown ends, automatically.
1
vote
1answer
883 views

How to set private key for Ethers Signer

I would like to invoke a smart contract function using Ethers library. Since I have my own node I'm connecting using RPC connection and now I would like to invoke a transfer function (of an ERC20 ...
1
vote
0answers
27 views

Expiry Date for Signature

I am signing an arbitrary string by const ts = Date.now(); const hash = await web3.utils.sha3(anystring+ts); const sign = await web3.eth.personal.sign(hash, account); and check the address by const ...
1
vote
0answers
112 views

Public Key Cryptography in Solidity

I'm trying to implement a contract that stores 2 public keys from 2 separate entities. Data delivery between two entities will be securely sent by using each other's public key. However, there is a ...
0
votes
1answer
49 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
16 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
2k 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
14 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
41 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
32 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
47 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
110 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
6k 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
29 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
24 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
12 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
11 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
57 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
49 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
1answer
33 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
30 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
120 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
43 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
38 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
108 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
88 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 ...
4
votes
0answers
382 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
40 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
377 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
34 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
306 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
54 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
32 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
86 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
195 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 ...