Fuzz: compare our AES implementation to AES-NI #27548

issue Sjors openend this issue on May 1, 2023
  1. Sjors commented at 9:31 am on May 1, 2023: member

    We only use AES to generate a wallet encryption key from the user password. In #7689 we ditched the OpenSSL implementation for our own. It intentionally does not use special CPU instructions like AES-NI, because performance is not an issue for our use case. Instead it is based on an existing C implementation that’s known to be constant-time.

    We already have a fuzzer that checks an encryption - decryption round trip.

    On CPU’s that support it, we could add an additional fuzz target that uses AES-NI on one side of the round trip. We only need the 256 bit variant. The fuzzer probably only needs to support one platform, such as Intel’s AES-NI.

    Botan has a c++ implementation: https://github.com/randombit/botan/blob/master/src/lib/block/aes/aes_ni/aes_ni.cpp#L523-L601

  2. maflcko added the label Brainstorming on May 2, 2023
  3. maflcko added the label Tests on May 2, 2023
  4. fanquake added the label Fuzzing on Oct 30, 2025
  5. dergoegge commented at 5:39 pm on November 6, 2025: member
    Seems fine but also super niche and I’m not sure if maintaining a separate AES-NI impl or linking in an existing one is worth it (maintenance wise) for us (also considering the lack of interest here for the past 2+ years). @brunoerg perhaps something to add to bitcoinfuzz? Otherwise if cryptofuzz gets revived, that might also be something (if it wasn’t already in there).
  6. brunoerg commented at 10:26 pm on November 8, 2025: contributor

    Seems fine but also super niche and I’m not sure if maintaining a separate AES-NI impl or linking in an existing one is worth it (maintenance wise) for us (also considering the lack of interest here for the past 2+ years).

    +1

    @brunoerg perhaps something to add to bitcoinfuzz? Otherwise if cryptofuzz gets revived, that might also be something (if it wasn’t already in there).

    Since cryptofuzz is not alive anymore, we could have it on bitcoinfuzz. I will open an issue there to discuss it better.

  7. fanquake commented at 2:42 pm on November 11, 2025: member
    Will close for now, and see what comes out of https://github.com/bitcoinfuzz/bitcoinfuzz/issues/321.
  8. fanquake closed this on Nov 11, 2025

  9. quapka commented at 9:48 am on November 12, 2025: none

    Since cryptofuzz is not alive anymore

    There is a bit of activity in Mozilla’s fork. It’s also still present in OSS-Fuzz, but references the non-existent original repository, so probably is not ran anymore.


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2025-11-20 15:13 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me