log☇︎
158500+ entries in 0.095s
mircea_popescu: alf : "probvlem is mod is not distributive" me : "it can be made, cheaply" alf : "no, it can not" me : "here" alf : "oh, i did that back in july". then wtf are you griping about.
asciilifeform: aside from the fact that i already wrote it in july -- nuffin
mircea_popescu: nothing wrong with that!
asciilifeform: it's == to the existing one.
asciilifeform: ( and worth keeping in mind that in ffaworld adding two B-bit integers does NOT give a B-bit integer, it gives a B+W bit one. where W is our word width. )
asciilifeform: well we are talking about a O(NlogN) rsa vs a O(N^5) one
mircea_popescu: some things are just not worth the cycles.
asciilifeform: any other takers?
asciilifeform: suggest something that doesn't reduce to my existing algo ?
mircea_popescu: this approach of "i have a girlfriend and i am blind to all else" doesn't work with girlfriends, or anything else.
asciilifeform: 'distributive' means that you can do the above. and you can't.
asciilifeform: ( do i need to list contradiction, or is it obvious )
asciilifeform: the fundamental problem is that mod is not actually distributive.
mircea_popescu: that i can believe. though i expect the above is actually cheaper than adding teh numbers first and modding after.
asciilifeform: this is not one iota cheaper than what i have here.
mircea_popescu: so you won't have many passes of it. just as many as elements in list at the most.
mircea_popescu: yes, but this is very cheap here. because the elements in list are < mod
asciilifeform: with the subtract
asciilifeform: any mention of 'if' turns into 'do BOTH and then mux'
mircea_popescu: we can, IF we do all the branches the same way!
mircea_popescu: this will always take the same ops no matter what elements are in the original list.
mircea_popescu: repeat 2 until you have populated a list of equal length, and return the correct element from it.
mircea_popescu: 2.2 if smaller, add mod to it
mircea_popescu: 2. compare result to mod ;
mircea_popescu: 1. sum the list.
mircea_popescu: for simplicity, input list limited to 2 elements, but expansion obvious.
asciilifeform: well yes. but how the hell do i distribute mod. observe in http://btcbase.org/log/2017-09-12#1712923 it dunwork. ☝︎
mircea_popescu: asciilifeform let me write it out then.
mircea_popescu: and this is potentially recursive, in that if you have a 500 bit number with 300 ones in it, you do the mod for 500 terms which are all a power of 2, throw 200 away, keep the other 300 and add them. ☟︎
asciilifeform: this is still a restatement of the thing i asked for tho. i do not know of a way to distribute mod.
asciilifeform: ( one answer is that at the very bottom of the barrel, where karatsuba hits the basecase comba mult, we permit division )
mircea_popescu: that is not my concern! if there IS a mod, then yo ucan apply it to the terms rather than add them first and apply to result, is all i'm saying.
asciilifeform: before you do, say how to compute the mods without division.
mircea_popescu: is this making sense or should i show the function ?
a111: Logged on 2017-09-12 20:54 asciilifeform: and it happens B^2 times
mircea_popescu: you understand, a mod x + b mod x + c mod x may be > x, but never by more than op count * x.
asciilifeform: if you could do this, you'd save much moar than 10% , because wouldn't have division anywhere
mircea_popescu: and you save what, 10% of run time
mircea_popescu: then you feed the kara terms into it
mircea_popescu: you write by hand a function which takes a list with a promise none of the items on it exceed a mod, and returns the mod of the sum of the sum of the elements, in constant time.
asciilifeform: and from where got the 3
mircea_popescu: just write it all out by hand, the constanttime mod distributivetor.
mircea_popescu: so you make it. the bound is 3x the mod!
asciilifeform: and yes you gotta subtract ALL of the words, even if it is obvious that subtractand does not go into the scratch
mircea_popescu: that small cost can be slightly higher and constant time.
mircea_popescu: i am talking about how mod is distributive to addition "at a small cost".
asciilifeform: if you're taking about the division, we already have this.
mircea_popescu: you can write this coda so it is constant.
asciilifeform: we dun get to do this
mircea_popescu: asciilifeform you understand you need AT MOST a single pass of knuth ? because it may exceed the mod but never by more than 3x ?
mircea_popescu: gimme an a b c ill try it right here
asciilifeform: take trivial case, a=b=c=1 and n=2
mircea_popescu: it is distributive in this sense at a minimum cost (tm).
asciilifeform: ( nao if only modulus were a distributive operation ! then could take mod for each of the 3 addition arguments inside karatsuba, and we'd be golden )
rothbart: having some trouble decrypting the message deedbot sent me
mircea_popescu: but you can also update the old one, easier and safe.
rothbart: can I just register a new public key with deedbot, without revoking the old one?
mircea_popescu: ie, all the trivial polynomials of the mod, see ? x, x^2 + x, x ^ 3 + x etc etc
mircea_popescu: asciilifeform if you maintain a list of the mod and it squares
mircea_popescu: so the chain forked.
mircea_popescu: rothbart you're perhaps too new to know this, but the PREVIOUS time there was "miner consensus" it turned out the miners that "voted" and "supermajority" didn't give the slightest shit about the whole thing, and did NOT actually implement what they were misrepresented as having supported.
mircea_popescu: just mine a block with it spent, and that's that.
mircea_popescu: rothbart they don't need to do anything.
mircea_popescu: but whatever, i don't mind making money out of mit's "blockchain of the future", like i didn't mind fleecing "ripple" or cashing btc crash. free bitcoin will continue for as long as usg can draw breath, i'm not against. let them lose what they can't invest.
rothbart: anyone, at any point, can claim all segwit outputs - all they need to do is solve the 80bit hash or whatever?
mircea_popescu: (always and everywhere, the stupid poor. to them it makes sense, they've nothingh to lose anyway)
rothbart: how is it that the power rangers are all BLIND to this?
rothbart: ok, think I've got it
mircea_popescu: the t1 wreckers may yell all they want this "is not right". but in bitcoin longest chain prevails, and so the story ends
mircea_popescu: now then. at time t2, any of those involved, or any third party, simply SPENDS that bitcoin.
mircea_popescu: oin chain. on the basis of these mystery strings, OTHER PARTIES, which ARE IN NO WAY BOUND TO THIS, alloocate wholly imaginary bitcoins to the sort of imbeciles who buy into this scheme (always and everywhere, the stupid poor. to them it makes sense, they've nothingh to lose anyway)
rothbart: does the attacker just build upon the main chain, then; sending all the segwit outputs to himself?
mircea_popescu: let's drop the math for a moment and delve. at time t0, bitcoin works. at time t1, some wreckers under "public pressure" as discussed well in http://trilema.com/2013/digging-through-archives-yields-gold/ attempt to attack this bitcoin that works, by producing an alt-bitcoin, that does not work. the specific way in which the alt-bitcoin thatr does not work "works" is by deeding (exactly like deedbot) some strings into the bitc
rothbart: I've read the logs, still confused about this
rothbart: wouldn't he have to redo all that PoW since segwit wen't active on his fork?
mircea_popescu: rothbart that made no sense.
rothbart: as in, the attacker would be doing a chain rewrite in order to keep the segwit outputs on his fork?
asciilifeform: mircea_popescu: the classical ffa exponentiator, for reference, looks like http://wotpaste.cascadianhacker.com/pastes/S4dWM/?raw=true . the ~modular~ exponentiator must look like http://wotpaste.cascadianhacker.com/pastes/AiB9t/?raw=true . however it needs 'first, steal the chicken', i.e. FZ_Mod_Mul and FZ_Mod_Square .
mircea_popescu: whole fucking point of segwit is to try and take pow away.
mircea_popescu: how did you reason to arrive to that ?
rothbart: I've been trying to grok the segwit "theft" incentive - as the bounty grows, so does the PoW defending it - doesn't this keep the segwit outputs safe? ☟︎
mircea_popescu: rothbart if you have it in a portable data format, can just feed it into trb
rothbart: asciilifeform: will I need to redownload the blockchain on trb?
asciilifeform: ( because if you are doing anything other than karatsuba for mult of whatever variety, you're sunk )
asciilifeform: the approach i've been (futile, so far) taking is, to find a way to interleave modularization into karatsuba
mircea_popescu: "what do you mean this problem is hard, i have a half baked item in my head i pompously call abstraction in which it is EASY!!!"
asciilifeform: i've been fighting with the modular mult thing since july
mircea_popescu: i tried the haskell approach to "Solving" problems, whadda ya want from me.
asciilifeform: which are the only reason we are able to do anything reasonably efficiently at all
asciilifeform: other than taking away O(1) machine shifts
asciilifeform: what would that do ?
mircea_popescu: asciilifeform do you know how to ffa-base-convert ?
asciilifeform: and it is not only O(N^3), but when you modularly exponentiate it actually gets done B times, and not to B-sized inputs, but 2B ( because we have a multiply and then also a square, in each step of the B-step modular exponentiation bitwise )
mircea_popescu: this is a great fucking problem though.
mircea_popescu: 1. multiply x and y ; 2. count bits of result ; 3. count bits of modulus ; 4. multiply modulus with count2 - count3 and test if larger than result. if not, substract. if yes, multiply with count2-count3-1 and do the same. repeat until result smaller than modulus.
asciilifeform: i am referring, of course, to the standard shift-and-substract knuth division, which is in the previously posted ffa
mircea_popescu: ok, how slow is the following heuristicized approach :
asciilifeform: and it happens B^2 times ☟︎
a111: Logged on 2017-09-12 18:23 asciilifeform: you have the following primitives : multiplier ( 2 N-bit numbers -> 1 2N-bit number ); adder ( ditto ); subtractor ( ditto ); muxer ( 2 N-bit numbers, 1 single-bit number, yields one or the other N-bit depending on that single bit ) ; logical ops (and/or/xor/not)
mircea_popescu: http://btcbase.org/log/2017-09-12#1712588 << i freely admit so well formalized this is a tantalizing problem. how slow is the obvious "multiply x and y, substract modulus from result until result smaller than modulus" ? ☝︎