-
Notifications
You must be signed in to change notification settings - Fork 198
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix public key format to sharedSecret function #141
base: encrypt_keys
Are you sure you want to change the base?
Conversation
Though this would probably work with EOSIO, it will fail with all other blockchains. |
Not sure about the types of digests other blockchains use for public keys. The eos-ecc public_key constructor has a public_key_prefix that can be used for other blockhains. https://github.com/EOSIO/eosjs-ecc/blob/master/src/key_public.js |
Ok I made some changes to use plugin function to return publicKeyBuffer. Now the plugin is responsible to parse the publickey format and return a secp256K1 compatible keyBuffer. 1 - TODO implement Eth pubKey parse Is it possible to consult eth account trx? according to this: https://ethereum.stackexchange.com/questions/13778/get-public-key-of-any-ethereum-account/13892 2 - TODO implement TRX pubKey parse |
Weeellllll, technically we have the public key available, you'd just have to reconstruct it from the private key ondemand. Since we're already pulling the private into memory I don't see an issue with this since we could have them reference an address which corresponds with a keypair in the user's Scatter and then create the public key after acceptance. I'll pull this down when I get another slot of free time to mess with it again and start going through it. Thanks for the hard work <3 |
Thanks nsjames. The only limitation so far is when the address you sending a message to is not imported into scatter. So as we discussed before better to just accept the publickey as hex string and let the dapp developers try to find the public key from the accounts/address's instead of scatter. But still the interblockchain private messages is possible! Dapp's only need to send to both chains to a smart contract the messages! |
Ok, removed the plugin part and now the toPublickey must be the 64 bytes hex encoded public key that dapp developers must calculate. |
No description provided.