Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - arhag

Pages: 1 2 3 4 5 6 [7] 8 9 10 11 12 13 14 ... 81
91
We just need our own version of Lightning network for micropayments.
If the Bitcoin Lightning network is feasible, and allows full scalability of Bitcoin, what does that mean for the strategic positioning of the bitShares network in the market? Are the two networks mutually exclusive, or can they interact to leverage their relative strengths in different applications?

The lightning network is only useful for transfers of funds between users (so it won't be useful for smart contracts and markets). And even then it is most beneficial if users tend to stick with one asset (e.g. BitUSD) and for smaller amounts (so it is perfect for microtransactions). Furthermore, because of the small block intervals and high TPS of BitShares, it allows the settlement period for the BitShares lightning network to be much smaller (we could handle everything settled once per day for everyone).

I'm not sure what you mean by the networks being mutually exclusive. And I don't see what Bitcoin's relative strength would be other than the fact that it (currently) has the stronger network effect.

92
We just need our own version of Lightning network for micropayments.

93
General Discussion / Re: Rust
« on: July 04, 2015, 09:00:18 pm »
Thanks.. the search through a lot of "trust" results :)

Let me give you a little trick on the best way to search for things on this forum:

https://www.google.com/search?q=site%3Abitsharestalk.org+rust

94
General Discussion / Re: Announcing Brownie Points (BROWNIE.PTS)
« on: July 04, 2015, 03:24:39 am »
@bytemaster I don't get how you are going to be able to seize BROWNIE.PTS if they aren't sent and kept to the recipient accounts' public balances (how would you know who you are seizing the balance from?). Does the code (0.x and later for 2.0) allow the UIA issuer to require that the UIA be always stored as a public balance? I know you could do whitelists, but for 2.0 a UIA issuer needs to also make sure the UIA isn't blinded either or else how could they know (and let the blockchain know) the amount of the UIA they are seizing.

95
Is anyone actually working on this bounty?

I am, but at a very low pace.

Glad to hear someone is working on it.  :)

96
General Discussion / Re: DPOS vs POS vs POW - white paper?
« on: July 03, 2015, 10:59:42 am »
This is nearly the same... I think the amortization constant has been reduced to 2 from 101 in this scheme, because the current block producer is still the only one to have authority over the current block in production?

Yeah, to be fair we should assume up to 20% of the witnesses could be absent. So let's assume there are 101 witnesses and 20 of them do not participate in the round. Let's also assume that all 20 happen to be ordered consecutively in that round (which would be very rare). In that case you would have to wait for 21 block intervals to get the "ledger close" with the method I describe while it would still only take Ripple 1 block interval. But the probability of this scenario is incredibly rare, so in practice it wouldn't really make a difference.

97
General Discussion / Re: DPOS vs POS vs POW - white paper?
« on: July 03, 2015, 10:01:02 am »
Bitccoin and nearly every other derivative (btishares included) uses an amortized consensus; the network of block producers gradually comes to an consensus on the transactions in a given block - they do this by building other blocks on top of the previous one, thereby adding a confirmation. This is why you need to wait for multiple confirmations before processing a transaction, because otherwise you only rely on the opinion of one entity, instead of the majority of the network.

Ripple, however, uses a non amortized (there is probably a better word) consensus, in that all the block signers actually work simultaneously on the current block in production. This means you get an entire network's worth of consensus on new transactions as soon as the block is produced.

DPOS could achieve the same thing if all witnesses sent their signature for the previous block to the next witness that is supposed to produce a block. That witness would collect all the signatures and include it in the block. If a large enough quorum (e.g. 80% to be consistent with Ripple) of active witnesses signed off on a particular block, then that is essentially the same thing as a ledger close in Ripple. This means in practice a block could usually be considered valid by a super majority of the active delegates in 2 seconds (two blocks with 1 second intervals).

If you want to avoid bloating each block with extra signatures from 80% of active witnesses you can use threshold signatures instead (as I have proposed here). You can increase the delay from 1 block to some other small number of blocks to give the witnesses enough time to coordinate the threshold signature generation. For example, instead of this threshold signature signing the previous block it could sign for the block that is 3 blocks in the past. In that case a block could be considered valid by a super majority of the active delegates in 5 seconds. However, for the threshold signature generation to be simple and fast, ECDSA and secp256k1 aren't going to cut it. We would need to use EdDSA which is a variant of Schnorr signature based on Twisted Edwards curve. The NaCl library seems to be a good implementation of this digital signature scheme for regular signatures, but it would need to be modified (see this paper for the cryptography necessary) to support threshold signature generation. Of course if that code was created and integrated into BitShares, many other users (particularly businesses who want to hide their authentication organizational structure from the public) could also take advantage of threshold signatures. Plus there are lots of other benefits to using EdDSA as well.

