Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [cryptography]

The tag has no usage guidance.

1
vote
1answer
35 views

eosjs ecc sha256 produce different hash than the EOS cpp sha256

I should compare two hashes and the scenario is the following: I create a new record in the contract as I pass eosjs-ecc sha256 generated hash as string. Let name it hashA. When I want to update the ...
2
votes
1answer
73 views

How reproduce sha256 in Javascript?

I actually use an implementation like the dice contract : https://github.com/EOSIO/eos/tree/v1.2.0/contracts/dice You create a key and his hash with sha256, you first send the hash and then the key ...
7
votes
2answers
248 views

Encrypting with a public key

I have user specific data in a table on my smart contract that I don't want others to see. Can I encrypt that data with a public key of the user? If possible then how to encrypt that data with the ...
1
vote
0answers
204 views

Using recover_key with eosjs

I want to validate user signatures in my smart contract. As I understood, I am supposed to do that with recover_key function from crypto.h I am using JavaScript with eosjs and eosjs-ecc for ...
1
vote
1answer
201 views

How to use recover function in crypto.hpp to verify signature and public key

I want to sign some data in client using eosjs-ecc.sign() and result is a string like "SIG_K1_KcTmv..." I want to use the recover_key(const checksum256* digest, const char* sig, size_t siglen, char*...
1
vote
0answers
104 views

how to convert eosio::public_key to c public_key?

In the vote.cpp, they use this type of public key: namespace eosio { struct public_key { unsigned_int type; std::array<char,33> data; friend bool operator == ( const ...
5
votes
2answers
646 views

What block hash function and transaction signature method does EOS use?

What hash function does EOS use for creating a block. Is it SHA-256? In addition, what procedure for signing a transaction is used? RSA?
2
votes
4answers
386 views

Cryptographic Operations in Smart Contracts?

Is it possible to perform cryptographic operations inside a smart contract? I'm specifically thinking about simple hashing (SHA-1/256/3) and symmetric encryption (AES). Obviously, handling key ...
4
votes
1answer
104 views

Is the block digest c++ specific?

I'm not sure how to write this block header digest/hash generation in another language then C(++). Is this even possible without a lot of hacking? If so: Could a language-neutral format for the ...
3
votes
2answers
880 views

What are the formats for the pub key/priv key/signatures?

How are the public key, private key and the signature decoded to the actual ecc keys? How many bytes are these decoded keys?