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

Using Solidity, how do you verify an ECDSA signature created on an external and sovereign blockchain?

I need to verify a signature on Ethereum using Solidity only. The verification needs to happen using ECDSA with the curve being secp256k1. The verification is not for Ethereum or an Ethereum generated ...
user avatar
1 vote
2 answers
15 views

Is it possible to decrypt cypher by signing from metamask?

The idea is to encrypt the message with the user's public key. Then user receives the encrypted message and needs to decrypt having metamask wallet connected. But we cannot get the user's private key ...
user avatar
0 votes
1 answer
11 views

Encryption or hashing with data

The data which we send via Ethereum blockchain , is it ecrypted and sent to sender only & never stored on blockchain OR is it hashed ? Hashing is a one way process . It means that the data once ...
user avatar
0 votes
1 answer
29 views

Hiding partial results in a smart contract

I have the following use case. There's a smart contract based game where everyone can award 1 point to a color. At the end of the game, the smart contract reveals which color is the most popular/has ...
user avatar
0 votes
0 answers
57 views

I cannot generate the ECDSA public key from her private key sequentially

I cannot generate the public keys in sequence. output :./keysgo.go:33:33: cannot use PrivateKey (type []byte) as type string in argument to Public Thank you so much for your help important to keep ...
user avatar
0 votes
2 answers
26 views

Price calculation of the crypto currency

I am learning solidity. I want to ask how does the value of the token is calculated. Like how does the value of a coin increase and decrease in a programmatical way? which technology or method is used ...
user avatar
1 vote
0 answers
23 views

How to securly perform arbitrary operations on the value of confidential data in a Solidity smart contract?

Consider the following Solidity code: // SPDX-License-Identifier: MIT pragma solidity ^0.8.7; contract ConfidentialStorage { string confidential; function setConfidential(string memory str) ...
user avatar
  • 131
0 votes
1 answer
25 views

What makes an Ethereum keypair valid?

As I understand Ethereum (and Bitcoin) use the ECDSA algorithm which relies on the secp256k1 curve. The secp256k1 curve is what generates the public keys given a private key. However, recently, I ...
user avatar
  • 5
0 votes
1 answer
496 views

How to recover an ethers.js signed message in go-ethereum?

I generated a signed message using ethers.js. Here's how I did that: const provider = new ethers.providers.Web3Provider(web3Provider.provider); const signer = provider.getSigner(); await signer....
user avatar
0 votes
0 answers
23 views

Error! Unable To Broadcast Txn, rlp: input string too long

