# Lightweight AES-128

> A compact C implementation of the AES-128 block primitive that operates on 16-byte blocks without heap allocation and exposes the round transformations and key schedule directly.

- Author: Muhammet Ali Köker
- Language: en
- Canonical: https://alikoker.com.tr/en/lightweight-aes-128-c
- Translation: https://alikoker.com.tr/lightweight-aes-128-c
- Published: 2021-01-15T12:00:00+03:00
- Modified: 2026-08-27T10:36:29+03:00
- Verified: 2026-08-27T10:36:29+03:00
- Type: project

The central boundary of this repository is the difference between an AES primitive and a secure encryption system. The code performs AES-128 transformations on a 16-byte block, expands the 128-bit key into the round-key schedule, and avoids heap allocation. S-box, inverse S-box and GF(2^8) operations are kept close to the algorithm so the primitive can be studied directly.

What is absent matters just as much. The project does not provide CBC/CTR/GCM mode handling, authentication, padding, a KDF, nonce or IV policy, or secure key storage. Table lookups also mean the implementation should not be assumed constant-time or resistant to side-channel analysis. Production systems should normally rely on audited platform cryptography rather than treating this source as a drop-in security stack.

The publication metadata also records the provenance relationship to tiny-AES-c through the repository's NOTICE/licensing material. That keeps upstream material and local adaptation distinct.

Technical article: [A Lightweight AES-128 Implementation in C](/en/lightweight-aes-128-implementation-in-c)  
Source: [GitHub](https://github.com/alikoker/lightweight-aes-128-c)  
Zenodo archive: [Zenodo](https://zenodo.org/records/22117428)  
DOI: [DOI](https://doi.org/10.5281/zenodo.22117428)

## Cite This Work

Köker, M. A. (2021). Lightweight AES-128. alikoker.com.tr. https://alikoker.com.tr/en/lightweight-aes-128-c

- BibTeX: https://alikoker.com.tr/en/lightweight-aes-128-c.bib
- RIS: https://alikoker.com.tr/en/lightweight-aes-128-c.ris
- CSL-JSON: https://alikoker.com.tr/en/lightweight-aes-128-c.csl.json
