Code Monkey home page Code Monkey logo

tiny-aes's Introduction

Tiny AES in Java

This is a small and simple implementation of the AES ECB and CBC encryption algorithm written in Java.

You can use 128, 192 and 256 bit key. See the example in the Main.java. TODO Optimization, refactor

tiny-aes's People

Contributors

tehcpu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

tiny-aes's Issues

Array length?

for (int i = 0; i < in.length; i++) {
for (int j = 0; j < in[0].length; j++) {
out[i][j] = in[i][j];
}
}

isnt this the correct way?

 for (int i = 0; i < in.length; i++) { 
     for (int j = 0; j < in.length; j++) { 
         out[i][j] = in[i][j]; 
     } 
} 

AES 256-CBC not "NIST" compliant

https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-38a.pdf

NIST Test-Vektoren    CBC-AES256.Encrypt
Key: 603deb1015ca71be2b73aef0857d77811f352c073b6108d72d9810a30914dff4 
IV:  000102030405060708090a0b0c0d0e0f 
Block #1 
Plaintext 		6bc1bee22e409f96e93d7e117393172a 
Input Block 	6bc0bce12a459991e134741a7f9e1925 
Output Block 	f58c4c04d6e5f1ba779eabfb5f7bfbd6 
Ciphertext 	f58c4c04d6e5f1ba779eabfb5f7bfbd6 

yout Cipher : 900f361bf51e7ece007e87294ba5062f

Why is your AES calculation not the same?

It's useless?

I don't think it's worked with AES-128 and AES-192.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.