bitshares / bsips

BitShares Improvement Proposals and Protocols. These technical documents describe the process of updating and improving the BitShares blockchain and technical ecosystem.
https://bitshares.github.io
63 stars 86 forks source link

BSIP82: Add ed25519-sha-256 Support for HTLC #236

Open ioBanker opened 4 years ago

ioBanker commented 4 years ago

Today banks are deploying solutions for Cross-Currency Settlement and FX Market Making.

When those solutions are ILP-enabled, banks won’t have to change much – market makers will still hold accounts at their banks and they’ll establish relationships with the other banks and market makers with whom they want to transact. ILP enables transactions across any number of different ledgers and exchanges using cryptographic escrow and a specialized two-phase commit protocol.

BitShares is aiming to become the best bridge of assets for market makers providing cross-currency liquidity as a software to individuals and corporate, supporting the ed25519-sha-256 pre-image hashing algorithm would enable BitShares to become compatible with the financial system transmission and future.

Interledger crypto-conditions implemented in C, including simple JSON api JS code for creating the Condition & Fulfillment on interledger

ryanRfox commented 4 years ago

Great initiative here @ioBanker but we already assigned 77 to another. I see you already created the PR for this. Please use BSIP82 going forward.

pmconrad commented 4 years ago

After reading up a bit I understand better. Crypto-conditions are a generalized scheme for representing, well, cryptographic conditions. :-) Fulfillment of such a condition can trigger events. The most simple example of a crypto-condition is a hashlock: the condition contains the hash value, the fulfillment contains the pre-image.

The good news is that the crypto-conditions specification contains the simple SHA256-preimage condition. This means that we are compatible with ILP, in the sense that there is a condition type supported by both ILP and BitShares.

The ed25519-sha256 condition mentioned here is not just a different hash type. The fulfillment for this condition contains an ecdsa-25519 public key, and a signature of a message that can be verified with that key. It is possible to add ed25519-sha256 locks, but it would be a lot of work.

IMO it makes more sense to support all of the crypto-conditions proposal in one go instead of adding just ed25519-sha256 specifically.

ryanRfox commented 4 years ago

Appreciate the research @pmconrad on ILP and their specification for crypto-conditions. I know the ILP remains in development, so agree we should rename this BSIP more broadly. There may be other protocols and ledgers to consider in this discussion.