aes

S-Box used in AES 128 bit CFB mode of encryption

Hi Can anybody give me the S-Box used for 128 bit AES CFB mode of encryption. Will this S-Box be same for every 128 -bit AES CFB Implementation. Thanks ...

128 bit key AES encrypting application in java

i need to create an application in java that would convert text strings into codes based on 128bit AES encryption.. ideally i would prefer that i only need to create a gui and the AES encryption part is already written. the application is need to be run in both linux and windows . kindly advice me on existing libraries and anything relat...

invalid AES key length error

this code give invalid AES key length error. how can i correct it ? ( i want 128 bit key AES encryption ) package org.temp2.cod1; import java.security.*; import javax.crypto.*; import javax.crypto.spec.*; import java.io.*; public class Code1 { public static void main(String[] args) throws NoSuchAlgorithmException, NoSuchPaddingEx...

whats happening in the line of code

whats happening in this line of code ? SecretKeyFactory factory = SecretKeyFactory.getInstance("PBKDF2WithHmacSHA1"); i specially dont understand getInstance("PBKDF2WithHmacSHA1") part ...

why should aes key be generated randomly ?

when you want to encrypt something dont you want the key to decrypt to be decided by you and not generator by some random number generator ? i see this code in stackoverflow post. but i dont want the key to be generated randomly i want to the user to be asked to enter the key and on that bases the encryption should happen.. any suggest...

AES encryption - password , salt not resolved ?

i get the error " password , salt not resolved ". any suggestions ? package org.temp2.cod1; import java.security.*; import java.security.spec.KeySpec; import javax.crypto.*; import javax.crypto.spec.*; import java.io.*; public class Code2 { public static void main(String[] args) throws NoSuchAlgorithmException, NoSuchPaddingException...

what is this error on open declaration ?

KeyGenerator kgen = KeyGenerator.getInstance("AES"); kgen.init(128); // 192 and 256 bits may not be available in eclipse when i select KeyGenerator and right click open declaration i get this window opened click here to see error image can you explain whats wrong here ? btw here is the complete code package org.temp2.cod1; ...

help understanding this comment .

I'm trying to understand this comment from AES implementation code: /** * This program generates a AES key, retrieves its raw bytes, and * then reinstantiates a AES key from the key bytes. * The reinstantiated key is used to initialize a AES cipher for * encryption and decryption. */ I dont understand following points: what doe...

how can the decryption happen at a later stage with this AES program

i am really not able to figure this out myself so please help me out. this is a program to encrypt contents of an existing file keeper.txt using 128bit AES putting the encrypted text into newly created file called Encrypted.txt, then decrypting the contents of Encrypted.txt into newly created file called Decrypted.txt everytime this pro...

please advice whether about our case of using encryption

Our client wants to give us a database. The original database has a phone number column. He doesn't want to give us a phone number. Somehow i'm not sure why - it is decided that client will give us encrypted phone numbers with encrypted with 128bit AES key. We will tell the client which phone number is to be shortlisted for some purpos...

Client server AES encryption

I am developing a client server application in which data is transferred between two clients through the server. The data should be encrypted and I thought of using AES. My thought was to use PBKDF2 in order to derive the AES key from the client's password. In this case the client will encode the data, the server will decode it, reenco...

AES 256 in CTR mode

ctr mode makes it possible to use a block cipher as a stream cipher but how strong will be the encryption in this mode ? ...

java - why do i keep getting -1 as the value of in.read(buf) ?

(To the Moderators ) please note that i had posted a related problem before but this is a more complete post so please dont close it as duplicate . you may close the previous post. whenever i get -1 in the console output no data is written in outputstream, whenever i get 3 in console output valid data is writtien in outputstream. the oc...

Missing numbers in the outputstream ( with Complete Details )

( To moderators - This is the 3rd related post of still unsolved problem , now i am posting with all details possible and after doing changes from previous post feedback , though this is a complete post and not dependent on previous 2 posts , if you think this is duplicate please delete the previous posts. thanks ) This is the code of t...

Getting the original secretkey from hex format

This is the hex format of a secret key used for AES encryption 00010203050607080A0B0C0D0F101112 Can i generate the original SecretKey format or byte array from this? If so how? ...

Code for encrypting/decrypting data using CFB 128 bit AES Encryption

Hi Can anyone give me code or links for sample 128 bit CFB type of AES IMplementation. Can it be written using .Net. If so can you please explain how. Thanks ...

What encryption scheme meets requirement of decimal plaintext & ciphertext and preserves length?

Hi, I need an encryption scheme where the plaintext and ciphertext are composed entirely of decimal digits. In addition, the plaintext and ciphertext must be the same length. Also the underlying encryption algorithm should be an industry-standard. I don't mind if its symmetric (e.g AES) or asymmetric (e.g RSA) - but it must be a recog...

Passphrase, Salt and IV, do I need all of these?

If I am using Rijndael CBC mode, I have no idea why we would need salt. My understanding is even if people know the password, but he cannot get the data without IV. So from my perspective, password + IV seem to be sufficent secure. Do I get anything wrong? ...

c# AES CBC using 2 methods to add 2 pieces of encypted data into one file

The key issue is if I use a new cryptostream it will add new IV to second piece of data. Then this wont be ablt to decrypted. So I need to make sure the stream will use the last block of 1st data to encrypt the first block of 2nd piece of data. It comes up with the task of using same stream to encyprt 2 piece of data. But I couldn't fig...

AES encryption - how to later decrypt the encrypted string ?

i have a java program . this is a AES encryption - decryption program. the program has a graphical user interface with can input string and show AES encrypted string. the program also shows original string by using decryption function written in the code. the interface is such that when string is entered and convert button is clicked the...