Click here to Skip to main content
15,885,309 members
Articles / Programming Languages / C#

Simple Cryptographer - Simple DES/AES Implementation in C#

Rate me:
Please Sign up or sign in to vote.
2.81/5 (29 votes)
21 May 2007CPOL4 min read 292.3K   10.8K   55  
It's very simple and does not focus on performance, but I think that it is simple.
using System;
using System.Collections.Generic;
using System.Text;

namespace SimpleCryptographer.AES
{
    class Keys
    {
        public List<Matrix> RoundKeys = new List<Matrix>(11);

        public Keys()
        {            
        }

        public void setCipherKey(Matrix CipherKey)
        {
            if (RoundKeys.Count == 0)
            {
                this.RoundKeys.Add(CipherKey);
            }
            else
            {
                RoundKeys.Clear();
                RoundKeys.Add(CipherKey);
            }

            RoundKeys.Add(new Matrix(4, 4));
            RoundKeys.Add(new Matrix(4, 4));
            RoundKeys.Add(new Matrix(4, 4));
            RoundKeys.Add(new Matrix(4, 4));
            RoundKeys.Add(new Matrix(4, 4));
            RoundKeys.Add(new Matrix(4, 4));
            RoundKeys.Add(new Matrix(4, 4));
            RoundKeys.Add(new Matrix(4, 4));
            RoundKeys.Add(new Matrix(4, 4));
            RoundKeys.Add(new Matrix(4, 4));
        }
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Web Developer
Korea (Republic of) Korea (Republic of)
I'm a super-elementary programmer.
I live in Suwon, Republic of Korea.
And i'm not very good at English.
hahaha!!!

Comments and Discussions