From: Jeff King Date: Sat, 24 Jan 2026 07:28:14 GMT Subject: Re: The SHA256 of "xy\n" (ASCII, no CRLF) contains 1337, ACBAD in za, and I am 1aa Message-ID: <20260124072814.GA3455597@coredump.intra.peff.net> In-Reply-To: On Fri, Jan 23, 2026 at 02:36:41PM -0800, Junio C Hamano wrote: > Jeff King writes: > > > On Fri, Jan 23, 2026 at 09:16:46PM +0100, Klaus Sembritzki wrote: > > > >> $ # My initials (ks): 1aa > >> $ echo ks | sha256sum > >> $ 1aa44e718d5bc9b7ff2003dbbb6f154e16636d5c2128ffce4751af5124b65337 > >> > >> $ # 50566750337 > >> $ echo thinking | sha256sum > >> $ 50566750337beb9e98e553fd9196d10576f9eb0cbc6b66e2586b9d73af4f352f > > > > Oh man, I've got deadbeef! > > > > $ echo jk35252822 | sha256sum > > 33f1a74529870456c56ad97c59cfed6bdeadbeef9b9bc3f4ff49bb203e36f96b > > > > What could it all mean? > > Sorry, but I have to admit that I completely lack humor receptor > cells. Probably because it was not that funny. :) The original message seemed to be looking for Numerology-style meanings in random data. I wasn't sure if it was serious or not, but I could not resist either playing along (if not) or trolling (if so). But here's my deadbeef brute-force program for fun. -Peff -- >8 -- #include #include #include int main(int argc, const char **argv) { const char needle[] = { 0xde, 0xad, 0xbe, 0xef }; const EVP_MD *algo = EVP_sha256(); EVP_MD_CTX *ctx = EVP_MD_CTX_new(); EVP_DigestInit_ex(ctx, algo, NULL); while (*++argv) EVP_DigestUpdate(ctx, *argv, strlen(*argv)); for (unsigned i = 0; ; i++) { char buf[16]; char *p; unsigned char digest[32]; EVP_MD_CTX *copy = EVP_MD_CTX_dup(ctx); p = buf + sizeof(buf); for (unsigned v = i; v; v /= 10) *--p = '0' + (v % 10); EVP_DigestUpdate(copy, p, buf + sizeof(buf) - p); EVP_DigestUpdate(copy, "\n", 1); EVP_DigestFinal_ex(copy, digest, NULL); EVP_MD_CTX_free(copy); if (memmem(digest, sizeof(digest), needle, sizeof(needle))) printf("%d\n", i); } }