98
We had extended public/private keys but they were in bitshares not fc.   I would like to keep fc "application neutral" and general purpose.

Oh no wonder I couldn't find it. It isn't in the Graphene toolkit first of all. And while it is in the old BitShares codebase, it isn't in fc like you said. Are you guys planning on adding hierarchical deterministic wallet support into Graphene?

Well if you don't want to put that in fc, then either there is a weird dependency issue if you want this blinded signature algorithm in fc OR the interface of the algorithm needs to change to not depend on extended private/public keys OR the blinded signature algorithm should just be put into the Graphene toolkit and not fc (but if you go that route I would argue you should strip all ECC out of fc).

99
Is anyone actually working on this bounty? Here are my thoughts on how this bounty should be restructured.

I think wrapping the crypto primitives from secp256k1-zkp in a nice friendly C++ interface that we can use to intuitively do crypto math (adding/multiplying 256-bit numbers modulo order of the curve, adding curve points together, and multiplying a 256-bit scalar with a curve point, etc.) is a project of its own that could act as a prerequisite to this blinded signature project. It should also implement or wrap HMAC-SHA512 as that is needed for BIP32, which as far as I am aware libsecp256k1 does not implement but OpenSSL might. (By the way, why do we bother with a choice in the fc library between an OpenSSL implementation for the ECC math versus the libsecp256k1 one? At this point can't we just commit to the libsecp256k1 one? The secp256k1-zkp dependency is needed anyway for the Confidential Transaction stuff, right? It's also a bit frustrating seeing the public_key and private_key implementations depend on OpenSSL's bignum while libsecp256k1 apparently implements its own bignum stuff in order to do the ECC math.)

Then after that, those crypto primitives could be used to build extended_private_key and extended_public_key which can be used for proper BIP32 hierarchical deterministic wallets (honestly I was surprised to find out that wasn't already implemented in BitShares).

Then finally, the crypto primitives and extended_private_key/extended_public_key classes can all be used to implement Oleg's algorithm in a pretty straightforward and easy way. In fact at that point I would be interested in implementing my own modified version just to see how it works.

So I see this bounty broken down into those three separate projects. I think it would make this task more accessible for people. And in my opinion, the first one should be worth more than the second, and the second worth more than the third.

100
General Discussion / Re: Announcing Brownie Points (BROWNIE.PTS)
« on: July 02, 2015, 11:52:15 pm »
and 'brown-nosing . pts' should be available btw no need to go for brownie when the correct term is available...

Sounds like a great idea tony. You should register the BROWNNOSE UIA so that you can start liberally issuing them out to people as a statement. :D

I think the transfer can be sent to the account's public balance, right? And maybe you can freeze the asset after sending it to them so that the receiver can't get rid of it. :P

101
General Discussion / Re: Announcing Brownie Points (BROWNIE.PTS)
« on: July 02, 2015, 09:57:50 pm »
Mmmm brownies. This will be a fun experiment.

I appreciate whatever amount you think is fair (BTS handle: arhag). My contributions are just the public proposals, critiques, and analysis that I have shared on this forum (and a little on GitHub) over the past year now.

I have to say though, far more rewarding than any Brownie Points is seeing the ideas and changes I have fought for on this forum finally realized (in some form or other) in BitShares 2.0: generalized BitAssets, dynamic parameters, adding back TaPOS, separation of delegates and workers (this one was such a struggle for some reason), only enforcing maintenance collateral limits & allowing collateral to be adjusted up and down (see the two paragraphs after the third quote), and proper limit orders instead of WYAIWYG. Now just give us child DACs (I can see you guys might have already discussed some initial ideas similar to this from this doc), blockchain pruning & better light client security, and dividends (unfortunately dividends become either very complicated or impossible with Confidential Transactions, and so does seizing funds for that matter), and I'll appreciate that far more than any amount of BROWNIE.PTS.

102
General Discussion / Re: Dan is doing the right thing .. again!
« on: July 02, 2015, 12:53:12 am »
I suppose that the lesson is that any time you receive $X worth of something as a bonus, you must immediately convert $Y of it to cash, where $Y is what your tax bill is going to be.

Yeah, better yet I would prefer getting paid in a mix of the asset and dollars such that the dollar compensation (after putting aside the estimated tax portion on the dollar part) is enough to cover the estimated tax on the asset portion valued at the market price on the date I receive the asset. That way liquidity issues get pushed to the entity doing the paying which would only be subject to capital gains/losses and not income tax. Because you don't want to immediately sell off a huge amount of the asset in an illiquid market and trade it at a far lower average price than the market price you are forced to record when you received the asset. But you also don't want to wait too long to trade the asset because with your luck the price could just keep dropping every day. This is where BitUSD comes in very handy.

Curious, what would be the tax treatment in US for an amount of BTS not paid directly, but only payable at a vesting date, subject to certain conditions (like market cap growth), as I described earlier in this thread? (https://bitsharestalk.org/index.php/topic,17292.msg220350.html#msg220350)

Good question. The concept of ownership becomes really murky with smart contracts. When exactly is someone receiving ownership of something of value and how much really is the value of that something? And how do we answer that question for all the various innovative smart contracts we will inevitably come up with.  It gets ridiculously complicated. :'( And that's why I wish we would only have property tax despite the fact that the price discrimination is not as effective at capturing the consumer surplus of the taxpayers as an income tax.

103
BitAssets directly or indirectly using UIAs as collateral (actual UIAs not just privatized BitAssets) are not backed by BTS. All other BitAssets are ultimately backed by BTS though. An example of a BitAsset backed by a UIA could be a BitBTC backed by a SOMEBANK.USD UIA (which is an IOU for SOMEBANK's dollars). Another example could be a BitUSD backed by BTCIOU UIA where BTCIOU is redeemable for BTC by some multisig group that is holding the BTC reserves on the Bitcoin blockchain. A poor example would be BitBTC backed by BTCIOU or BitUSD backed by SOMEBANK.USD, because in those situations it makes absolutely no sense to hold the BitAsset when you could accomplish the same goal by just holding the collateral UIA with less overall risk.

The disadvantage of having a BitAsset backed by a UIA is that you are exposed to counterparty risk with respect to the entity that is backing the value of the UIA (the UIA issuer). On the other hand, despite the added counterparty risk, the value of that UIA might be less volatile relative to the asset to which the BitAsset is pegged compared to BTS, which might reduce black swan risk. So I guess in those situations you have to ask yourself which is more risky: the reserves of the UIA issuer being stolen/compromised/hacked/seized/mismanaged or the market price of BTS dropping significantly (like more than 50%) in a very short period of time.

104
By the way, I don't think the scheme discussed in this thread is what is typically known as "blinded signatures" in the literature. Here you are requiring that no one other than the person who blinds the digest and unblinds the signature to be able to associate the public key corresponding to the signature to the blinding signer. But in typical blinded signatures (useful in eCash and voting) that requirement isn't necessary and in fact not desirable. In those situation we would want everyone to be able to know the authority that signed the digest; we just don't want anyone (including the authority) other than the blinder/unblinder to know the association between the digest/signature and the identity of blinder/unblinder. I believe that cryptographic procedure will also be desirable to include in the future (as far as I am aware, it will be needed for voting since the alternative of ring signatures leads to large transaction sizes), so it makes it especially confusing to use the same name for the scheme described in this thread.


Any way that we could modify this to allow the signer to know that they had the private key for ONE_TIME_PUBLIC_KEY but not give them enough information to tie it back to ME?

What would be the purpose of that? If the signer knows they can sign for a particular ONE_TIME_PUBLIC_KEY then they must know that the balance is meant for one of their customers. But if they cannot know which specific customer it is for (because we don't want to leak that information), then what would they possibly do with this knowledge?

105
Here is my attempt at modifying the protocol to fix the unsolicited sending problem. I am not sure if this change doesn't break the security (Yes it does! See Edit2) or privacy guarantees of the original protocol. I highly appreciate review of this modified protocol.

There are three parties involved: Alice, Bob, and Carol. Bob is designated as Alice's blinded signer publicly in her account metadata. Carol wants to send funds to Alice without needing any private data from Alice. Carol knows she is sending the funds to Alice, so there is no point in blinding Alice's withdraw signature from Carol. The protocol however needs to guarantee that Carol does not have enough information to get Bob to sign a digest that allows Carol to reclaim the sent funds. Bob only needs to verify that a particular user requesting him to generate a blinded signature is a customer (and verify their identity through whatever means is appropriate to provide the multisig protection) before signing with the appropriate keys meant only for that customer. No one other than Alice or Carol (this includes Bob) should be able to associate the sent balance to Alice at any time in this process including after Alice withdraws the balance using the unblinded signature.

Alice's extended public key is Ka (and corresponding private key is ka). Bob's extended public key is Kb (and corresponding private key is kb which is specific to Alice.

Carol generates a one-time private key o (corresponding public key is O). She generates shared secret s from the x-coordinate of o * Ka (which can also be derived by Alice using O * ka). The modified shared secret s' = H (s || "modified"). The index i = H(s' || "index1"), a second index j = H(s' || "index2"), and the values v1 = H(s' || "value1") and v2 = H(s' || "value2"). Comparing to the paper, v1 == a-1c-1 and v2 == d. Carol also uses index i to derive the child public keys P (represents the same P as the one in the paper) and Q', where P = ND(Kb, 2*i + 0) and Q' = ND(Kb, 2*i + 1). She also uses index j to derive the child public key B' = ND(Ka, j). Comparing to the paper, Q' = a-1Q and B' = a-1bG.

Carol then calculates kG = v1P (from the paper, kG == a-1c-1P), and r which is defined to be the x-coordinate of kG. From the paper, T (the public key in the withdraw condition) is given by T = r-1(a-1bG + a-1Q + a-1c-1dP). We can rewrite this as T = r-1(B' + Q' + v1v2P), which Carol is able to compute.

When Alice receives the funds she can verify that Carol followed the correct procedure. She is able to generate all the same values (including r) starting from the shared secret s. When Alice finally wants to withdraw the funds in another transaction she is going to need the values for a, b, c, and d. Through the index j she is able to calculate the private key for B', which is equivalent to a-1b from the paper (call that value v3). By selecting a random value for a, Alice can then calculate the remaining values: b = av3, c = a-1(v1)-1, and d = v2. This then allows Alice to generate the blinded digest of digest h: h2 = ah + b. However, Alice cannot only send h2 and i to Bob, she must also send a to Bob. As far as I am able to tell, this should not reveal any new information to Bob (would really appreciate a check on this). Also with knowledge of a, even if Bob is colluding with Carol, they cannot withdraw the funds because they are unable to derive b (Not true! See Edit2). However, if Bob and Carol are colluding, Carol can share j with Bob which along with a and h2 allows Bob to associate h2 (and thus Alice's identity) to the digest h (and thus to the balance that Carol sent Alice). But if Bob and Carol are colluding anyway, Carol could just simply tell Bob this information as she was the one who sent the funds to Alice in the first place.

Bob now takes h2, i and a provided by Alice and computes p-1 (where P == p-1G) and q' (where Q' == q'G == a-1Q == a-1qp-1G). Then he computers q = apq'. Finally, Bob computes s1 = ph2 + q, sends s1 back to Alice.

Alice can then use s1 to compute s2 = cs1 + d. The unblinded signature on digest h is then (r, s2) which is signed using a key corresponding to public key T. This signature allows Alice to withdraw her funds.

Edit: Require Bob's extended public key to be a hardened child specific to Alice or else Alice could determine Bob's master private key by getting him to blinded sign the same hash but with different indices. Even if the private keys for P and Q' were uncorrelated, the master private key could have still been computed by getting him to blind sign the same hash four times but with different indices. This also removes the requirement for Bob to track indices for which he has signed before.

Edit2: Major flaw found with the above. If Bob and Carol are colluding, they can determine ka after Alice signs the transaction that withdraw funds sent by Carol. s2 = c*p*a*h + c*p*a*(ka + j) + c*p*a*q' + d.  Carol knows a*c, d, and j. Bob knows p and q'. Together they know y1 and y2 where s2 = y1*(h + ka) + y2. After Alice publishes the transaction to the network to withdraw the funds, she also necessarily publishes h and s2, and so at that point Bob and Carol can simply solve for Alice's private key ka. :( Back to the drawing board I guess.

Pages: 1 2 3 4 5 6 [7] 8 9 10 11 12 13 14 ... 81