Skip to content
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

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

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

wants to merge 3 commits into from

Conversation

ioBanker
Copy link
Member

@ioBanker ioBanker commented Oct 3, 2019

No description provided.

@ioBanker ioBanker changed the title Create bsip-0077.md Create bsip-0078.md Oct 3, 2019
bsip-0078.md Outdated

Risks
===============
**Note** below is a discussion of HTLC risks in general, not risks inherent in implementing this BSIP.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is duplicated from elsewhere, right? Please remove and leave only those risks that are specific to this proposal (if any).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it's duplicated from BSIP: 64, It has same risks of HASH160 algorithm.

bsip-0078.md Outdated
Specifications
=========

**ed25519-sha-256**: Include this additional hashing algorithm to the list of hashes available to be used.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please explain - is the addition of this hash function necessary and sufficient for participation in ILP? In other words, does ILP support other hashing functions like those that we already have, and does ILP demand other things as well ("crypto-conditions")?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To satisfy a full atomic swap transactions between BitShares and XRP (ILP Blockchain) for example, A crypto condition will be communicated from "ILP offChain" user to "onChain" user, so user "onChain" will create HTLC using that condition with "ed25519-sha-256" algorithm, when the fulfillment appears at "offChain" side, the "onChain" user will be using that fulfillment to release the transaction "onChain", BitShares blockchain suppose to be validating if that fulfillment is true for the earlier provided condition in that HTLC.

bsip-0078.md Outdated

**ed25519-sha-256**: Include this additional hashing algorithm to the list of hashes available to be used.

**ILP PREIMAGE-SHA-256 Crypto-Conditions**: To calculate a condition and fulfillment in the proper format, you should use a [Crypto-Conditions](https://tools.ietf.org/html/draft-thomas-crypto-conditions-03) library such as [five-bells-condition](https://github.com/interledgerjs/five-bells-condition). For fulfillments, ILP recommends using one of the following methods to generate the fulfillment:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Above your proposal sounds like it is only about adding a hashing function. Now you say that we must "calculate a condition and fulfillment in the proper format". Whatever that means, it would probably be a much bigger change than the mere addition of a hash function.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The hash function ed25519-sha-256 is not a single equation.

bsip-0078.md Outdated

**ILP PREIMAGE-SHA-256 Crypto-Conditions**: To calculate a condition and fulfillment in the proper format, you should use a [Crypto-Conditions](https://tools.ietf.org/html/draft-thomas-crypto-conditions-03) library such as [five-bells-condition](https://github.com/interledgerjs/five-bells-condition). For fulfillments, ILP recommends using one of the following methods to generate the fulfillment:

Use a cryptographically secure source of randomness to generate at least 32 random bytes.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generating preimage is client responsibility, not an on-chain protocol issue. It should not part of the specification.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a part of specification since it's not only used by client.

@ryanRfox ryanRfox changed the title Create bsip-0078.md BSIP82: Add ed25519-sha-256 Support for HTLC Oct 3, 2019
Copy link
Contributor

@ryanRfox ryanRfox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall a good start. Typically we do the rough draft within the Issue, but let's do it here as it's close enough at this point. As noted by @pmconrad this document should focus on the addition of the new hash function in the specification. The motivation may be ILP focused.

I'll need to do some additional research into this algo and ILP to determine what requirements they make on it use. We have a desire to use the minimum number of robust hash algos within our protocol to facilitate interoperability with viable external systems.

bsip-0078.md Outdated Show resolved Hide resolved
@sschiessl-bcp
Copy link
Collaborator

What is the motivation of this BSIP in terms of additionally available use-cases?

@ioBanker
Copy link
Member Author

What is the motivation of this BSIP in terms of additionally available use-cases?

I believe supporting XRP Escrow encryption algorithms within BitShares HTLC algorithms is a good step to the future of having atomic swaps between BitShares and CMC Ranked #3 XRP networks.

Also XRP has built in API which is supported by Blockchain coders themselves, this would help us to integrate some standard API calls to any XRP node and give users the ability to trust any XRP node to execute the escrow transactions.

I say if it's doable, lets do it, if it's complex and hard to do now, lets keep it in mind.

@pmconrad
Copy link
Contributor

If the goal is to connect our chain to XRP then we should start from there and see what's necessary to achieve it. Like I said above, the mere addition of a new hash function is not it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants