{
  "id": "2025/366",
  "url": "https://opencryptology.org/2025/366",
  "original_url": "https://eprint.iacr.org/2025/366",
  "title": "Enabling Microarchitectural Agility: Taking ML-KEM & ML-DSA from Cortex-M4 to M7 with SLOTHY",
  "authors": [
    "Amin Abdulrahman",
    "Matthias J. Kannwischer",
    "Thing-Han Lim"
  ],
  "affiliations": null,
  "abstract": "Highly-optimized assembly is commonly used to achieve the best performance for popular cryptographic schemes such as the newly standardized ML-KEM and ML-DSA.\nThe majority of implementations today rely on hand-optimized assembly for the core building blocks to achieve both security and performance.\nHowever, recent work by Abdulrahman et al. takes a new approach, writing a readable base assembly implementation first and leaving the bulk of the optimization work to a tool named SLOTHY based on constraint programming. \nSLOTHY performs instruction scheduling, register allocation, and software pipelining simultaneously using constraints modeling the architectural and microarchitectural details of the target platform.\n\nIn this work, we extend SLOTHY and investigate how it can be used to migrate already highly hand-optimized assembly to a different microarchitecture, while maximizing performance.\nAs a case study, we optimize state-of-the-art Arm Cortex-M4 implementations of ML-KEM and ML-DSA for the Arm Cortex-M7. \n\nOur results suggest that this approach is promising: \nFor the number-theoretic transform (NTT) – the core building block of both ML-DSA and ML-KEM – we achieve speed-ups of $1.97\\times$ and $1.69\\times$, respectively.\nFor Keccak – the permutation used by SHA-3 and SHAKE and also vastly used in ML-DSA and ML-KEM – we achieve speed-ups of 30% compared to the M4 code and 5% compared to hand-optimized M7 code.\nFor many other building blocks, we achieve similarly significant speed-ups of up to $2.35\\times$. \nOverall, this results in 11 to 33% faster code for the entire cryptosystems.",
  "category": "Implementation",
  "license": {
    "code": "CC BY",
    "url": "https://creativecommons.org/licenses/by/4.0/",
    "label": "CC BY 4.0",
    "attribution": "“Enabling Microarchitectural Agility: Taking ML-KEM & ML-DSA from Cortex-M4 to M7 with SLOTHY” by Amin Abdulrahman, Matthias J. Kannwischer, Thing-Han Lim, Cryptology ePrint Archive, Paper 2025/366, https://eprint.iacr.org/2025/366. Licensed under CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/).",
    "retroactive": false,
    "redistribute_verbatim_only": false,
    "non_commercial": false
  },
  "dates": {
    "submitted": "2025-02-26T10:18:20Z",
    "updated": "2025-06-18T09:15:00Z",
    "withdrawn": null
  },
  "withdrawn": false,
  "withdrawn_on": null,
  "pdf": {
    "url": "https://opencryptology.org/2025/366.pdf",
    "sha256": "04cff4c473d80e0dbbfd3e6ecf500be26b2c5a2bb4a369b69c52011f6807baac",
    "size": 647315,
    "source": "github-mirror",
    "source_date": "2026-04-28T17:20:00Z",
    "maybe_stale": false,
    "newer_on_eprint": null,
    "withdrawn": false
  },
  "versions": [
    {
      "url": "https://opencryptology.org/2025/366/versions/20260428T172000Z.pdf",
      "captured_at": "2026-04-28T17:20:00Z",
      "label": "copy captured 2026-04-28",
      "source": "github-mirror",
      "source_url": "https://raw.githubusercontent.com/arturo-kong/IACR-eprint-mirror/master/2025/366.pdf",
      "size": 647315,
      "sha256": "04cff4c473d80e0dbbfd3e6ecf500be26b2c5a2bb4a369b69c52011f6807baac",
      "is_default_pdf": true
    },
    {
      "url": "https://opencryptology.org/2025/366/versions/20250313T042304Z.pdf",
      "captured_at": "2025-03-13T04:23:04Z",
      "label": "copy captured 2025-03-13",
      "source": "wayback",
      "source_url": "https://web.archive.org/web/20250313042304id_/https://eprint.iacr.org/2025/366.pdf",
      "size": 626837,
      "sha256": "52e665477d3385a57d0fe35cce3ba8a3179bb15f734015ec157dc769bfa83808",
      "is_default_pdf": false
    }
  ],
  "other_sources": [
    {
      "kind": "wayback",
      "url": "https://web.archive.org/web/20260908073359id_/https://eprint.iacr.org/2025/366.pdf",
      "captured_at": "2026-09-08T07:33:59Z",
      "size": 633724
    },
    {
      "kind": "github-mirror",
      "url": "https://raw.githubusercontent.com/arturo-kong/IACR-eprint-mirror/master/2025/366.pdf",
      "captured_at": "2026-04-28T17:20:00Z",
      "size": 647315
    }
  ],
  "bibtex": "@misc{cryptoeprint:2025/366,\n      author = {Amin Abdulrahman and Matthias J. Kannwischer and Thing-Han Lim},\n      title = {Enabling Microarchitectural Agility: Taking ML-KEM & ML-DSA from Cortex-M4 to M7 with SLOTHY},\n      howpublished = {Cryptology {ePrint} Archive, Paper 2025/366},\n      year = {2025},\n      url = {https://eprint.iacr.org/2025/366}\n}"
}
