[Cryptography] Bent, crooked, and twisted functions
Pierre Abbat
phma at bezitopo.org
Wed Sep 24 00:50:36 EDT 2025
On Monday, September 22, 2025 4:59:19 PM EDT Ferecides de Siros via
cryptography wrote:
> Pierre,
>
> I was fascinated by your email about crooked functions and decided to
> implement a Rust analysis tool based on your specifications. Thank you for
> sharing your research - I found the mathematical properties of APN
> functions incredibly interesting.
>
> Key Findings
> I analyzed several functions including your twisted function
> [0,2,4,5,1,6,3,7]:
>
> Results (n=3):
>
> Your twisted function: 57.1% APN score (4/7 perfect derivatives)
>
> Derivative counts: [4,4,2,4,2,2,4]
>
> Is permutation: ✓ true
>
> Other candidates scored lower (0-57.1%)
>
> Mathematical Verification:
>
> Perfect APN requires: [4,4,4,4,4,4,4] (all derivatives = 2^(n-1))
>
> Your function achieves 4 perfect derivatives out of 7
>
> While not perfectly crooked, it shows promising nonlinearity properties
>
> ------------
> The Tool
> -----------
> I've attached a complete Rust crate that provides:
There's no license file. May I translate it to Julia? I'm thinking of running
it on canonical twisted functions of many orders. (The canonical twisted
function of an order is the one without the xor and bit permutation steps.)
Also the Gold attempt and the quadratic function are the same.
> The code compiles cleanly and all tests pass. You can use it to analyze new
> function constructions by adding them to the TestFunctions struct.
I tried the canonical 4-bit twisted function and got this:
Four-bit Twisted:
S-box: [0, 2, 4, 12, 8, 5, 9, 11, 1, 6, 10, 13, 3, 14, 7, 15]
Is APN: false
Is permutation: true
Derivative counts: [3, 3, 3, 3, 3, 2, 3]
Perfect derivatives: 0/7
APN Score: 0.0%
Pierre
--
Por H o por B, los campos magnéticos se difieren dentro de un imán.
More information about the cryptography
mailing list