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
Simple AES128/192/256 in Java
License: The Unlicense
tiny-AES/src/ru/tehcpu/tinyaes/core/AES.java
Lines 151 to 155 in d11fef5
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];
}
}
tiny-AES/src/ru/tehcpu/tinyaes/core/AES.java
Lines 99 to 101 in d11fef5
I think it is
for (int i = 0; i < key.length; i++) {
this.key[i] = key[i];
}
Any plans to implement padding for binary data? Also the padding must be removed after decryption?
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?
I don't think it's worked with AES-128 and AES-192.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.