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

How do you spend crypto money [closed]

How do you spend money from the crypto? I found a new entertaining article on this matter https://cryptogeek.info/en/blog/cryptocurrencies-survey.it it says that a big part of users thinks that it has ...
0
votes
2answers
17 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
8 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
20 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
41 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
40 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
27 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
23 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
24 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 ...
0
votes
0answers
14 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
27 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
28 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
55 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 ...
2
votes
0answers
77 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
22 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
44 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
31 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
60 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
40 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
25 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
54 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
131 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
66 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
188 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
57 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 ...
4
votes
2answers
337 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
77 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
29 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
132 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
278 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
54 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
114 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
339 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
86 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
191 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
464 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
408 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
1k 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 ...
8
votes
2answers
14k 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?
0
votes
1answer
133 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 ...
2
votes
0answers
50 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 ...
4
votes
1answer
230 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
395 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
58 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
48 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
79 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
140 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
767 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 ...