git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: The SHA256 of "xy\n" (ASCII, no CRLF) contains 1337, ACBAD in za, and I am 1aa

From
Jeff King <peff@peff.net>
Date
Jan 24, 2026, 07:28 UTC
Message-ID
<20260124072814.GA3455597@coredump.intra.peff.net>
In-Reply-To
<xmqq8qdogdmu.fsf@gitster.g>
On Fri, Jan 23, 2026 at 02:36:41PM -0800, Junio C Hamano wrote:
Show 21 quoted lines
> Jeff King <peff@peff.net> 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 <stdio.h> #include <string.h> #include <openssl/evp.h>

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);
	}
}
Previous: Klaus SembritzkiNext: Klaus Sembritzki
Message 6 of 10 in “The SHA256 of "xy\n" (ASCII, no CRLF) contains 1337, ACBAD in za, and I am 1aa”
  1. Klaus SembritzkiJan 23, 2026
  2. Jeff KingJan 23, 2026
  3. Marc BranchaudJan 23, 2026
  4. Junio C HamanoJan 23, 2026
  5. Klaus SembritzkiJan 23, 2026
  6. Jeff KingJan 24, 2026
  7. Klaus SembritzkiJan 24, 2026
  8. Klaus SembritzkiJan 25, 2026
  9. Klaus SembritzkiJan 25, 2026
  10. Klaus SembritzkiJan 25, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.