Skip to main content
Should You Switch to AFS S-Boxes?Cryptography Fundamentals
3 min readFor Payment Security Engineers

Should You Switch to AFS S-Boxes?

If you're involved with the cryptographic components of payment systems, you've likely heard about ARX-based S-boxes. Whether your team is exploring lightweight encryption for contactless payments or reviewing new HSM primitives, someone might have asked: "What about these new AFS S-boxes?"

Here's what you need to know.

Understanding the Buzz Around AFS S-Boxes

Interest in AFS S-boxes surged after researchers showed that this new family offers better resistance to single-trail differential and linear cryptanalysis than existing components like SPECKEY and Alzette. This is significant because Alzette is used in SPARKLE, a permutation found in lightweight authenticated encryption schemes.

These questions aren't just theoretical. If you're selecting cryptographic primitives for resource-constrained environments like contactless cards or mobile wallets, you need to determine if AFS offers a real security improvement or is just incremental research.

What Are ARX-Based S-Boxes?

ARX stands for Addition-Rotation-XOR, the building blocks of many lightweight cryptographic algorithms. An S-box (substitution box) provides the nonlinearity needed to resist cryptanalysis.

ARX-based designs are efficient in both hardware and software without needing lookup tables, which is crucial for constrained devices. If you've worked with EMV contactless or IoT payment endpoints, you've likely used ARX-based primitives. AFS S-boxes aim to improve security margins without losing efficiency.

How Does AFS Compare to Current Solutions?

Research shows AFS instances offer better resistance to single-trail differential and linear cryptanalysis than SPECKEY and Alzette. Specifically, they provide tighter linear bounds for up to 15 rounds and differential bounds for up to 14 rounds using a hybrid search strategy called SMCS.

"Strictly better" means the mathematical upper bounds on an attacker's success probability are lower. If your system needs to resist differential cryptanalysis, tighter bounds enhance your security margin. Importantly, AFS maintains comparable hardware and software costs to existing designs.

Should You Switch from SPARKLE?

Evaluate your situation before switching. SPARKLE uses Alzette, and research shows replacing it with AFS improves cryptanalytic security margins. However, "substantial" improvements in research don't always mean immediate operational changes.

Consider:

  • Are you designing a new system or maintaining an existing one?
  • Does your threat model focus on theoretical or observed attacks?
  • What's the migration cost versus security gain?

If you're designing a new lightweight encryption scheme, evaluating AFS is wise. For deployed systems meeting current security needs, there's no urgent need to switch unless practical attacks emerge.

Do You Need to Understand SMCS?

SMCS is a hybrid search strategy combining MILP-based optimization with SMT-based model checking. It's the analysis method, not something you'd implement. You don't need to understand it unless you're doing cryptographic research.

What matters is that SMCS allowed researchers to compute tighter bounds than before, making AFS security claims more rigorous. Think of it like FIPS 140-3 validation: you don't need to know the proof methodology, just whether a module passed.

How to Evaluate AFS for Your Stack

Start by reviewing your cryptographic inventory. Identify where you're using ARX-based primitives:

  • Lightweight authenticated encryption in embedded systems
  • Cryptographic acceleration in constrained environments
  • Custom protocol implementations

Then assess:

  1. Threat model alignment: Does improved resistance to differential and linear cryptanalysis address your risks?
  2. Implementation constraints: Can you integrate AFS without breaking compatibility or performance?
  3. Validation requirements: Has AFS been through FIPS 140-3 or PCI PTS certification?

For most teams, the answer isn't "switch everything now." It's "evaluate AFS for new designs and track its adoption in validated libraries."

What About Performance?

Research indicates AFS has comparable hardware and software costs to existing designs. That's the goal of ARX-based approaches: efficiency.

However, "comparable" in research doesn't always mean "identical in your environment." Before committing to AFS:

  • Benchmark it in your deployment environment
  • Test it under your operational load
  • Verify it meets your latency requirements

If you're processing card-present transactions with strict timing, even small performance differences matter. Don't assume research benchmarks apply directly to your architecture.

Next Steps

If you're evaluating cryptographic primitives, access the full technical paper on AFS for specific bounds and configurations. Track whether AFS is integrated into validated libraries you use. Watch for guidance from NIST and PCI SSC on ARX-based primitives.

When selecting components for a new system, consult your cryptographic vendor. Ask if they've evaluated AFS, their integration timeline, and how it affects your validation schedule. The best cryptographic component is useless if it delays your certification by six months.

You Might Also Like