Hot answers tagged

4

Private Keys are typically encoded using WIF (Wallet Import Format). The Public Keys are likewise encoded in WIF format, but with the EOS prefix added to them. To obtain the actual ECC keys, the keys are decoded, verified against their embedded checksums, then converted into their binary formats.


2

The encryption is sha256 hash with a 32 byte buffer or string with encoding defaulting to UTF-8. Here's a link to the official repository for the elliptic curve functions which should be able to give you some more insight into how it works: https://github.com/EOSIO/eosjs-ecc Further if your question is relating the the registration of the tokens, I highly ...


2

Unlike RSA, ECC isn't able to encrypt and decrypt data on its on. If you wish to use the keys to encrypt and decrypt bulk data, you need to combine it with other cryptographic technologies. The common ways to do this is with Elliptic Curve Integrated Encryption Scheme (ECIES). ECIES uses Elliptic Curve-Diffie Hellman (ECDH) to generate a shared key that ...


2

There are several ECDSA according to what elliptic curve algorithm uses. Bitcoin, Ethereum and EOSIO support secp256k1 using Koblitz curve, and their ways to sign a transaction or recover public key from signature are fundamentally same. When a transaction is pushed to node, node tries recovering public keys from signatures (multi-sig is supported in EOSIO ...


2

In EOS a signature consists of the 'SIG' prefix, follwing the part that defines which curve algorithm was used (R1 or K1), follwing the SHA256 hash encoded with base58. Take a look at https://github.com/EOSIO/eosjs-ecc, it contains all the neccessary cryptographic functions you need.


1

Here is one way to do it using the standard-ecies library import * as ecc from 'eosjs-ecc'; import * as ecies from 'standard-ecies'; export function testEncryptDecyptMessage() { const wif = "5JgbL2ZnoEAhTudReWH1RnMuQS6DBeLZt4ucV6t8aymVEuYg7sr"; const pubKey = "EOS6hMjoWRF2L8x9YpeqtUEcsDKAyxSuM1APicxgRU1E3oyV5sDEg"; // Encrypting the message for B. ...


1

Although the answers here are technically correct they lack any real details, so since I've recently had to do this myself, I thought I'd share the real nuts and bolts. An EOS private key is WIF encoded, but with a small caveat. So to get the raw private key from an EOS private key, simply Base58 decode the key. Once decoded, you will find a prefix byte ...


Only top voted, non community-wiki answers of a minimum length are eligible