From bd15ad72b4a7050e76a7eef4acdeb7cede19936f Mon Sep 17 00:00:00 2001 From: Florian Sesser Date: Sun, 31 Aug 2025 16:34:39 +0000 Subject: [PATCH 01/13] Update nixpkgs to 25.05 --- flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 8a4db7b..3819e99 100644 --- a/flake.nix +++ b/flake.nix @@ -1,7 +1,7 @@ { inputs = { nixpkgs = { - url = "github:nixos/nixpkgs?ref=nixos-24.05"; + url = "github:nixos/nixpkgs?ref=nixos-25.05"; }; # The source repository for the crate we're building. From 50220984db4e47677569c6f3035b5c6c382afc41 Mon Sep 17 00:00:00 2001 From: Florian Sesser Date: Sun, 31 Aug 2025 16:36:14 +0000 Subject: [PATCH 02/13] Add Python 3.13 --- flake.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/flake.nix b/flake.nix index 3819e99..011bd9d 100644 --- a/flake.nix +++ b/flake.nix @@ -82,6 +82,7 @@ python310-challenge-bypass-ristretto = py-module pkgs.python310.pkgs; python311-challenge-bypass-ristretto = py-module pkgs.python311.pkgs; python312-challenge-bypass-ristretto = py-module pkgs.python312.pkgs; + python313-challenge-bypass-ristretto = py-module pkgs.python313.pkgs; }; # Define our cross-compiled packages. This currently does not include @@ -114,6 +115,7 @@ integration310 = integration pkgs.python310; integration311 = integration pkgs.python311; integration312 = integration pkgs.python312; + integration313 = integration pkgs.python313; # The library should have the correct soname. soname = pkgs.runCommand "${lib.name}-soname" { } '' From 6f42c36963b7ff3bb3e18046bff53cd45c676c55 Mon Sep 17 00:00:00 2001 From: Florian Sesser Date: Sun, 31 Aug 2025 16:48:08 +0000 Subject: [PATCH 03/13] Update challenge-bypass-ristretto-ffi dependency This pulls a couple of merely cosmetic changes from upstream, and signals to readers of our code that we are up to date. Command used: git submodule update --remote --merge --- challenge-bypass-ristretto-ffi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/challenge-bypass-ristretto-ffi b/challenge-bypass-ristretto-ffi index 419995e..6b7bab0 160000 --- a/challenge-bypass-ristretto-ffi +++ b/challenge-bypass-ristretto-ffi @@ -1 +1 @@ -Subproject commit 419995e4a873c294f1eaefca276f8ad25328e89f +Subproject commit 6b7bab019ec593cdd00f7070dd76a07f21e21b00 From 868f6fd583f6f0effa4f8ae78ce92fcd65827f7c Mon Sep 17 00:00:00 2001 From: Florian Sesser Date: Sun, 31 Aug 2025 16:58:08 +0000 Subject: [PATCH 04/13] Also add Python 3.13 to CI --- .circleci/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 795c633..af687cc 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -308,6 +308,7 @@ workflows: - "python310" - "python311" - "python312" + - "python313" - "package-manylinux": name: "package-manylinux-2014_x86_64" From ba70c7cb1f4fa57e7f82fd16c8bab323147d31b2 Mon Sep 17 00:00:00 2001 From: Florian Sesser Date: Sun, 31 Aug 2025 17:00:21 +0000 Subject: [PATCH 05/13] Fix Nix warning: lib.cartesianProductOfSets is a deprecated alias of lib.cartesianProduct. --- nix/each-system-and-cross.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nix/each-system-and-cross.nix b/nix/each-system-and-cross.nix index a534bdb..8dd6828 100644 --- a/nix/each-system-and-cross.nix +++ b/nix/each-system-and-cross.nix @@ -88,7 +88,7 @@ let checks.${system} = lib.optionalAttrs (buildResult ? checks) buildResult.checks; }; - args = lib.cartesianProductOfSets { + args = lib.cartesianProduct { system = buildSystems; crossSystem = crossSystems; }; From fdf84a0002c7b9e2281f1fe5713c5125c733311c Mon Sep 17 00:00:00 2001 From: Florian Sesser Date: Sun, 31 Aug 2025 17:01:15 +0000 Subject: [PATCH 06/13] Ran 'nix flake update' --- flake.lock | 72 ++++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 56 insertions(+), 16 deletions(-) diff --git a/flake.lock b/flake.lock index f46b3f8..971d9fb 100644 --- a/flake.lock +++ b/flake.lock @@ -8,11 +8,33 @@ "rust-analyzer-src": "rust-analyzer-src" }, "locked": { - "lastModified": 1730788380, - "narHash": "sha256-jzniRMqEjqYC7yyx0nIiiEnQ4xlZQMnA7R6mvyYZER8=", + "lastModified": 1756622179, + "narHash": "sha256-K3CimrAcMhdDYkErd3oiWPZNaoyaGZEuvGrFuDPFMZY=", "owner": "nix-community", "repo": "fenix", - "rev": "280efe0e9b7b824518091a5aff76065785f81649", + "rev": "0abcb15ae6279dcb40a8ae7c1ed980705245cb79", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "fenix", + "type": "github" + } + }, + "fenix_2": { + "inputs": { + "nixpkgs": [ + "naersk", + "nixpkgs" + ], + "rust-analyzer-src": "rust-analyzer-src_2" + }, + "locked": { + "lastModified": 1752475459, + "narHash": "sha256-z6QEu4ZFuHiqdOPbYss4/Q8B0BFhacR8ts6jO/F/aOU=", + "owner": "nix-community", + "repo": "fenix", + "rev": "bf0d6f70f4c9a9cf8845f992105652173f4b617f", "type": "github" }, "original": { @@ -24,11 +46,11 @@ "libchallenge_bypass_ristretto_ffi-src": { "flake": false, "locked": { - "lastModified": 1709936990, - "narHash": "sha256-69xR3hsM3o7KDQ8scyMg/pgGlKgTYa5WnDV8wvBNsTE=", + "lastModified": 1748339749, + "narHash": "sha256-rQehKejb9igy5ArB3AsvBcPZNeul3VZgbAvLghgsS7A=", "owner": "brave-intl", "repo": "challenge-bypass-ristretto-ffi", - "rev": "3e22c067e9e4135e5b8bbec7a611ae0e2545648b", + "rev": "6b7bab019ec593cdd00f7070dd76a07f21e21b00", "type": "github" }, "original": { @@ -39,16 +61,17 @@ }, "naersk": { "inputs": { + "fenix": "fenix_2", "nixpkgs": [ "nixpkgs" ] }, "locked": { - "lastModified": 1721727458, - "narHash": "sha256-r/xppY958gmZ4oTfLiHN0ZGuQ+RSTijDblVgVLFi1mw=", + "lastModified": 1752689277, + "narHash": "sha256-uldUBFkZe/E7qbvxa3mH1ItrWZyT6w1dBKJQF/3ZSsc=", "owner": "nix-community", "repo": "naersk", - "rev": "3fb418eaf352498f6b6c30592e3beb63df42ef11", + "rev": "0e72363d0938b0208d6c646d10649164c43f4d64", "type": "github" }, "original": { @@ -59,16 +82,16 @@ }, "nixpkgs": { "locked": { - "lastModified": 1730741070, - "narHash": "sha256-edm8WG19kWozJ/GqyYx2VjW99EdhjKwbY3ZwdlPAAlo=", + "lastModified": 1756469547, + "narHash": "sha256-YvtD2E7MYsQ3r7K9K2G7nCslCKMPShoSEAtbjHLtH0k=", "owner": "nixos", "repo": "nixpkgs", - "rev": "d063c1dd113c91ab27959ba540c0d9753409edf3", + "rev": "41d292bfc37309790f70f4c120b79280ce40af16", "type": "github" }, "original": { "owner": "nixos", - "ref": "nixos-24.05", + "ref": "nixos-25.05", "repo": "nixpkgs", "type": "github" } @@ -84,11 +107,28 @@ "rust-analyzer-src": { "flake": false, "locked": { - "lastModified": 1730749868, - "narHash": "sha256-b8UMpLh61z6T4J1NObustAuFGoJiAKBTaPTrEf3Amts=", + "lastModified": 1756597274, + "narHash": "sha256-wfaKRKsEVQDB7pQtAt04vRgFphkVscGRpSx3wG1l50E=", + "owner": "rust-lang", + "repo": "rust-analyzer", + "rev": "21614ed2d3279a9aa1f15c88d293e65a98991b30", + "type": "github" + }, + "original": { + "owner": "rust-lang", + "ref": "nightly", + "repo": "rust-analyzer", + "type": "github" + } + }, + "rust-analyzer-src_2": { + "flake": false, + "locked": { + "lastModified": 1752428706, + "narHash": "sha256-EJcdxw3aXfP8Ex1Nm3s0awyH9egQvB2Gu+QEnJn2Sfg=", "owner": "rust-lang", "repo": "rust-analyzer", - "rev": "b51f9bc736dc0472481a47d7c05de2901323e543", + "rev": "591e3b7624be97e4443ea7b5542c191311aa141d", "type": "github" }, "original": { From f3581d07ce052c958f89fa952777cb18976a0acc Mon Sep 17 00:00:00 2001 From: "Florian Sesser (aider)" Date: Sun, 31 Aug 2025 17:12:43 +0000 Subject: [PATCH 07/13] Fix 'error: Alias pythonPackages is still in python-packages.nix' --- nix/python-challenge-bypass-ristretto.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nix/python-challenge-bypass-ristretto.nix b/nix/python-challenge-bypass-ristretto.nix index 3b8f132..2765661 100644 --- a/nix/python-challenge-bypass-ristretto.nix +++ b/nix/python-challenge-bypass-ristretto.nix @@ -1,7 +1,7 @@ # A basic packaging of this very project: Python bindings to the Rust # Ristretto implementation. -{ libchallenge_bypass_ristretto_ffi, python, pythonPackages, milksnake, cffi, attrs, testtools, hypothesis }: -pythonPackages.buildPythonPackage rec { +{ libchallenge_bypass_ristretto_ffi, python, buildPythonPackage, milksnake, cffi, attrs, testtools, hypothesis }: +buildPythonPackage rec { version = "2024.11.5"; pname = "python-challenge-bypass-ristretto"; name = "${pname}-${version}"; From 13dd7134b5bbf250e5d59ba07ee5866c42b39900 Mon Sep 17 00:00:00 2001 From: Florian Sesser Date: Sun, 31 Aug 2025 17:16:38 +0000 Subject: [PATCH 08/13] Remove Python39, NixOS 25.05 doesn't seem to have it anymore. --- .circleci/config.yml | 1 - flake.nix | 2 -- 2 files changed, 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index af687cc..ea134d4 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -304,7 +304,6 @@ workflows: matrix: parameters: python-version: - - "python39" - "python310" - "python311" - "python312" diff --git a/flake.nix b/flake.nix index 011bd9d..f609fbb 100644 --- a/flake.nix +++ b/flake.nix @@ -78,7 +78,6 @@ src = libchallenge_bypass_ristretto_ffi-src; }; - python39-challenge-bypass-ristretto = py-module pkgs.python39.pkgs; python310-challenge-bypass-ristretto = py-module pkgs.python310.pkgs; python311-challenge-bypass-ristretto = py-module pkgs.python311.pkgs; python312-challenge-bypass-ristretto = py-module pkgs.python312.pkgs; @@ -111,7 +110,6 @@ in { # Run a little integration test that exercises the underlying # library via the Python interface. - integration39 = integration pkgs.python39; integration310 = integration pkgs.python310; integration311 = integration pkgs.python311; integration312 = integration pkgs.python312; From adbea941ca95c0d695a1bb90d47565b959e7e1c4 Mon Sep 17 00:00:00 2001 From: Florian Sesser Date: Sun, 31 Aug 2025 18:51:33 +0000 Subject: [PATCH 09/13] What python does it have, then?wq --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index ea134d4..64f0d29 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -315,7 +315,7 @@ workflows: # The image this executor uses comes with no ssh client. CircleCI # rewrites our git configuration to fetch sources over ssh. Then it # fails if we don't have any ssh client. - pre-command: "yum install -y openssh-clients" + pre-command: "yum install -y openssh-clients; echo 'FLOFLO'; ls /opt/python" python: "/opt/python/cp37-cp37m/bin/python" # This one can upload the sdist. upload-sdist: true From ddcf8862169eb1bfa94aa442025567872b4357b1 Mon Sep 17 00:00:00 2001 From: Florian Sesser Date: Sun, 31 Aug 2025 19:03:33 +0000 Subject: [PATCH 10/13] Use a Python that the image actually has The output produced by the earlier commit was cp310-cp310 cp313-cp313 cp314-cp314t pp310-pypy310_pp73 cp311-cp311 cp313-cp313t cp38-cp38 pp311-pypy311_pp73 cp312-cp312 cp314-cp314 cp39-cp39 I'll try 313 first since it's recent and should be supported for a while. --- .circleci/config.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 64f0d29..ef50c9c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -315,8 +315,8 @@ workflows: # The image this executor uses comes with no ssh client. CircleCI # rewrites our git configuration to fetch sources over ssh. Then it # fails if we don't have any ssh client. - pre-command: "yum install -y openssh-clients; echo 'FLOFLO'; ls /opt/python" - python: "/opt/python/cp37-cp37m/bin/python" + pre-command: "yum install -y openssh-clients" + python: "/opt/python/cp313-cp313/bin/python" # This one can upload the sdist. upload-sdist: true filters: &FILTERS @@ -336,7 +336,7 @@ workflows: name: "package-manylinux_2_28-x86_64" executor: "manylinux_2_28-x86_64" pre-command: "yum install -y openssh-clients" - python: "/opt/python/cp37-cp37m/bin/python" + python: "/opt/python/cp313-cp313/bin/python" # The other one can upload the sdist. upload-sdist: false filters: From d3f7248e90036e6cc0a0bab1ede236c1557b055f Mon Sep 17 00:00:00 2001 From: Florian Sesser Date: Sun, 31 Aug 2025 19:09:21 +0000 Subject: [PATCH 11/13] Bump version to 2025.8.31 --- nix/python-challenge-bypass-ristretto.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nix/python-challenge-bypass-ristretto.nix b/nix/python-challenge-bypass-ristretto.nix index 2765661..11833c6 100644 --- a/nix/python-challenge-bypass-ristretto.nix +++ b/nix/python-challenge-bypass-ristretto.nix @@ -2,7 +2,7 @@ # Ristretto implementation. { libchallenge_bypass_ristretto_ffi, python, buildPythonPackage, milksnake, cffi, attrs, testtools, hypothesis }: buildPythonPackage rec { - version = "2024.11.5"; + version = "2025.8.31"; pname = "python-challenge-bypass-ristretto"; name = "${pname}-${version}"; src = ../.; From 0380ce4913111813330f9b8c8466a143b4a8cd67 Mon Sep 17 00:00:00 2001 From: Florian Sesser Date: Sun, 31 Aug 2025 19:35:24 +0000 Subject: [PATCH 12/13] Update macOS builders & README --- .circleci/config.yml | 6 ++++-- README.md | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index ef50c9c..652a7c5 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -353,7 +353,9 @@ workflows: - "14.3.1" # macOS 14.3.1 with xcode... - "15.4.0" - # macOS 14.6.1 with xcode... - - "16.1.0" + # macOS 15.3.2 with xcode... + - "16.4.0" + # macOS 15.5 with xcode... + - "26.0.0" filters: <<: *FILTERS diff --git a/README.md b/README.md index 04b9431..8d95e44 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ QxE220HfZvvOJSNdDx3hgYNfQntxeT+mkRr55LNMNyYdXdFOfkrHRoQz+MXlqfyoiWPWc7dG3k4sa5ZW # How to install -Binary wheels for Linux (manylinux2010), macOS, and Windows are distributed on PyPI. +Binary wheels for Linux (manylinux2014), macOS, and Windows are distributed on PyPI. ``` pip install python-challenge-bypass-ristretto From 0bb376931a71c18c755503754409150d80911c17 Mon Sep 17 00:00:00 2001 From: Florian Sesser Date: Sun, 31 Aug 2025 19:55:58 +0000 Subject: [PATCH 13/13] naersk has gained fenix as a new input; use the one we already require. --- flake.lock | 43 +++---------------------------------------- flake.nix | 1 + 2 files changed, 4 insertions(+), 40 deletions(-) diff --git a/flake.lock b/flake.lock index 971d9fb..3b654dd 100644 --- a/flake.lock +++ b/flake.lock @@ -21,28 +21,6 @@ "type": "github" } }, - "fenix_2": { - "inputs": { - "nixpkgs": [ - "naersk", - "nixpkgs" - ], - "rust-analyzer-src": "rust-analyzer-src_2" - }, - "locked": { - "lastModified": 1752475459, - "narHash": "sha256-z6QEu4ZFuHiqdOPbYss4/Q8B0BFhacR8ts6jO/F/aOU=", - "owner": "nix-community", - "repo": "fenix", - "rev": "bf0d6f70f4c9a9cf8845f992105652173f4b617f", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "fenix", - "type": "github" - } - }, "libchallenge_bypass_ristretto_ffi-src": { "flake": false, "locked": { @@ -61,7 +39,9 @@ }, "naersk": { "inputs": { - "fenix": "fenix_2", + "fenix": [ + "fenix" + ], "nixpkgs": [ "nixpkgs" ] @@ -120,23 +100,6 @@ "repo": "rust-analyzer", "type": "github" } - }, - "rust-analyzer-src_2": { - "flake": false, - "locked": { - "lastModified": 1752428706, - "narHash": "sha256-EJcdxw3aXfP8Ex1Nm3s0awyH9egQvB2Gu+QEnJn2Sfg=", - "owner": "rust-lang", - "repo": "rust-analyzer", - "rev": "591e3b7624be97e4443ea7b5542c191311aa141d", - "type": "github" - }, - "original": { - "owner": "rust-lang", - "ref": "nightly", - "repo": "rust-analyzer", - "type": "github" - } } }, "root": "root", diff --git a/flake.nix b/flake.nix index f609fbb..cde174f 100644 --- a/flake.nix +++ b/flake.nix @@ -23,6 +23,7 @@ naersk = { url = "github:nix-community/naersk"; inputs.nixpkgs.follows = "nixpkgs"; + inputs.fenix.follows = "fenix"; }; }; outputs =