I am trying to encrypt some data with AES in java.
Till now I have successfully encrypted the data with a 128 bit key.
For 256 bit encryption I need to change my policy files which is not an option for me.
I referred this SO Q/A too.
Tried BouncyCastle but it seems they don't have any provision for 256 bit keys(
1st question
here
).
Had a look at JNCryptor. But don't know if its a good source or not.(BouncyCastle is approved by FIPS)
Also Reflection is not an option since it violates JAVA licence agreement.
So if someone could guide me to the relevant question or share a possible solution I'll be glad.
AES-256 encryption in Java without changing policy files
1k Views Asked by YetAnotherBot At
1
There are 1 best solutions below
Related Questions in JAVA
- Add image to JCheckBoxMenuItem
- How to access invisible Unordered List element with Selenium WebDriver using Java
- Inheritance in Java, apparent type vs actual type
- Java catch the ball Game
- Access objects variable & method by name
- GridBagLayout is displaying JTextField and JTextArea as short, vertical lines
- Perform a task each interval
- Compound classes stored in an array are not accessible in selenium java
- How to avoid concurrent access to a resource?
- Why does processing goes slower on implementing try catch block in java?
- Redirect inside java interceptor
- Push toolbar content below statusbar
- Animation in Java on top of JPanel
- JPA - How to query with a LIKE operator in combination with an AttributeConverter
- Java Assign a Value to an array cell
Related Questions in ENCRYPTION
- How to customize the output of the Postgres Pseudo Encrypt function?
- encrypted email with entrust certificate is not opening with MS Outlook
- Encrypting with Crypto Node.js and decrypt with window.crypto in Service-Worker
- How to decrypt identity section in web config?
- An exception of type 'System.Security.Cryptography.CryptographicException': keyset does not exist
- IBM DB2 native encryption applied on live database
- crypto.BadPaddingException: data hash wrong (EKYC-Response)
- searchable row level encryption using java?
- AES 256 and Base64 Encrypted string works on iOS 8 but truncated on iOS 7
- Decrypted string returns "Length of the data to decrypt is invalid"
- Storing Encryption Key in Application
- Decryption password Encrypted using Encryptbypassphrase of SQL Server in Java
- Using HTTPS or encrypt response myself
- Encrypting (large) files in PHP with openSSL
- Writing a code to decrypt message from a text file
Related Questions in AES
- Do I have to randomize key in OpenSSL
- AES 256 and Base64 Encrypted string works on iOS 8 but truncated on iOS 7
- Encrypting (large) files in PHP with openSSL
- 32-character PHP AES Key for mcrypt_encrypt
- Javascript library forge does not work in Internet Explorer IE8
- ImportError: No module named Crypto
- AES CBC - Have message input and output and IV and have to find key
- AES with PKCS#5 padding
- Sage Pay Forms V3.00 AES-128 Encryption VB.Net
- C# AES and RSA File Encryption - How to use IV?
- Sagepay 2.22 to 3.00 form upgrade - PHP update to AES encryption
- vb.net AES decryption returns "data is incomplete block"
- Symmetric encryption (AES) in Apache Thrift
- Can I specify the nonce and counter in AES encryption counter mode?
- Encryption decryption with AES Crypto-JS does not work in an android webview?
Related Questions in JCE
- Key length must be between 40 and 1024 bit
- AES with PKCS#5 padding
- Jsch not working with certain sftp servers
- Provider-independent crypto in Java?
- Encrypting and decrypting a file using CipherInputStream and CipherOutputStream
- Prime size must be multiple of 64, and can only range from 512 to 1024 (inclusive) also with JCE Unlimited Strength Extension
- Storing persistent encryption keys
- Maven build fails while using JCE with " The jurisdiction policy files are not signed by a trusted signer!"
- Exception while file signing using HSM and SUNPKCS11
- IllegalBlockSizeException trying to decrypt string
- Why is a SecretKeySpec needed when deriving a key from a password in Java?
- Does this use 256-bit AES encryption?
- Java Crypto Api - how to choose a cipher provider
- Unit testing encrypt/decrypt with some salt located in different code bases
- How to add new ciphersuites to Bouncycastle TLS or JCE?
Related Questions in POLICYFILES
- Java RMI 'java.rmi.ConnectException: Connection refused to host: 127.0.1.1;'
- java.util.PropertyPermission when a applet error occurs
- Java SecurityManager: Good introduction to policy files
- Java Policy file - Deny permissions to a codebase
- Can't get .NET Policy DLL to redirect application to newer assembly
- Is possible Run Java Applet without edit java.policy file?
- FlashSocket.IO, policyfile and Socket.IO Error : Failed to load policy file from xmlsocket://localhost:843
- Is it possible to remove a Publisher Policy file?
- Programmatically grant Permissions without using policy file
- How to grant print permission to my applet without modifying java.policy file
- setting SecurityManager Permissions from the java code
- How can I add policy file to the jar applet which is embedded in html file
- .NET Assembly Binding How/Why (1.1, 2.0, GAC, Policy Files and more...)
- Storing DLL's in A Central NON GAC Location
- Disabling Java's unlimited strength policy file
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
There is nothing wrong or insecure about a 128-bit AES key, it is not brute forcible. A 256-bit is not going to provide anymore security, a successful attack will be in another area.
The thing to make sure of is the quality of the key, use a cryptographically secure random number generator (CSPRNG) or derive the key from a really good password with PBKDF2.
Properly authenticate the encryption: encrypt and then MAC.
Use a random IV in CBC mode and do not report padding errors.