News for hackers. Stuff that matters.
Re:Where does my computer get the time from? by waterheater on Thursday October 05, 2023 @02:20PM (#37782086)
Related to timekeeping is the NIST Randomness Beacon: https://csrc.nist.gov/projects/interoperable-randomness-beac...

"This prototype implementation generates full-entropy bit-strings and posts them in blocks of 512 bits every 60 seconds. Each such value is sequence-numbered, time-stamped and signed, and includes the hash of the previous value to chain the sequence of values together and prevent even the source to retroactively change an output package without being detected."

People here were joking about putting time on the blockchain, and, well, NIST is already doing it.

Re:Where does my computer get the time from? by sandpaper26 on Thursday October 05, 2023 @02:46PM (#37782446)
Can someone give an example use case of this? I'm not sure I understand why a very public long string of random characters on a block chain is useful, except as a way to prove an event didn't happen prior to a certain time
Re:Where does my computer get the time from? by nonameiguess on Thursday October 05, 2023 @03:02PM (#37782730)
The draft of the version upgrade explains the possible uses of this: https://nvlpubs.nist.gov/nistpubs/ir/2019/NIST.IR.8213-draft...

Mostly, it's so the public can verify events that were supposed to be random really were random. The executive summary gives plenty of examples, but think of a pro sports draft lottery. Fans always think those are rigged. They could simply use these outputs and a hashing function that maps a 512-bit block to some set with cardinality equal to the number of slots and pre-assign slots to participating teams based on their draft weight. Then fans could verify using this public API that the draw the league claims came up randomly really did come up randomly.

People always think polls are rigged. This could be used to publicly produce random population samples for polling.

This was also used to prove a Bell inequality experiment worked with no loopholes.

Re:Where does my computer get the time from? by codetrotter on Thursday October 05, 2023 @05:24PM (#37784471)
If they want to believe the polls are rigged, won’t they just assume that the NIST random data is “rigged” as well.
Re:Where does my computer get the time from? by somat on Friday October 06, 2023 @07:39AM (#37789394)
The mob "numbers game" Which my understanding was a sort of lottery used low digits of closing share prices to find the winning number. which solved a few of the same problems. It was an unaffiliated third party generating the numbers with another completely different unaffiliated third party (the newspaper) distributing them. so theoretically every one trusted them as fair numbers.
Re:Where does my computer get the time from? by fanf2 on Thursday October 05, 2023 @04:29PM (#37783896)
Re:Where does my computer get the time from? by throwaway89201 on Thursday October 05, 2023 @02:49PM (#37782508)
> People here were joking about putting time on the blockchain, and, well, NIST is already doing it.

It's not a blockchain, but a single writer Merkle DAG. No consensus necessary. Much like a git repository with a single author.

Re:Where does my computer get the time from? by r3trohack3r on Thursday October 05, 2023 @03:28PM (#37783137)
People keep saying Merkle DAGs when someone calls a linear chain of recursively hashed data nodes a blockchain.

I don’t understand.

My understanding of the Merkle Tree is that it’s a recursive hash, but the leaf nodes are the data, each layer up the tree is the hash of the child nodes.

In a merkle tree, only the leaf nodes store (or reference) data, everything else is just a hash.

Is there another merkle structure I don’t know about?

https://en.wikipedia.org/wiki/Merkle_tree

If the nodes with hashes contain data, it’s not a merkle tree.

Re:Where does my computer get the time from? by tedunangst on Thursday October 05, 2023 @05:11PM (#37784349)
I think this is isomorphic to an unbalanced tree where every node has one non leaf child and one leaf child.
Re:Where does my computer get the time from? by r3trohack3r on Thursday October 05, 2023 @05:19PM (#37784430)
Seems like claiming that a linked list isn't actually a linked list it’s an unbalanced tree where every node has one child node.

I mean, you’re not wrong but it’s still a linked list.

I’d be careful muddying up your mental models this way though - they’re distinct data structures for distinct purposes.

You would likely not want to use a merkle tree for an append only log, and likely would not want to use a blockchain for verifying file integrity.

For example, BitTorrent, IPFS, and Storj use merkle trees to verify and discover blocks on the DHT, you would not want to use a blockchain for this.

And Scuttlebutt uses a blockchain as an append only log that is gossip friendly, you would not want to use a merkle tree for this.

Re:Where does my computer get the time from? by r3trohack3r on Thursday October 05, 2023 @07:07PM (#37785361)
Since posting this, I've discovered that IPFS has something it calls Merkle-DAGs.

A Block-Chain is a chain of blocks where there is one valid previous block and one valid next block.

A Block-Tree is a chain of blocks where there is one single valid previous block, and multiple valid next blocks.

A Block-DAG is a chain of blocks where there are multiple valid next blocks and multiple valid previous blocks, with the constraint that you can not form cycles.

They are analogues to linked-lists, trees, and directed-acyclic-graphs but with chained hashes.

From the Merkle-DAG article on the IPFS page:

> Merkle DAGs are similar to Merkle trees, but there are no balance requirements, and every node can carry a payload. In DAGs, several branches can re-converge or, in other words, a node can have several parents.

What's interesting here is that a Merkle Tree is a valid Merkle DAG, since a node can _optionally_ include a data payload. So a blockchain, a blocktree, and a blockdag are all also Merkle-DAGs. Merkle-DAG is a kind of unifying structure that can be used to model all of them.

It's really quite clever.

https://docs.ipfs.tech/concepts/merkle-dag/

This appears to have been coined in 2014: https://github.com/jbenet/random-ideas/issues/20

However the term blockchain dates back to at least 2008.

A blockchain might be a Merkle-DAG but a Merkle-DAG is not a blockchain.

Re:Where does my computer get the time from? by waterheater on Thursday October 05, 2023 @03:09PM (#37782857)
>It's not a blockchain, but a single writer Merkle DAG.

Hmm. Just because something's a Merkle DAG doesn't make it useable on the Internet. A single-writer blockchain, perhaps?

Re:Where does my computer get the time from? by SV_BubbleTime on Thursday October 05, 2023 @03:10PM (#37782864)
Oh… so you are calling a database a “block chain”.
Re:Where does my computer get the time from? by r3trohack3r on Thursday October 05, 2023 @03:41PM (#37783303)
A blockchain is a chain of blocks.

Do you have another definition?

Colloquially, it often refers to a consensus algorithm paired with a chain of blocks.

Bitcoin’s innovation wasn’t a blockchain, it was a proof-of-work backed consensus algorithm that allowed a group of adversarial peers to agree on the state of a shared blockchain datastructure.

Re:Where does my computer get the time from? by waterheater on Thursday October 05, 2023 @04:14PM (#37783721)
According to the dictionary [1], a blockchain is "a digital database containing information (such as records of financial transactions) that can be simultaneously used and shared within a large decentralized, publicly accessible network"

The distinction here might be with a decentralized network.

[1] https://www.merriam-webster.com/dictionary/blockchain

Re:Where does my computer get the time from? by ipaddr on Thursday October 05, 2023 @05:01PM (#37784254)
Merriam is incorrect
Re:Where does my computer get the time from? by pests on Thursday October 05, 2023 @09:43PM (#37786334)
Every word in that definition seems to fit, no?
Re:Where does my computer get the time from? by tidenly on Thursday October 05, 2023 @10:03PM (#37786451)
"decentralized" isnt necessary to a block chain. However when people say "block chain" in everyday use, they're usually talking about that type. It's a case where the everyday use of a word is different to the actual technical meaning.
Re:Where does my computer get the time from? by pests on Thursday October 05, 2023 @10:15PM (#37786511)
> It's a case where the everyday use of a word is different to the actual technical meaning.

Which can change.

There also is centralized proof-of-work blockchains. Clouds were offering them awhile back and IBM had some offering.

Re:Where does my computer get the time from? by pests on Thursday October 05, 2023 @09:42PM (#37786329)
A blockchain used to be a chain of blocks. It's more now. You kinda defined it - consensus algoithm, shared datastructure.

What is colloquially even susposed to mean here? That the common usage doesn't match the definition? Maybe definitions change over time....

Re:Where does my computer get the time from? by kortilla on Friday October 06, 2023 @12:53AM (#37787209)
So a linked list is a blockchain?
Re:Where does my computer get the time from? by r3trohack3r on Friday October 06, 2023 @10:16AM (#37791082)
If you have a chained hash of the data in the linked list, yes!
Re:Where does my computer get the time from? by zzo38computer on Thursday October 05, 2023 @03:49PM (#37783408)
If each block contains the hash of the previous block, then I think that it is a blockchain (regardless of if there is multiple authors or only a single author). A git repository is a blockchain, too.
Re:Where does my computer get the time from? by zeusk on Thursday October 05, 2023 @03:58PM (#37783510)
Would you know! So Linus is the real father of blockchain?
Re:Where does my computer get the time from? by waterheater on Thursday October 05, 2023 @04:17PM (#37783764)
According to a news article, the first blockchain application is an application released in 1992 called AbsoluteProof by the company Surety [1].

[1] https://www.vice.com/en/article/j5nzx4/what-was-the-first-bl...

Re:Where does my computer get the time from? by fanf2 on Thursday October 05, 2023 @04:29PM (#37783889)
Yay, thank you, I was racking my brains trying to remember Surety as an example in response to https://news.ycombinator.com/item?id=37782446
Re:Where does my computer get the time from? by 1vuio0pswjnm7 on Thursday October 05, 2023 @04:43PM (#37784058)
"As Ethereum's cofounder Vitalik Buterin joked on Twitter, if someone wanted to compromise Surety's blockchain they could "make fake newspapers with a different chain of hashes and circulate them more widely." Given that the New York Times has an average daily print circulation of about 570,000 copies, this would probably be the stunt of the century."

What if the hash is published in multiple newspapers.

Re:Where does my computer get the time from? by fineIllregister on Saturday October 07, 2023 @10:13AM (#37801859)
Circulating that many fake newspapers is not possible. If you printed up that many newspapers, who would you give them to? Anyone who wants to read the NYT likely has a source, or at least knows one; same for sellers. The NYT wishes that there were twice as many people who wanted to read their paper.
Re:Where does my computer get the time from? by CobrastanJorji on Thursday October 05, 2023 @04:17PM (#37783758)
Wikipedia suggests that David Chaum first proposed what was basically a blockchain in 1982. He even had a crypto startup way before they were cool, with "eCash" in 1995.
Re:Where does my computer get the time from? by rdl on Thursday October 05, 2023 @09:58PM (#37786416)
Blind signatures are totally different from hash chains.
Re:Where does my computer get the time from? by throw0101a on Thursday October 05, 2023 @05:04PM (#37784284)
> If each block contains the hash of the previous block, then I think that it is a blockchain […]

Or simply a 'hash chain':

> A hash chain is similar to a blockchain, as they both utilize a cryptographic hash function for creating a link between two nodes. However, a blockchain (as used by Bitcoin and related systems) is generally intended to support distributed agreement around a public ledger (data), and incorporates a set of rules for encapsulation of data and associated data permissions.

* https://en.wikipedia.org/wiki/Hash_chain

Or perhaps:

> Linked timestamping creates time-stamp tokens which are dependent on each other, entangled in some authenticated data structure. Later modification of the issued time-stamps would invalidate this structure. The temporal order of issued time-stamps is also protected by this data structure, making backdating of the issued time-stamps impossible, even by the issuing server itself.

* https://en.wikipedia.org/wiki/Linked_timestamping

An(other) example of the latter:

    This document describes a mechanism, called syslog-sign in this
    document, that adds origin authentication, message integrity, replay
    resistance, message sequencing, and detection of missing messages to
    syslog.  Essentially, this is accomplished by sending a special
    syslog message.  The content of this syslog message is called a
    Signature Block.  Each Signature Block contains, in effect, a
    detached signature on some number of previously sent messages.  It is
    cryptographically signed and contains the hashes of previously sent
    syslog messages.  The originator of syslog-sign messages is simply
    referred to as a "signer".  The signer can be the same originator as
    the originator whose messages it signs, or it can be a separate
    originator.
* https://datatracker.ietf.org/doc/html/rfc5848
Re:Where does my computer get the time from? by schneems on Friday October 06, 2023 @12:31AM (#37787128)
I think you’re basically saying that there are still no good known use cases for blockchain (/s but only a little)
Re:Where does my computer get the time from? by squarefoot on Friday October 06, 2023 @06:24AM (#37788927)
I know of at least one: making electric heaters that actually contain obsolete mining hardware instead of heating elements. Obsolete to keep costs down and to have an excuse when someone complains "hey, at least we're recycling hardware!" (/s also only a little)
Re:Where does my computer get the time from? by throw0101a on Friday October 06, 2023 @08:27AM (#37789825)
NIST has a good blockchain explainer:

* https://csrc.nist.gov/publications/detail/nistir/8202/final

Figure 6 is a good flowchart on helping a person decide whether it's a good solution for particular use cases. See "Distributed ledger need: blockchain, block matrix, or none?" at the bottom of:

* https://csrc.nist.gov/Projects/enhanced-distributed-ledger-t...

Re:Where does my computer get the time from? by mananaysiempre on Friday October 06, 2023 @10:15AM (#37791078)
Given the relative clunkiness of commercial timestamping services, https://opentimestamps.org/ seems fairly useful to me.
Re:Where does my computer get the time from? by PH95VuimJjqBqy on Friday October 06, 2023 @10:13AM (#37791051)
That would imply many encryption schemes are automatically block chain.

That's a flawed understanding all the way around.

Re:Where does my computer get the time from? by Snacklive on Sunday October 08, 2023 @08:16PM (#37815605)
Fancy Linked List
Re:Where does my computer get the time from? by m3kw9 on Thursday October 05, 2023 @04:19PM (#37783777)
Ok but then anyone in control can change the entire tree, why need this Merkle tree?
Re:Where does my computer get the time from? by thelastparadise on Saturday October 07, 2023 @06:04PM (#37805937)
> No consensus necessary. Much like a git repository with a single author.

But shouldn't we want decentralized consensus for this?

What if NIST's key(s) were to get compromised, or the org were to disband or become corrupt/dysfunctional?

Re:Where does my computer get the time from? by eternityforest on Thursday October 05, 2023 @03:33PM (#37783195)
I always wondered why nobody is using that as the root of a P2P randomness system.

It would be very useful to have a trusted source of time, with a few keys that are meant to never change, that anyone can rebroadcast.

We could have zero configuration clocks that get the time from the nearest phone or computer without any manual setup!