Monday, November 30, 2026

Hunting for Zero: Solving FNV Zero-Hash Challenges with Lattice Reduction

FNV (Fowler–Noll–Vo) is one of the most widely used non-cryptographic hash functions. It is simple, fast and found almost everywhere, from hash tables to DNS servers to file systems. For many years its maintainer, Landon Curt Noll, has hosted a list of 72 "zero-hash challenges" on the FNV page:

What is the shortest data set for which the n-bit FNV-1 (or FNV-1a) hash is 0?

The challenges vary three things:

  • the hash width: 32, 64, 128, 256, 512 or 1024 bits
  • the variant: FNV-1 multiplies and then XORs, FNV-1a XORs and then multiplies
  • the alphabet: arbitrary binary data, runs of NUL or 0xff octets, non-NUL ASCII, printable ASCII or alphanumeric characters

The 32- and 64-bit challenges were solved years ago. Most of the 128- and 256-bit challenges, however, had been open since around 2011. Over the past weeks I worked on them, and my results are now published on the FNV page.

Why brute force is hopeless

For example, the shortest alphanumeric string with a 128-bit FNV-1a hash of 0 turns out to have 22 characters. Trying all such strings means 63^22 ≈ 2^131 hash evaluations. A meet-in-the-middle attack would still need on the order of 2^64 memory. A different approach is needed.

The key idea: turning a hash into a linear problem

FNV processes one octet at a time:

FNV-1a:  h = (h XOR c) * P   mod 2^n

The XOR is what makes this nonlinear. But if every character c is smaller than 128, the XOR only touches the lowest 7 bits of the state. Two small helper values make the recurrence exact and linear:

  • u_i: the low 7 bits after the XOR
  • r_i: the low 7 bits after the multiplication (r_i = 59 · u_i mod 128, since 59 = P mod 128)

Then the recurrence can be written as

G_i = (G_(i-1) + u_i) · P − r_i   (mod 2^n)

where G_i is the state without its low bits. The hash is 0 if and only if a modular knapsack with small unknowns (0 ≤ u, r ≤ 127) has a solution. That is a closest-vector problem in a lattice, and lattices are something we have good tools for:

  1. Reduce the lattice once. Exact integer LLL followed by BKZ-20. For a fixed string prefix, only the target vector changes, not the lattice.
  2. Enumerate. Schnorr–Euchner enumeration lists every lattice point in a ball around the centre of the cube of admissible values.
  3. Translate back. Each lattice point becomes a candidate string. It is kept only if every character is in the alphabet and the real hash, recomputed independently, is 0.

The enumeration can run in two modes:

  • Exhaustive: the ball contains the whole cube and nothing is pruned. Every solution of a given length is guaranteed to be found, which is what proves that no shorter solution exists.
  • Pruned ("extreme pruning"): several randomized rounds that each cover most of the cube. The fraction actually covered can be measured, which gives a rigorous residual probability for "there is no shorter solution".

For arbitrary binary data, the same idea works with an 8-bit linearization. For very short lengths, where the lattice is too small for reduction to work, a separate meet-in-the-middle program in Python takes over. It shares no code with the lattice search.

Runs of 0xff: an exact answer via 2-adic lifting

The challenges about runs of consecutive 0xff octets need a different technique. Here a single step f(h) = (h XOR 0xff) · P is a bijection modulo 2^n. So the orbit of the offset basis is one single cycle, and the answer is unique below the cycle length.

256 consecutive steps form an affine map, which can be raised to huge powers by repeated squaring. The exact length is then lifted bit by bit, modulo 2^j for j = 8, 9, …, n. Nothing is sampled, so the result is exact, even for lengths around 10^300.

Results

Solved: shortest length proven (13 challenges)

ChallengeWhatResult
#3binary, 128-bit FNV-1length 16; the only solution of this length (the previous best had 17)
#9binary, 128-bit FNV-1athe first solutions ever: all 251 solutions of length 17
#39 / #45non-NUL ASCII, 128-bit FNV-1 / FNV-1alength 19; all 28 and all 30 solutions
#51 / #57printable ASCII, 128-bit FNV-1 / FNV-1alength 20; 5 and 10 solutions
#270xff run, 128-bit FNV-1the published length did not give hash 0; the correct length is 51139138437908895582755236659575676289, the only one below 2^128
#30, #32–#360xff runs, 64 to 1024 bitsproved that the known lengths are the shortest (unique below the cycle length)