rinkeby.etherscan.io/pushTx error: Error! Unable To Broadcast Txn : {"jsonrpc":"2.0","id":1,"error":{"code":-32000,"message":"rlp: ...
user avatar
0 votes
1 answer
66 views

Encrypt a message without directly using the private key of the metamask in the code

I have a question if anyone can help me! so I want to encrypt a message with my private key sign it and then send it to a person, the thing i see that it is not advisable to veil the private key of ...
user avatar
0 votes
0 answers
31 views

How to store secure private keys on a server, that are being used for 'gasless' minting using EIP-712 based messages?

NOTE: By 'gasless' I mean that I won't have to mint the tokens for the user, they can mint it themselves provided they have a valid signature. Hi, In my NFT (ERC-721) contract, I'm allowing callers to ...
user avatar
0 votes
0 answers
15 views

Go Ethereum "invalid signature recovery id" when recovery byte is >= 4 [duplicate]

I have a signed message that was generated by Metamask. It looks like this: ...
user avatar
0 votes
0 answers
32 views

(in)equality checks when verifying a merkle proof?

Hi trying to figure out why this piece of code works to correctly append the hashes when verifying a merkle proof function prove(address who, uint amount, bytes32[] memory proof) internal ...
user avatar
0 votes
1 answer
64 views

How do you make a signature valid for only one transaction?

I asked this question before but I worded it ambiguosly. I have a function in a smartcontract that should only be accessible by users who have a signature, issued by the contract owner. The goal is, ...
user avatar
0 votes
2 answers
30 views

unable to validate signature - recovered key doesn't match the actual key?

I'm trying to use ethereumjs to verify a signature. The signature verifies successfully with https://etherscan.io/verifySig using the following parameters: [Step 1] Address: ...
user avatar
  • 103
0 votes
1 answer
34 views

smart contract generated transaction

As I understand the smart contract is triggered by some action and executes another action based on input. If I want to send the amount of coin to the target address in case of some action so, the ...
user avatar
  • 101
0 votes
0 answers
55 views

etherscan.io says a sig is valid but i can't get ethereumjs to say that that same sig is valid

I'm trying to use ethereumjs to verify a signature. The signature verifies successfully with https://etherscan.io/verifySig using the following parameters: [Step 1] Address: ...
user avatar
  • 103
0 votes
1 answer
56 views

Why my private key is generating different public address?

I'm using that Javascript code to generate three things: private key, public key and public address (last 40 characters from public key): const EC = require('elliptic').ec; const ec = new EC('...
user avatar
  • 13
1 vote
0 answers
27 views

Web3j How to Load Bip32ECKeyPair from xprivate_key and xpublic_key

I've used PyWallet from (https://github.com/ranaroussi/pywallet) to create an HD Wallet for Ethereum { "coin": "ETH", "seed": "virtual option economy rose hello ...
user avatar
3 votes
5 answers
2k views

I want to create an NFT, but I don't want to pay the gas fee

I have 10+ creative designs and I want to make NFTs of them, but when I start to make an NFT I see a gas fee that I have to pay to create the NFT, so is there a way to create an NFT for free?
user avatar
1 vote
1 answer
61 views

How easy is to sell your art as NFT and make money and does it have to be an interesting art OR rather a unique art?

I'm new to cryptocurrency and NFT. (Please correct me where I have misunderstood something. I am making some assumptions too) Now I'm hearing everyone around me talking about NFT. I couldn't resist ...
user avatar
  • 111
1 vote
0 answers
57 views

Decrypting data on chain and verifying the decryption is correct

I already know decrypting data on chain will reveal the key and the plaintext to everyone and for my use case that is exactly what I want. I want to be able to build a contract that has a pre-...
user avatar
  • 11
0 votes
0 answers
117 views

Convert string to byte array and verify signature with go ethereum

I've been following this tutorial to generate a signature and a hash. This step all looks fine. The result are these 2 strings that I return: { "hash": "...
user avatar
  • 101
0 votes
1 answer
73 views

Minimum and Maximum Values Returned by keccak256

In the statement: uint256 x = uint256(keccak256(abi.encodePacked(valuesToEncode))); What’s the minimum and maximum possible values for x? When I looped random valuesToEncode the smallest resulting ...
user avatar
  • 101
0 votes
2 answers
27 views

Ethereum is not a cryptocurrency?

I am not a fan of cryptocurrencies at all... In my opinion their purpose is just gambling with extra steps. So I also never really looked into them. But recently I started reading about Ethereum and ...
user avatar
  • 103
0 votes
0 answers
18 views

Tron api request limit

in order to get information from tron we need it's api but the question is how many request can you have with a Tron API for a crypto exchange? what about BNB API? how many in BNB request limits?
user avatar
1 vote
0 answers
33 views

how do exchanges move their users assets?

do big exchanges move their users assets from HD wallets different dresses to a main wallet address ? to eventually move it to cold wallet ? if the answer is YES how do they do it? that's a lot of on ...
user avatar
0 votes
0 answers
43 views

exchange gather all hd wallet adresses fund

every exchange has a HD wallet that stores the fund an assets of their clients but sometimes in order to keep peoples coins safe the exchanges have to move their assets to more secure wallet like ...
user avatar
0 votes
0 answers
35 views

Curious about the Math that makes Blockchain/Ethereum work ! Any good resources to learn it?

A bit of a background about me ; Computer Engineer but during my studies i didn't dive too deep into the maths , especially the crypto maths that makes the blockchain and cryptography work looking for ...
user avatar
1 vote
0 answers
135 views

How can an Ethereum address start with 0x5555555555? [duplicate]

Ethereum wallet addresses start with 0x followed by random number and letters as a hexadecimal string. How is it possible then that there are addresses visible on Etherscan that seem to be "...
user avatar
1 vote
0 answers
26 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 ...
user avatar
0 votes
0 answers
42 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: '...
user avatar
0 votes
0 answers
113 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. ...
user avatar
0 votes
0 answers
10 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 ...
user avatar
0 votes
1 answer
62 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 ...
user avatar
  • 23
0 votes
1 answer
73 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 ...
user avatar
2 votes
1 answer
71 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 ...
user avatar
1 vote
0 answers
11 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 ...
user avatar
0 votes
1 answer
21 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?
user avatar
  • 1
0 votes
0 answers
18 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 ...
user avatar
0 votes
0 answers
57 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 ...
user avatar
0 votes
0 answers
18 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 ...
user avatar
  • 503
0 votes
1 answer
444 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,...))
user avatar
0 votes
1 answer
61 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?...
user avatar
1 vote
1 answer
43 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.
user avatar
  • 113
2 votes
2 answers
6k 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 ...
user avatar
  • 431
1 vote
0 answers
56 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 ...
user avatar
  • 189
1 vote
0 answers
325 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 ...
user avatar
  • 111
0 votes
1 answer
81 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, ...
user avatar

1
2 3 4 5