Pages

This tutorial covers the basics of the science of cryptography. It explains how programmers and network professionals can use cryptography to maintain the privacy of computer data. Starting with the origins of cryptography, it moves on to explain cryptosystems, various traditional and modern ciphers, public key encryption, data integration, message authentication, and digital signatures.

Wednesday 30 December 2015

[SOLVED] org.bouncycastle.jcajce.provider.symmetric.util.BaseBlockCipher$1: Key length not 128/192/256 bits.

SOURCE
 ----- 
Security.addProvider(new org.bouncycastle.jce.provider.BouncyCastleProvider());
 byte[] input = "Hello".getBytes();
 byte[] keyByte = "1234567812345678123456781234567".getBytes();
 SecretKeySpec key = new SecretKeySpec(keyByte, "AES");
----
ERROR
Dec 31, 2015 11:57:52 AM aes256.AES256 main
SEVERE: null
org.bouncycastle.jcajce.provider.symmetric.util.BaseBlockCipher$1: Key length not 128/192/256 bits.
at org.bouncycastle.jcajce.provider.symmetric.util.BaseBlockCipher.engineInit(Unknown Source)
at org.bouncycastle.jcajce.provider.symmetric.util.BaseBlockCipher.engineInit(Unknown Source)
at javax.crypto.Cipher.init(Cipher.java:1246)
at javax.crypto.Cipher.init(Cipher.java:1186)
at aes256.AES256.main(AES256.java:36)
Caused by: java.lang.IllegalArgumentException: Key length not 128/192/256 bits.
at org.bouncycastle.crypto.engines.AESFastEngine.generateWorkingKey(Unknown Source)
at org.bouncycastle.crypto.engines.AESFastEngine.init(Unknown Source)
at org.bouncycastle.crypto.paddings.PaddedBufferedBlockCipher.init(Unknown Source)
at org.bouncycastle.jcajce.provider.symmetric.util.BaseBlockCipher$BufferedGenericBlockCipher.init(Unknown Source)
... 5 more
BUILD SUCCESSFUL (total time: 1 second)
SOLUTION
Key Leng AES must 128 / 192 / 256 bit or 16 / 24 / 32 Character 
 Security.addProvider(new org.bouncycastle.jce.provider.BouncyCastleProvider());
 byte[] input = "Hello".getBytes();
 byte[] keyByte = "12345678123456781234567812345678".getBytes();
 SecretKeySpec key = new SecretKeySpec(keyByte, "AES");



Tuesday 29 December 2015

Encrpt And Decrypt Using AES 256 in Java

Name Algorithm
AES 256
Type Algorithm
Block Cipher
Key Length
256 bit / 32 Character
Link Video Encrypt and Decrypt Using AES 256 in Java
https://youtu.be/NS0QBDq9PfA


Monday 30 November 2015

Encrypt And Decrypt Using Blowfish in C++

Name Algorithm
Blowfish
Type Algorithm
Block Cipher
Key Length
128 bit / 16 Character
Block Size
64 bit / 8 Character
Link Tutorial Encrypt And Decrypt Using Blowfish in C++
https://youtu.be/5Av0FqFdfGU

Wednesday 25 November 2015

Encrypt And Decrypt Using Twofish 256 In C++

Name Algorithm
Twofish
Designer
Bruce Schneier, John Kelsey, Doug Whiting, David Wagner, Chris Hall, and Niels Ferguson
Type Algorithm
Symetric Key Block Cipher
Key Length
In Hire, I am Implement 256 bits / 32 Character
Block Size
128 bits
Vidio Tutorial Encrypt And Decrypt Using Twofish In C++
https://youtu.be/yiH6BLwiyN8


C++ QT DES Algorithm

Wednesday 18 November 2015

Building Botan Library On Windows 10

We show you how to build librery crypto c++ Botan on windows 10. Before you build you must install visual studio 2010, python 2.7 And Download Botan at http://botan.randombit.net/

Tuesday 17 November 2015