Best known, not yet proven shortest (6 challenges)

ChallengeWhatResult
#4 / #10binary, 256-bit FNV-1 / FNV-1alength 32 (previous best 38 / first solution); a shorter one exists with probability < 1.4 · 10^-7
#40 / #46non-NUL ASCII, 256-bit FNV-1 / FNV-1alength 37; 7 and 5 solutions
#63 / #69alphanumeric, 128-bit FNV-1 / FNV-1alength 22; 5 and 10 solutions; length 21 covered to about 98 %, residual probability ≈ 0.3 %

Confirmed (5 challenges)

For the 64-bit entries #44, #50, #56, #62 and #68, Rudi Cilibrasi wrote in 2014 that he believed there were no other solutions of the same or shorter length. An exhaustive search now confirms this: there is no shorter solution, and the published solutions are exactly all solutions of their length.

Along the way, I also noticed that a published 256-bit solution from 2011 (#4) only works with a trailing newline octet (0x0A). It had most likely been lost when the solution was first published.

How do I know the program is right?

A search program that claims "there is no shorter solution" has to earn some trust. I checked it in four ways:

  • Known results: run exhaustively, the lattice search reproduces exactly the published 32- and 64-bit results (challenges 37, 38, 43, 49, 50, 55, 56, 61, 62, 67 and 68), including "no solution of the next shorter length".
  • Independent code: the meet-in-the-middle program shares no code with the lattice search and reproduces the 32-bit results.
  • Independent verification: every single solution was verified twice, with the FNV implementation of Jacksum, my open-source checksum tool, and with a short arbitrary-precision Python implementation.
  • Plausibility: the counting argument (alphabet size^n / 2^bits expected solutions) agrees with what was found. For example, about 27.6 solutions are expected for non-NUL ASCII of length 19, and 28 and 30 were found.

What's left

The 512- and 1024-bit challenges remain out of reach with this method. So do the printable and alphanumeric challenges at 256 bits: the alphabet filter costs about a factor of two per character, which adds up to an estimated 77 days per search round. Proving that 22 is the shortest length for the 128-bit alphanumeric challenges would take an exhaustive search that is not practical today.

Many thanks to Landon Curt Noll for maintaining the FNV page for so many years, and for publishing and correcting the results so quickly.

🔗 FNV page with all challenges: https://www.isthe.com/chongo/tech/comp/fnv/ 
🔗 Jacksum: https://github.com/jonelo/jacksum

Sunday, October 25, 2026

updatejdk 2.0.0: Keep Your JDKs Up to Date – Without a Package Manager

I have just released updatejdk.sh 2.0.0, a single Bash script that lists, installs, updates and downloads JDKs and JREs on macOS and Linux. It installs Eclipse Temurin by default, and other distributions like Zulu, Corretto or Liberica if you ask for them. It verifies every download by its checksum, and one command brings everything you have installed up to date.

Why another JDK tool?

I like to keep several feature versions side by side, sometimes from different vendors, and I don't want a package manager or a runtime of its own just for that. The vendors publish plain tarballs, and their APIs say which release is the latest. A small script is enough to put the two together.

updatejdk.sh is a new development based on the ideas of update_jdk from my bashberries project. The last version of update_jdk was 1.20.0, so the version numbers continue at 2.0.0. Unlike its predecessor, it looks up the releases by the Adoptium API and the foojay Disco API rather than taking a URL. It also knows which version is installed, and it handles several distributions, architectures and operating systems.

Getting started

It is one file:

curl -fsSL -o updatejdk.sh https://bit.ly/updatejdk

chmod +x updatejdk.sh


You need bash, curl and tar. You also need jq, but if it is missing, as on macOS before Sequoia, the script downloads a verified copy for the run.

A quick tour

What is available, and what is installed?

$ ./updatejdk.sh -l 21

Asking https://api.adoptium.net/v3 for Temurin 21 releases for macOS aarch64 ...


  VERSION   TYPE  LATEST               FORMATS          INSTALLED

  --------- ----- -------------------- ---------------- ---------

* 21 LTS    jdk   jdk-21.0.13+9        tar.gz pkg       21.0.13+9-LTS (up to date) /Library/Java/JavaVirtualMachines/temurin-21.jdk

  21 LTS    jre   jdk-21.0.13+9        tar.gz pkg


Installed variants are marked with *. If you also have Zulu or Corretto installed, -l lists them as well, each in a table of its own.

Installing and updating:

updatejdk.sh -i lts           # the JDK of the most recent LTS release

updatejdk.sh -i 21:jre        # the JRE of Java 21

updatejdk.sh -i 21 -a zulu    # Azul Zulu 21 from the foojay Disco API

updatejdk.sh -u               # update everything, each from its own source

updatejdk.sh -u -n            # dry run: which updates are there?


A variant is <feature-version>[:jdk|:jre][:<architecture>], and lts and latest work as feature versions too. -l -a lists all distributions you can choose from.

Your own directory with -d/--dir

By default, installations go to /Library/Java/JavaVirtualMachines on macOS and /usr/lib/jvm on Linux. With -d, they go to a directory of your own, and no root privileges are needed. You can use it for a sandbox or a CI cache, but the use case I care most about is bundling runtimes with an application.

Say you build a macOS app on an Intel Mac and want to ship a universal DMG that runs on both Intel and Apple Silicon. You need a JRE for each architecture, and -d gets you both:

updatejdk.sh -d build/jre -i 21:jre:x64       # -> build/jre/temurin-21.jre

updatejdk.sh -d build/jre -i 21:jre:aarch64   # -> build/jre/temurin-21-aarch64.jre

updatejdk.sh -d build/jre -u                  # updates both later


A few details make this practical:

  • Only an installation for another architecture than the machine's has the architecture in its name, so the two don't collide.

  • After unpacking, the script checks that the archive really is for the requested architecture, according to the OS_ARCH of its release file.

  • Another architecture can only be installed with -d, so it never gets in the way of java_home or update-alternatives.

  • -l aarch64 shows what is available for Apple Silicon and marks what you have.

  • -t and -z need to run that java. On an Intel Mac, an aarch64 Java can't run, so the script skips both for it with a warning.

And if your build needs a stable path, -L maintains a relative symbolic link to the installed variant, e.g. build/jre/latest -> temurin-21.jre/Contents/Home.

Just the packages with -g/--get

Sometimes you don't want to install anything, just get the package, e.g. for a Windows installer:

updatejdk.sh -g 21:jre:x64 --os windows                # the zip

updatejdk.sh -g 21:jre:x64 --os windows --package msi  # the installer

updatejdk.sh -g 21:jre --package pkg                   # the macOS installer


The package is verified like an installation and saved together with a .sha256 file, so you can check it later by shasum -a 256 -c.

Trust, but verify

Nothing is installed without a checksum. The script takes the SHA-256 from the Adoptium API, from foojay, or from the checksum file next to the package. For Corretto, it uses Corretto's own latest_sha256 endpoint. Liberica only publishes a SHA-1, which is accepted with a note. The script also checks the size, and it refuses archives with absolute paths or `..`. A network error stops the script with its cause, rather than being taken for a missing release.

Linux notes

On Linux, the script supports glibc and musl (Alpine). Installations in /usr/lib/jvm are registered with update-alternatives, with the feature version as the priority, so your distribution's default stays selected. Directories that belong to a system package, like the Temurin RPM, are left to apt or dnf. The script uses sudo, or doas on systems that only have that. If a command like curl is missing, as on a fresh Ubuntu desktop, it tells you the command that installs it.

On both macOS and Linux, -z also updates the time zone data of your installations by Oracle's tzupdater.

Tested on

  • macOS on Apple Silicon, macOS 15 Sequoia (x64) and macOS 14 Sonoma (x64)

  • Ubuntu 26.04 LTS (x64) and Ubuntu 26.04.1 LTS (aarch64)

  • Rocky Linux and Alpine Linux (x64) with Temurin, during development

Get it

The source, the README with all the details, and the release notes are on GitHub: https://github.com/jonelo/updatejdk. Bug reports and wishes are welcome as issues there. updatejdk.sh is licensed under the Apache License 2.0.

updatejdk is an independent project. It is not affiliated with, endorsed or sponsored by Oracle, the Eclipse Foundation or any vendor of the distributions it installs. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates; Eclipse Temurin is a trademark of the Eclipse Foundation.


Saturday, October 17, 2026

Jacksum 4 is on the web!

I am pleased to announce that Jacksum 4 has been released! The current version is 4.0.2.

The step from 3.7 to 4 looks small, but it took three years, and it is bigger than the version number suggests. Jacksum 4 brings 97 new algorithms, new tools to judge the security of an algorithm, a much stricter verification mode, styles that match the native tools byte for byte, documentation in German, and a long list of fixes that make Jacksum more robust than ever. I call it the "trust, but verify" release ;-)

