News for hackers. Stuff that matters.
Re:Google’s Fully Homomorphic Encryption Compiler – A Primer by fatneckbeard on Tuesday February 14, 2023 @04:13AM (#34787148)
sounds like you could have anonymous currency.

heres our FHE bank. we both have accounts. the entire ledger is encrypted.

i give you 5 dollars, i have no idea what your starting and ending balance, but i am still able to initiate a transaction that will deduct 5 from mine, and add 5 to yours, and verify i actually have 5 to send, and the entire thing will be done without exchange of information about balances with any outside party. its just approved/declined by the algorithm. i can see my own balance with my own key, you can see your own balance with your own key, but we cant see each others balance. ---nor could anyone else including the bank---.

weird. and kind of scary. and most definitely illegal in the real world since the bank itself could never prove its reserve level of deposit met the percentage set by government.

Re:Google’s Fully Homomorphic Encryption Compiler – A Primer by CraigJPerry on Tuesday February 14, 2023 @04:52AM (#34787365)
>> since the bank itself could never prove its reserve level of deposit met the percentage set by government

There’s no minimum reserve set by the fed anymore: https://www.federalreserve.gov/monetarypolicy/reservereq.htm

Re:Google’s Fully Homomorphic Encryption Compiler – A Primer by aspyct on Tuesday February 14, 2023 @04:59AM (#34787427)
Other countries exist.
Re:Google’s Fully Homomorphic Encryption Compiler – A Primer by eru on Tuesday February 14, 2023 @07:49AM (#34788554)
See https://en.wikipedia.org/wiki/Reserve_requirement

Many countries don't have a reserve requirement. The US was a bit of a laggard.

Minimum reserve requirements were always a bit silly. You want your banks to have a thick capital cushion for its debt. Whether they have reserves on hand is an operational problem they can solve themselves, and doesn't have systemic consequences.

Re:Google’s Fully Homomorphic Encryption Compiler – A Primer by PeterisP on Tuesday February 14, 2023 @05:53AM (#34787714)
It's not really about the reserve requirements, but about basic accounting requirements, which all banks do have. At its fundamentals, bank balances are not some storage of "your money", they are recording of how much the bank legally owes you (or vice versa). And of course the bank has to know exactly what liabilities they have according to their contracts, so they need to see the balances. They also need to be able to add arbitrary quantities of new money to the FHE scheme when cash is paid in and remove it when it is paid out.
Re:Google’s Fully Homomorphic Encryption Compiler – A Primer by piaste on Tuesday February 14, 2023 @08:30AM (#34788946)
Or, more succinctly, what makes a bank a bank is that it will loan out money deposited by other people.

If the money is just sitting there and can't be moved or even counted without the owner's private key, it's not a bank, it's a vault.

Re:Google’s Fully Homomorphic Encryption Compiler – A Primer by CraigJPerry on Tuesday February 14, 2023 @08:41AM (#34789083)
>> what makes a bank a bank is that it will loan out money deposited by other people

No, a bank creates money to loan out from nothing. No deposits required.

As a sibling comment points out, other jurisdictions exist so here's the UK central bank's explainer on the topic: https://www.bankofengland.co.uk/explainers/how-is-money-crea...

Re:Google’s Fully Homomorphic Encryption Compiler – A Primer by fatneckbeard on Wednesday February 15, 2023 @09:53PM (#34814389)
but once the bank has made the loans, it has to keep track of how many it has made and how many are delinquent. i could be missing something.
Re:Google’s Fully Homomorphic Encryption Compiler – A Primer by CraigJPerry on Thursday February 16, 2023 @07:54AM (#34818042)
Yeah of course, but that's not the point the parent was contesting. They claimed a bank loans from funds deposited which isn't the case.

If a bank chooses to create an asset (your liability) by loaning money to you, if you then fail to repay, then they're in a bad spot. They're certainly not allowed to just delete the records of the loan being issued to get rid of the delinquent asset on their balance sheet.

Re:Google’s Fully Homomorphic Encryption Compiler – A Primer by noduerme on Tuesday February 14, 2023 @04:57AM (#34787407)
I love/hate this. It's one of those ideas that's incredibly appealing to people who already have other ways of doing it, and incomprehensible to people who would actually benefit from it. Most things of that ilk get blown up because once it's peddled to the masses, consumers don't verify that it's actually run the way it's supposed to be run, and someone writes in a backdoor (FTX). Then it just takes a few hyped up claims and burst bubbles before it becomes a punchline.

What would be sort of awesome, though, would be a distributed bank (or prediction market, or casino) along these lines. If every node can donate processing power to run totally encrypted transactions, it's a game changer. You could finally rely on client-side processing to deal poker hands and process game states without a central server, for example.

Re:Google’s Fully Homomorphic Encryption Compiler – A Primer by 8n4vidtmkvmk on Wednesday February 15, 2023 @03:19AM (#34801333)
> You could finally rely on client-side processing to deal poker hands and process game states without a central server, for example.

Interesting. I had given up on that idea. Not just for poker, but MMOs n stuff. Figured anything of importance had to run server-side.

Re:Google’s Fully Homomorphic Encryption Compiler – A Primer by noduerme on Wednesday February 15, 2023 @05:58AM (#34802261)
it does. But if you could drop an encrypted VM on each client - where the instructions and responses were encrypted, and even frozen/dumped states were encrypted... you'd finally have no need for centralized game servers to arbitrate who sees which part of a hidden state. You could put every player's secrets, and the secrets of the game state, on each client and use their processing in parallel.
Re:Google’s Fully Homomorphic Encryption Compiler – A Primer by heartbeats on Wednesday February 15, 2023 @06:04AM (#34802310)
> What would be sort of awesome, though, would be a distributed bank (or prediction market, or casino) along these lines I think this is already possible for poker, and will never be possible for prediction markets.

Prediction markets require human resolution of "fuzzy" questions. For example, who won the 2020 US presidential election? You can see why the limiting factor isn't the machine.

But for poker, why do you need FHE? To play poker, you have to deal two hole cards and five community cards. First each player gets two secret ("hole") cards, then three community cards are dealt ("flop"), then potentially another ("turn"), then potentially another ("river"). This could be done programmatically as such:

1. Each player generates five secrets: k_HOLE, HOLE, FLOP, TURN, RIVER

2. Each player derives public key K_HOLE from k_HOLE.

3. Each player publishes the hash of each secret in addition to K_HOLE.

4. Each player publishes their value of HOLE, which is checked against the hash from previous step.

5. To get the two hole cards for you, calculate H(HOLE_1 || HOLE_2 || ... || HOLE_N), decrypt the resulting value using k_HOLE (secret to you), then deterministically turn this into cards (for example: hash it, then map the first half into 52 values and the second half into 51 values)

6. Once it's time for the flop, all players publish FLOP. Then calculate H(FLOP_1 || FLOP_2 || ... || FLOP_N).

7. Repeat for turn and river as necessary.

The only difficult part is how to handle colors, but I don't think this is a serious issue, since nobody counts cards in poker anyway. (We can trivially ensure flop, turn and river don't repeat cards, so it's just a question for the hole cards vis-a-vis the community cards)

EDIT: Looks like someone has already tried to do this seven years ago: https://github.com/zweicoder/PokerPhase

Re:Google’s Fully Homomorphic Encryption Compiler – A Primer by noduerme on Wednesday February 15, 2023 @06:18AM (#34802393)
Given a pair of hole cards and a hash from a server for everything else, you can do this. But a fair poker hand is dealt from a truly randomized deck. Some central server needs to be the arbiter of randomness (not to mention being the actual escrow service for the money in the pot -- which is the other service provided by prediction markets besides deciding how to resolve bets). Those things - randomness, arbitration and escrow - still can't be completely devolved to client-side processing, or at least not without recourse to ludicrous hacks like public ledgers (aka blockchains) which still run the risk of 51% attacks.

Encrypt the whole VM and all i/o on each client though, so that the machine state itself is encrypted at all times, and you can trust their generation of the hole cards (as far as you can trust a PRNG).

Under this new paradigm, though, the power over the systems probably goes to some new certificate authority that doubles as a routing (signaling) service.

Re:Google’s Fully Homomorphic Encryption Compiler – A Primer by heartbeats on Wednesday February 15, 2023 @07:05AM (#34802699)
> Some central server needs to be the arbiter of randomness

What, no? My hash-based system is entirely random. The only issue is that draws are done with replacement, so two players may both have e.g. six of spades in their hand. This is aesthetically unappealing, but doesn't alter the actual maths of the game. (There are more complex solutions to this, however)

> not to mention being the actual escrow service for the money in the pot

FHE doesn't solve this, since FHE can't actually interface with your bank. Even if it could, I could just log in on my phone or physically walk into a bank branch to freeze my account before I have to pay out, so you still need a solution for the money layer.

> you can trust their generation of the hole cards

You can do trustless generation of hole cards already, as described in my post.

Re:Google’s Fully Homomorphic Encryption Compiler – A Primer by vintermann on Tuesday February 14, 2023 @05:15AM (#34787515)
Sure. And then, after you've transferred 5 dollars to me, I say "What 5 dollars? What are you talking about?" and refuse to hand over the thing that you thought you bought.

Add perfect anonymity to the mix and I get to do it over and over again, too.

Re:Google’s Fully Homomorphic Encryption Compiler – A Primer by macrolime on Tuesday February 14, 2023 @05:28AM (#34787583)
You could set it up so whoever initiates a transfer could get a kind of receipt that proves they initiated a transfer of X dollars to whomever.

So if Alice transfers 5 dollars to Bob and Bob says "What 5 dollars? What are you talking about?", then Alice could say, well here's my receipt, that's signed by my private key and the private key of the FHE bank, that shows that I sent the money to Bob and the FHE bank executed the transfer.

Re:Google’s Fully Homomorphic Encryption Compiler – A Primer by ricksunscreen on Tuesday February 14, 2023 @11:21AM (#34791611)
You get this for free with FHE. In the event of a dispute, you can reveal the randomness and message that produce the public ciphertext given the user's public key.
Re:Google’s Fully Homomorphic Encryption Compiler – A Primer by 3np on Tuesday February 14, 2023 @05:27AM (#34787577)
You could still design the scheme such that the sender can produce a cryptographic proof. Equally applicable for tax auditing etc.
Re:Google’s Fully Homomorphic Encryption Compiler – A Primer by 3np on Tuesday February 14, 2023 @05:25AM (#34787570)
You don't need FHE for that. It's possible through some zero-knowledge schemes, such as zk-SNARKS, which is implemented in and popularized by shielded transactions on Zcash.
Re:Google’s Fully Homomorphic Encryption Compiler – A Primer by easrng on Tuesday February 14, 2023 @07:27AM (#34788373)
You don't need zk-SNARKS for that. It's possible through some schemes, such as blind signatures, which have been successfully implemented many times but their usage for currency has (iirc) proved legally problematic.
Re:Google’s Fully Homomorphic Encryption Compiler – A Primer by rattlesnakedave on Tuesday February 14, 2023 @09:42AM (#34789979)
For the uninitiated:

https://sceweb.sce.uhcl.edu/yang/teaching/csci5234WebSecurit...

Chaumian mints are gaining some popularity in the bitcoin world: https://fedimint.org/

Re:Google’s Fully Homomorphic Encryption Compiler – A Primer by 3np on Tuesday February 21, 2023 @06:56AM (#34880038)
Sure, and apparently there's a coin for that too, by Chaum himself[0] :P

(If it's not obvious: Blind signature as such are solid but I wouldn't suggest anyone to give a cent to this sketchy project)

AFAIK (and I'd be thrilled to be proved wrong) we still haven't figured out how to solve double-spend using blind signatures without a blockchain and so the schemes I've seen so far invariably involve either that or a trusted mint and are therefore less interesting to use as currency.

Assuming you already have a base digital currency (like bitcoin), they can still be interesting on/as a higher layer.

[0]: https://xx.network/blog/decrypt-how-david-chaum-went-from-in...

Re:Google’s Fully Homomorphic Encryption Compiler – A Primer by mik1998 on Tuesday February 14, 2023 @05:55AM (#34787728)
GNU Taler does something similar, except without homomorphic encryption. It only anonymizes the payer however.
Re:Google’s Fully Homomorphic Encryption Compiler – A Primer by esperent on Tuesday February 14, 2023 @09:09AM (#34789450)
What purpose would this serve? Just anonymity for the sake of anonymity, or something else?
Re:Google’s Fully Homomorphic Encryption Compiler – A Primer by esperent on Tuesday February 14, 2023 @08:00PM (#34798596)
Note: this was a genuine question, with genuine interest in the answer. Why the downvotes?
Re:Google’s Fully Homomorphic Encryption Compiler – A Primer by noduerme on Wednesday February 15, 2023 @06:37AM (#34802515)
Seems a fair question. In a private banking context, it would potentially eliminate the need to pay escrow fees to a third party, without resorting to massively inefficient public ledgers. In the context of e.g. stock trading, it might mean that a traditional bank can connect buyers and sellers over a peer to peer connection and guarantee that their trades execute in order without even needing a centralized book. That's maybe a slightly extreme take, and probably a ways off. But I think anonymity is the least important of what becomes available if you can trust client-side processing.
Re:Google’s Fully Homomorphic Encryption Compiler – A Primer by fatneckbeard on Wednesday February 15, 2023 @10:08PM (#34814500)
its basically a thought experiment.

one of the things i never understood about bitcoin was the idea of the public ledger. one of the main things about most people and businesses in general is that they do not want to draw attention to their actual flows of money. the idea everyone would want their entire purchase and payment history "out there" in public never made sense to me.

but if you could actually make bitcoin anonymous, then what would happen? would it be adopted more? or would the government actually have to crack down?