A new BUG or user problem?


    Hello gents,

    I had some spare time today and decided to give this app/tool a quick try. I picked up a simple plain text file from my desktop and chose the AES encryption for test. At password prompt I enter a PIN aka 4 digits. Outcome was: "The initialization of the encryption progress failed". My system is a Lenovo T420 running RHEL (see below).

    $ uname -mr
    2.6.32-279.9.1.el6.x86_64 x86_64
    $ cat /etc/redhat-release
    Red Hat Enterprise Linux Workstation release 6.3 (Santiago)
    $ java -version
    java version "1.7.0_07"
    Java(TM) SE Runtime Environment (build 1.7.0_07-b10)
    Java HotSpot(TM) 64-Bit Server VM (build 23.3-b01, mixed mode)

    Actual console output ( I was in gnome-terminal at launch time ) :
    $ java -jar jfilecrypt-030t.jar
    java.security.InvalidKeyException: Invalid AES key length: 34 bytes
    at com.sun.crypto.provider.AESCipher.engineGetKeySize(AESCipher.java:372)
    at javax.crypto.Cipher.passCryptoPermCheck(Cipher.java:1052)
    at javax.crypto.Cipher.checkCryptoPerm(Cipher.java:1023)
    at javax.crypto.Cipher.implInit(Cipher.java:790)
    at javax.crypto.Cipher.chooseProvider(Cipher.java:849)
    at javax.crypto.Cipher.init(Cipher.java:1348)
    at javax.crypto.Cipher.init(Cipher.java:1282)
    at net.sourceforge.jfilecrypt.algorithms.JCEAlgorithm.initEncrypt(Unknown Source)
    at net.sourceforge.jfilecrypt.Model$1.run(Unknown Source)
    # here is where the error window pops up ^

    Any ideas? Should I use a longer password?
    Regards, Paul.


    UPDATE: It was a user problem. For AES password length should be 16. A user input validation would be nice though.