Here is an eagle view comparison chart with Jacksum 3.7.0:

Jacksum 3.7.0Jacksum 4.0.2
Algorithm support
Supported algorithms (including different lengths)489586
Default algorithmSHA3-256SHA3-256
Candidates from round 2 of the NIST SHA-3 competition 1noyes
Candidates from round 1 of the NIST SHA-3 competition 2noyes
Fugue 2.0, Romulus-H 3, belt-hash 4noyes
Verification
Strict check that also fails if files have been added or removednoyes
Ignoring stored hashes, file sizes, or timestamps during a checknoyes
Hash values compared case-insensitively by -c, -e, and -w 5noyes
Algorithm investigation (--info)
Security state "broken" incl. an explanationnoyes
Avalanche effectnoyes
Output and input
Output identical to md5, shasum, openssl dgst (3.x), and digest 6noyes
Style openssl111-dgst for the OpenSSL 1.1.1 namesnoyes
Hash data base (hdb) style, used by ClamAV's sigtoolnoyes
Styles full, without-hashes, without-sizes, without-timestamps, sizes-and-names, timestamps-and-namesnoyes
Timestamp formats in UTCnoyes
z-base-32 and BubbleBabble as input (-q, -k)noyes
Documentation
Help in German (-h de)noyes
Exact help search (--exact)noyes
Algorithm selection guide and use case cookbook (English and German)noyes
Library usage (API)
Query whether an algorithm is brokennoyes
Bundled Bouncy Castle relocated, no clash with your own Bouncy Castlenoyes
Requirements
Java required / recommended11+ / 17+21+ / 25+
LicenseGPLv3+GPLv3+

