Using Korean Cryptographic Algorithms in .NET (SEED, ARIA, HIGHT, etc.)

고남현 @gnh1201@hackers.pub

When trying to use "Korean cryptographic algorithms" (a term referring to encryption algorithms developed and distributed in Korea, such as SEED) in a .NET development environment... there wasn't much useful implementation available.

The few publicly available implementations were direct conversions of the official code without test vector verification, resulting in questionable source code circulating around.

Without verification against official test vectors, even directly converted code might compile without errors and perform encryption/decryption, but could potentially become an unknown algorithm completely different from the official specification.

There were many issues with these implementations, such as padding that didn't use known standards but simply filled empty spaces without explaining why such padding methods were chosen.

Therefore, I focused on creating implementations that:

  1. Port smoothly to .NET
  2. Have been verified against test vectors at minimum
  3. Can be used in modern systems
  4. Won't cause disagreements among people due to language choice

Particularly because of point , I uniquely chose VB.NET for this project. Being based on .NET Standard 2.0, it can be referenced by .NET projects written in other languages.

Currently, I've successfully implemented the ECB mode for SEED, ARIA, and HIGHT algorithms. LEA, which is relatively newer, will be supported in the future.

Support for other operation modes will be provided through separate technical support if needed.

For those interested in examining the development process, please refer to this issue link:

https://github.com/gnh1201/welsonjs/issues/293

The source code can be found in the "WelsonJS.Cryptography" and "WelsonJS.Cryptography.Test" directories at:

https://github.com/gnh1201/welsonjs/tree/cryptography/WelsonJS.Toolkit

5

No comments

If you have a fediverse account, you can comment on this article from your own instance. Search https://hackers.pub/ap/articles/01983d1f-3188-720e-8cd9-03079f95e9f8 on your instance and reply to it.