# ndec-re: reconstructing an MS-DOS encryption program

> ndec-re investigates an old MS-DOS COM encryption program through debugger-assisted assembly analysis and implements its encryption behavior in Go. The write-up traces the program's copied code, password-derived gamma and hashes, self-modifying instruction choice, initialization byte and mixing rounds. The repository also contains the original COM file and Go tests.

- Type: Case study
- Targets: Binary
- Category: Independent reconstruction cases
- Relationship: Independent reconstruction project
- Sources reviewed: 2026-11-07
- Added to the catalog: 2026-11-09
- Original resource: <https://github.com/bereal/ndec-re>
- Primary source: <https://github.com/bereal/ndec-re/blob/12ae44a128fb14dd2c4453a3b2dbe08b336f7cc7/README.md>
- Catalog page: <https://awesomerea.org/resources/ndec-re-case/>
- Record JSON: <https://awesomerea.org/resources/ndec-re-case/record.json>
- Chinese version: [简体中文](https://awesomerea.org/zh/resources/ndec-re-case/index.md)

## Requirements & limits

- **Prerequisites:** Go 1.21 is declared in go.mod for the reimplementation.
- **Limits:** The author leaves parts of the unpacking and exact algorithm marked for further work.
- **License:** No licence file in the repository.

## Primary sources

1. <https://github.com/bereal/ndec-re/blob/12ae44a128fb14dd2c4453a3b2dbe08b336f7cc7/README.md>

## More in Native binaries

- [re-sysinternals-suite: rebuilding Sysinternals strings.exe](https://awesomerea.org/resources/re-sysinternals-strings-case/index.md) · Case study
- [ExCrypt: reconstructing Xbox 360 XeCrypt functions](https://awesomerea.org/resources/excrypt-case/index.md) · Case study
- [L1J-Encode-CLI: reconstructed Lineage 1 ServerData codec](https://awesomerea.org/resources/l1j-encode-cli-case/index.md) · Case study
- [Wirenet Reverse Engineering: analysing a Linux trojan](https://awesomerea.org/resources/wirenet-analysis-case/index.md) · Case study
- [SNES Station: reconstructing the PS2 emulator executable](https://awesomerea.org/resources/snes-station-decomp-case/index.md) · Case study
- [RFL: decompiling the Wii Mii library](https://awesomerea.org/resources/rfl-wii-mii-library-case/index.md) · Case study

## About this entry

The description was reviewed against primary sources.
Original editorial content: MIT. Linked projects, papers and assets retain their own rights and licenses.