For the complete picture, including Jacksum 1.0.0 and 1.7.0 and a list of every supported algorithm, see the Feature Comparison Table in the wiki.

The highlights

97 new algorithms

Jacksum now supports 586 algorithms. With the candidates from rounds 1 and 2 of the NIST SHA-3 competition, Jacksum covers that competition much more completely. Fugue 2.0 is the tweak of Fugue that IBM published after the competition had ended. Romulus-H, belt-hash, and two new CRCs (crc64_nvme and crc32_go-koopman) complete the list.

Is my algorithm broken?

Jacksum can tell you now. The output of --info has a new section called "Security:" that says whether an algorithm is considered broken, and -V details also explains why:

$ jacksum -a sha1 --info -V details
  ...
  Security:
    broken:                               yes
      yes, 02/2017: the first identical-prefix collision was computed
      (SHAttered, 2^63.1), and in 01/2020 the first chosen-prefix
      collision followed ...

--info shows the avalanche effect of an algorithm as well, and programs that use Jacksum as a library can query the broken state through the API. If you are not sure which algorithm to pick, read the new Algorithm Selection Guide.

Better verification

--check-strict now also fails if files have been added to or removed from the directory, it prints the result in the summary, and the exit code follows it. With --ignore-hashes, --ignore-sizes, and --ignore-timestamps you decide which stored properties are checked. A file that cannot be read gets the new status ERROR instead of being reported as MISSING. And if a check file has been created with a different algorithm than the selected one, Jacksum names the cause rather than reporting every file as FAILED.

Better compatibility with other tools

The styles bsd, openssl-dgst, and solaris-digest-v now write the algorithm names that the native tools use, so their output is identical to md5, shasum --tag, sha256sum --tag, openssl dgst (OpenSSL 3.x and later), and digest -v on Solaris. If you need the OpenSSL 1.1.1 names (SHA256 instead of SHA2-256), use the new style openssl111-dgst. The new hdb style writes the hash data base format of ClamAV's sigtool.

More robust than ever

