Subject: Re: gemtext (was: So I made a thing: nncp-echomail)

From: Sergey Matveev <[email-masked]>
Date: Sat, 4 Oct 2025 22:23:38 +0300

*** Eugene Medvedev [2025-10-04 21:39]:
>I've been there for most of the 90s. FTN standards at the time specified
>the use of 0x8D as something equivalent to &shy; in HTML, so it would
>simply disappear upon rendering everywhere. If you didn't tune your
>software to replace it with 0x48, everyone would call you a lamer.

Yeah, I am aware about the etymology of that joke with "Н" :-)
Seems that at my time all software was tend to be correctly configured.

>> You can safely shorten its output, as often done in practice. ZFS does
>> that (one example immediately remembered).
>
>Shorten as in what, just take the first 32 bytes? Are they all actually
>equally significant?

In practice, in case of SHA2 (and I believe in all other cryptographic
hashes we use in practice), yes. They has uniform distribution. Ideally
you would use SHA2-512/256 variant, where SHA2's state is initialised
with different "magic numbers" to separate the context of ordinary
SHA2-512 from SHA2-512/256, because if you happen to get SHA2-512, then
you can "calculate" its stripped variant. With proper SHA2-512/256
hashes are not "interexchangable". But in most cases, especially in
pretty trivial like nncp-echomail, we can ignore that paranoid context
separation and just use 32 bytes of SHA2-512 (does not matter first half
or second).

-- 
Sergey Matveev (http://www.stargrave.org/)
LibrePGP: 12AD 3268 9C66 0D42 6967  FD75 CB82 0563 2107 AD8A