To build win32 DLL: - install Digital Mars C compiler (dmc) - make chacha8.def thus: LIBRARY "libchacha8.dll" DESCRIPTION "ChaCha8 stream cipher built by Digital Mars C compiler" EXETYPE NT SUBSYSTEM WINDOWS CODE SHARED EXECUTE DATA WRITE EXPORTS ECRYPT_init ECRYPT_keysetup ECRYPT_ivsetup ECRYPT_encrypt_bytes ECRYPT_decrypt_bytes ECRYPT_keystream_bytes getCtxSize isValidKeySize isValidIVSize getChunkSize - fm DOS box, compile with: dmc -WD chacha8.c ecrypt-plus.c - the above will produce "chacha8.DLL". For reasons of consistency, rename it to "libchacha8.dll"