Jacksum 4 fixes a lot of bugs, in particular in the multi-threaded engine (out-of-memory errors, possible deadlocks, read errors that could go unnoticed), in the parser, in the encodings, and in a few algorithms. The releases 4.0.1 and 4.0.2 alone close more than 40 GitHub issues. Jacksum also no longer writes an HMAC key in plain text into the header of a check file. The bundled Bouncy Castle has been updated to 1.86.

Documentation in German

The help is available in German now (jacksum -h de), and so are the documents on GitHub. The new Use Cases cookbook (English and German) is organized by goal: "I want to solve this problem".

Please note before you upgrade

  • Jacksum 4 requires Java 21 or later. Java 25 is recommended.
  • An HMAC can no longer be calculated with the algorithms of the ascon family, because there is no standard-compliant HMAC for sponge-based hash functions.
  • Some algorithms return different values now, because the old values were wrong: prng, fletcher16 (input larger than 64 KiB), sum64 (very large input), and truncated HMACs whose length is not a multiple of 8 bits.
  • The style openssl-dgst uses the OpenSSL 3.x names now. Use openssl111-dgst for the old behavior.
  • For API users: the bundled Bouncy Castle has moved from org.bouncycastle to net.jacksum.zzadopt.org.bouncycastle, and the adopted GNU Crypto classes have moved to net.jacksum.zzadopt.org.gnu.crypto.

Have fun with Jacksum 4, and let me know what you think!

Footnotes:
  1. BlueMidnightWish-[224,256,384,512], CubeHash-[224,256,384,512], Hamsi-[224,256,384,512], Shabal-[192,224,256,384,512], and SIMD-[224,256,384,512] ↩

  2. MD6 (md6-8 to md6-512 in steps of 8) and Edon-R-[224,256,384,512] ↩

  3. Romulus-H is one of the finalists of the NIST Lightweight Cryptography competition ↩

  4. belt-hash is the hash function of the Belarusian national standard STB 34.101.31 ↩

  5. unless the encoding has a case-sensitive alphabet, such as Base64 or Z85 ↩

  6. the styles bsd, openssl-dgst, and solaris-digest-v ↩

Tuesday, October 13, 2026

A New Look for HashGarten: Unveiling the Official Logo

I am excited to introduce the brand-new official logo for HashGarten, the graphical frontend for Jacksum!



What's in a Name?

Just as Jacksum plays on the word checksum, HashGarten carries a special meaning of its own.

In a traditional kindergarten, children are nurtured, cherished, and cared for like young plants—a German concept and word that has found its way into languages all around the world. HashGarten borrows this exact sentiment: it is a garden, too, but one carefully cultivated for hash algorithms.


The Design Concept

