[WIP] Chacha20 py testing #21301

pull jesseposner wants to merge 3 commits into bitcoin:master from jesseposner:chacha20-py-testing changing 6 files +213 −47
  1. jesseposner commented at 4:02 AM on February 26, 2021: none

    <!-- *** Please remove the following help text before submitting: *** Pull requests without a rationale and clear improvement may be closed immediately. GUI-related pull requests should be opened against https://github.com/bitcoin-core/gui first. See CONTRIBUTING.md -->

    <!-- Please provide clear motivation for your patch and explain how it improves Bitcoin Core user experience or Bitcoin Core developer experience significantly: * Any test improvements or new tests that improve coverage are always welcome. * All other changes should have accompanying unit tests (see `src/test/`) or functional tests (see `test/`). Contributors should note which tests cover modified code. If no tests exist for a region of modified code, new tests should accompany the change. * Bug fixes are most welcome when they come with steps to reproduce or an explanation of the potential issue as well as reasoning for the way the bug was fixed. * Features are welcome, but might be rejected due to design or scope issues. If a feature is based on a lot of dependencies, contributors should first consider building the system outside of Bitcoin Core, if possible. * Refactoring changes are only accepted if they are required for a feature or bug fix or otherwise improve developer experience significantly. For example, most "code style" refactoring changes require a thorough explanation why they are useful, what downsides they have and why they *significantly* improve developer experience or avoid serious programming bugs. Note that code style is often a subjective matter. Unless they are explicitly mentioned to be preferred in the [developer notes](/doc/developer-notes.md), stylistic code changes are usually rejected. -->

    <!-- Bitcoin Core has a thorough review process and even the most trivial change needs to pass a lot of eyes and requires non-zero or even substantial time effort to review. There is a huge lack of active reviewers on the project, so patches often sit for a long time. -->

  2. Add Python ChaCha20 implementation with a 64-bit nonce
    This commit adds an implementation of ChaCha20 (with a 64-bit nonce) in
    Python, and replaces the specialized ChaCha20 implementation in
    `test/functional/test_framework/muhash.py`.
    da2593e0a5
  3. Add python tests
    This commit adds a CSV file with the ChaCha20 test vectors from
    `src/test/crypto_tests.cpp`, and tests the python implementation against
    those vectors.
    90e8438f56
  4. Add cpp tests
    This commit adds pybind11 bindings for the `src/crypto/chacha20.h`
    implementation and tests this wrapped implementation against the test
    vectors defined in the CSV.
    
    These tests requires a build step and this commit adds a Makefile for
    performing this step. The Makefile currently only works with macOS. On
    Linux, `-underfined dynamic lookup` should be replaced with `-fPIC`.
    ed2538bd61
  5. DrahtBot added the label Build system on Feb 26, 2021
  6. laanwj added the label Tests on Feb 26, 2021
  7. jesseposner closed this on Sep 1, 2021

  8. jesseposner commented at 4:09 PM on September 1, 2021: none

    Closing this PR because work is continuing here: https://github.com/bitcoin/bitcoin/pull/22851

  9. DrahtBot commented at 5:51 PM on September 1, 2021: member

    <!--e57a25ab6845829454e8d69fc972939a-->

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    <!--174a7506f384e20aa4161008e828411d-->

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #22851 ([WIP] Add Python ChaCha20 and bindings for CPP ChaCha20 by siv2r)

    If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

  10. DrahtBot locked this on Sep 1, 2022

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: 2026-05-01 15:14 UTC

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