I was thinking to have business-to-business contract where the participants need to a way to 1) identify themselves somehow and then 2) somehow exchange private keys.
Maybe in the future this is solved by Whisper (probably not information on it not yet available...?), but for the now what could be ways to achieve this?
Is something like this doable:
- Party A sends an encryption key, without decryption key, cannot be normal private-key, to contract
- Party B sends an encryption key
- Party A encrypts the secret for Party B using B's encryption key from the contract
- Party A stores the encrypted secret in the contract
- Party B does the same
- Party A decrypts the encrypted secret, stored by B, from the contract using their decryption key
Does Ethereum have something akin Bitcoin "Sign message" so you could simply use public Ethereum addresses as identity?
0 ·
Comments
Ethereum addresses are just secp256k public keys checksummed i think.. I.e. you can sign stuff with them, well, that is what you do when you make a transaction. Afaik the gui doesnt expose 'just sign this thing', nor afaik do the APIs.(Keep your private keys private?!) Actually some approaches to proof-of-data-storag(edited:.. strike up incomplete sentence that ended in there
Well maybe
KeyPair
in the go pipe thing, probably would have to look at eth-go code to figure it out though.Do you want parties to commit to something? You could use the hash of the data for that, and when the actual data shows up, the contract could check it.
Looks like there is even a ready example for Python how to use SECP256K to encrypt and decrypt messages - straight from BitMessage:
https://github.com/Bitmessage/PyBitmessage/blob/master/src/highlevelcrypto.py#L22
... so basically if the contract has two parties, both of their public addresses known in the contract, one can store messages (secret tokens) on the contract only the party with the corresponding Ethereum address private key can read.