To match this unique blend of nature and cryptography, the new logo visually reflects HashGarten's core identity:

  • Wordplay & Dual Meaning: The motif combines the stylized shape of a hemp leaf with a modern hash symbol (#) and digital data nodes, bridging the organic idea of a "Garten" with the digital realm of hashing.
  • Authentic Leaf Geometry: The leaf features distinct serrated edges, preserving the iconic natural outline while providing a bold structure for technical details.
  • Seamless Tech Integration: Subtle hash symbols (#) and circuit-like data nodes are embedded directly into the leaf’s veins, seamlessly weaving the cryptographic theme into the organic form.
  • Crisp Scalability: Built with clean vector geometry, the logo maintains its sharp, recognizable silhouette even at small icon sizes—such as 32×32 pixel favicons or application icons.

Check out the project, explore the release, and view the source code over on GitHub!

Wednesday, March 4, 2026

How I fixed Sequoia's screencapture on an OCLP patched MacBookPro8,1

Problem

On an early 2011 MacBook Pro (Model MacBookPro8,1), I upgraded from Catalina 10.15.8 to Sequoia 15.7.1 using OCLP 2.4.1. Following the upgrade, the screen capture features stopped working. While I could still trigger the shortcuts (Cmd+Shift+3 for the whole screen or Cmd+Shift+4 for a selected area), the screenshot images no longer appeared on the desktop as expected.

Investigation

Previously, I successfully upgraded several MacBookPro9,2 models (the Mid-2012 version with user-replaceable RAM and SSD) from Catalina to Sequoia 15.7.4 using OCLP 2.4.1 without any issues. This suggested a specific compatibility problem with the older 8,1 model.

Upon further investigation, I discovered that the screencapture binary crashes immediately on the MacBookPro8,1. Running it via the command line yielded:

% /usr/sbin/screencapture
zsh: killed     /usr/sbin/screencapture  

In contrast, the MacBookPro9,2 handles the command normally:

% /usr/sbin/screencapture
screencapture: no file specified  

Beyond just a difference in file size, using the file command revealed a discrepancy in architectures. On the older model, the binary only contains code for x86_64, whereas the binary on the later model is a Universal binary containing both x86_64 and arm64e. It appears the binary on the 8,1 model may have been stripped or corrupted during the patching process.

The Workaround

Regardless of the root cause, I found that copying the functional binary from the newer model to the older one restores functionality.

However, this isn't as simple as a standard file copy. The /usr/sbin directory is protected by System Integrity Protection (SIP) and the partition is mounted as read-only. Furthermore, reapplying OCLP root patches in the future would likely overwrite the fix.

To solve this, I wrote a shell script to automate the process, making it easy to re-apply the fix whenever necessary without manual re-mounting or complex commands. 

The script is now available here: https://github.com/jonelo/screencapture-fix

Precondition: SIP must be disabled. The script expects an unmodified screencapture binary in the same directory where the script is stored. To restore your screen capture functionality, simply run:

% sudo ./screencapture-fix.sh


Saturday, July 19, 2025

Fixing the 15W charging limit on a ThinkPad X280 by flashing the Winbond 25Q80DV with TB firmware

The problem

On startup a X280 was showing the following error message:

The connected AC adapter has a lower wattage than the recommended AC adapter
which was shipped with the system. To use AC power, please connect the AC
adapter which was shipped with the system.
Press the ESC key to continue.

The error message on the screen: 

 

And altough there was a power supply unit attached with 45 W or 65 W, Lenovo Vantage shows that the laptop loads with 15 W only:

It was constantly discharging the battery while working on the laptop, because 15 Watts were not enough to satisfy the actual power demand. Slow charging was possible, but only when the laptop was switched off actually.

 

The solution

After hours of reading articles on the web and several unsuccessful tests including the official way by Lenovo I came along the instructions at https://www.reddit.com/r/thinkpad/comments/1gyv56s/guide_how_to_flash_a_t480s_thunderbolt_firmware/ which worked like a charm also for the X280. 

The only thing worth to add here are images to show you how to find the required chip on the X280 logic board. Go to the BIOS and disable the battery. Remove the bottom case from the laptop. Now you need to remove the black plastic foil in the upper right corner and underneeth you find the Winbond 25Q80DV chip that we are going to flash with the Thunderbolt Firmware for the X280.

The chip under a magnifying glass:

The chip gripped by the pliers:

 

The whole little setup with a connection between the chip and a Linux box by using the CH341A programmer:

 

 

Install flashrom packages on Linux

$ sudo apt install flashrom

we need to check whether the connection can be established ...  

$ sudo flashrom -p ch341a_spi
flashrom unknown on Linux 6.14.0-24-generic (x86_64)
flashrom is free software, get the source code at https://flashrom.org

Using clock_gettime for delay loops (clk_id: 1, resolution: 1ns).
Found Winbond flash chip "W25Q80.V" (1024 kB, SPI) on ch341a_spi.
===
This flash part has status UNTESTED for operations: WP
The test status of this chip may have been updated in the latest development
version of flashrom. If you are running the latest development version,
please email a report to flashrom@flashrom.org if any of the above operations
work correctly for you with this flash chip. Please include the flashrom log
file for all operations you tested (see the man page for details), and mention
which mainboard or programmer you tested in the subject line.
Thanks for your help!
No operations were specified.



The chip has been found. Let's backup the content of the chip, just in case something goes wrong ...

$ sudo flashrom -p ch341a_spi -r winbond-backup.bin
flashrom unknown on Linux 6.14.0-24-generic (x86_64)
flashrom is free software, get the source code at https://flashrom.org

Using clock_gettime for delay loops (clk_id: 1, resolution: 1ns).
Found Winbond flash chip "W25Q80.V" (1024 kB, SPI) on ch341a_spi.
===
This flash part has status UNTESTED for operations: WP
The test status of this chip may have been updated in the latest development
version of flashrom. If you are running the latest development version,
please email a report to flashrom@flashrom.org if any of the above operations
work correctly for you with this flash chip. Please include the flashrom log
file for all operations you tested (see the man page for details), and mention
which mainboard or programmer you tested in the subject line.
Thanks for your help!
Reading flash... done.



A backup file has been created, now let's create a 1 MiB file full of nulls ...

$ dd if=/dev/zero of=null.bin bs=1M count=1
1+0 records in
1+0 records out
1048576 bytes (1.0 MB, 1.0 MiB) copied, 0.00205349 s, 511 MB/s



Let's erase the chip ...

$ sudo flashrom -p ch341a_spi -E
flashrom unknown on Linux 6.14.0-24-generic (x86_64)
flashrom is free software, get the source code at https://flashrom.org

Using clock_gettime for delay loops (clk_id: 1, resolution: 1ns).
Found Winbond flash chip "W25Q80.V" (1024 kB, SPI) on ch341a_spi.
===
This flash part has status UNTESTED for operations: WP
The test status of this chip may have been updated in the latest development
version of flashrom. If you are running the latest development version,
please email a report to flashrom@flashrom.org if any of the above operations
work correctly for you with this flash chip. Please include the flashrom log
file for all operations you tested (see the man page for details), and mention
which mainboard or programmer you tested in the subject line.
Thanks for your help!
Erasing and writing flash chip... Erase/write done.



Write all the nulls to the chip ...

$ sudo flashrom -p ch341a_spi -w null.bin
flashrom unknown on Linux 6.14.0-24-generic (x86_64)
flashrom is free software, get the source code at https://flashrom.org


Using clock_gettime for delay loops (clk_id: 1, resolution: 1ns).
Found Winbond flash chip "W25Q80.V" (1024 kB, SPI) on ch341a_spi.
===
This flash part has status UNTESTED for operations: WP
The test status of this chip may have been updated in the latest development
version of flashrom. If you are running the latest development version,
please email a report to flashrom@flashrom.org if any of the above operations
work correctly for you with this flash chip. Please include the flashrom log
file for all operations you tested (see the man page for details), and mention
which mainboard or programmer you tested in the subject line.
Thanks for your help!
Reading old flash chip contents... done.
Erasing and writing flash chip... Erase/write done.
Verifying flash... VERIFIED.


Disconnect the pliers, boot the laptop, disable battery again in BIOS, shutdown the laptop and reconnect the pliers again. The original Thunderbolt firmware (from Lenovo, extracted from the .exe) is called TBT.bin ...

$ ls -la TBT.bin
-rwxr-xr-x 1 johann johann 262144 Jul 8 2022 TBT.bin
johann@x250:~$ cp TBT.bin TBT-backup.bin


We need to pad the TBT.bin with nulls to have a 1 MiB file ...

$ dd if=/dev/null of=TBT.bin bs=1 seek=1048576
0+0 records in
0+0 records out
0 bytes copied, 6.4913e-05 s, 0.0 kB/s
johann@x250:~$ ls -la TBT.bin
-rwxr-xr-x 1 johann johann 1048576 Jul 18 20:11 TBT.bin


We flash the content of the updated TBT.bin to the chip ...

$ sudo flashrom -p ch341a_spi -w TBT.bin
flashrom unknown on Linux 6.14.0-24-generic (x86_64)
flashrom is free software, get the source code at https://flashrom.org

Using clock_gettime for delay loops (clk_id: 1, resolution: 1ns).
Found Winbond flash chip "W25Q80.V" (1024 kB, SPI) on ch341a_spi.
===
This flash part has status UNTESTED for operations: WP
The test status of this chip may have been updated in the latest development
version of flashrom. If you are running the latest development version,
please email a report to flashrom@flashrom.org if any of the above operations
work correctly for you with this flash chip. Please include the flashrom log
file for all operations you tested (see the man page for details), and mention
which mainboard or programmer you tested in the subject line.
Thanks for your help!
Reading old flash chip contents... done.
Erasing and writing flash chip... Erase/write done.
Verifying flash... VERIFIED.
$


Disconnect the pliers, reboot the laptop. And now the boot error message is gone. And also Vantage recognizes the correct value of 45 Watts of the attached power supply ...



Don't forget to tighten up the screws that hold the bottom case.
 
Mission completed.