Hitachi Vantara Pentaho Community Forums
Results 1 to 5 of 5

Thread: Symmetric Cryptography - AES256

  1. #1

    Default Symmetric Cryptography - AES256

    I want to implement AES-256 encryption in a Symmetric-key Cryptography. I've been looking for documentation on how to do it, but I still am not 100% on what to do.

    What do I need to do within the Symmetric-key Cryptography step to make AES-256 work?

  2. #2
    Join Date
    Apr 2008
    Posts
    4,696

    Default

    http://wiki.pentaho.com/display/EAI/...c+Cryptography

    Apparently you need JCE for AES-256

  3. #3

    Default

    I did exactly as it said. I copied the files for my specific files into my JCE "C:\Program Files\Java\jre1.8.0_144\lib\security" folder. I created a AES-256 passkey and I'm getting getting an

    2017/10/20 10:55:50 - Symmetric Cryptography: Last Name.0 - ERROR (version 7.1.0.0-12, build 1 from 2017-05-16 17.18.02 by buildguy) : Unexpected error
    2017/10/20 10:55:50 - Symmetric Cryptography: Last Name.0 - ERROR (version 7.1.0.0-12, build 1 from 2017-05-16 17.18.02 by buildguy) : org.pentaho.di.trans.steps.symmetriccrypto.symmetricalgorithm.CryptoException:
    2017/10/20 10:55:50 - Symmetric Cryptography: Last Name.0 - java.security.InvalidKeyException: Illegal key size or default parameters
    2017/10/20 10:55:50 - Symmetric Cryptography: Last Name.0 - Illegal key size or default parameters
    2017/10/20 10:55:50 - Symmetric Cryptography: Last Name.0 -
    2017/10/20 10:55:50 - Symmetric Cryptography: Last Name.0 - at org.pentaho.di.trans.steps.symmetriccrypto.symmetricalgorithm.SymmetricCrypto.setEncryptMode(SymmetricCrypto.java:97)
    2017/10/20 10:55:50 - Symmetric Cryptography: Last Name.0 - at org.pentaho.di.trans.steps.symmetriccrypto.symmetriccryptotrans.SymmetricCryptoTrans.setSecretKey(SymmetricCryptoTrans.java:248)
    2017/10/20 10:55:50 - Symmetric Cryptography: Last Name.0 - at org.pentaho.di.trans.steps.symmetriccrypto.symmetriccryptotrans.SymmetricCryptoTrans.processRow(SymmetricCryptoTrans.java:111)
    2017/10/20 10:55:50 - Symmetric Cryptography: Last Name.0 - at org.pentaho.di.trans.step.RunThread.run(RunThread.java:62)
    2017/10/20 10:55:50 - Symmetric Cryptography: Last Name.0 - at java.lang.Thread.run(Unknown Source)
    2017/10/20 10:55:50 - Symmetric Cryptography: Last Name.0 - Caused by: java.security.InvalidKeyException: Illegal key size or default parameters
    2017/10/20 10:55:50 - Symmetric Cryptography: Last Name.0 - at javax.crypto.Cipher.checkCryptoPerm(Cipher.java:1026)
    2017/10/20 10:55:50 - Symmetric Cryptography: Last Name.0 - at javax.crypto.Cipher.implInit(Cipher.java:801)
    2017/10/20 10:55:50 - Symmetric Cryptography: Last Name.0 - at javax.crypto.Cipher.chooseProvider(Cipher.java:864)
    2017/10/20 10:55:50 - Symmetric Cryptography: Last Name.0 - at javax.crypto.Cipher.init(Cipher.java:1249)
    2017/10/20 10:55:50 - Symmetric Cryptography: Last Name.0 - at javax.crypto.Cipher.init(Cipher.java:1186)
    2017/10/20 10:55:50 - Symmetric Cryptography: Last Name.0 - at org.pentaho.di.trans.steps.symmetriccrypto.symmetricalgorithm.SymmetricCrypto.setEncryptMode(SymmetricCrypto.java:95)
    2017/10/20 10:55:50 - Symmetric Cryptography: Last Name.0 - ... 4 more

    So I tried to add the Cipher to the Source
    Name:  Symmetric Cryptography- Last Name.jpg
Views: 303
Size:  24.6 KB

    This yielded a different exception

    2017/10/20 11:13:16 - Symmetric Cryptography: Last Name.0 - ERROR (version 7.1.0.0-12, build 1 from 2017-05-16 17.18.02 by buildguy) : org.pentaho.di.trans.steps.symmetriccrypto.symmetricalgorithm.CryptoException:
    2017/10/20 11:13:16 - Symmetric Cryptography: Last Name.0 - Cipher error
    2017/10/20 11:13:16 - Symmetric Cryptography: Last Name.0 -
    2017/10/20 11:13:16 - Symmetric Cryptography: Last Name.0 - at org.pentaho.di.trans.steps.symmetriccrypto.symmetricalgorithm.SymmetricCrypto.<init>(SymmetricCrypto.java:89)
    2017/10/20 11:13:16 - Symmetric Cryptography: Last Name.0 - at org.pentaho.di.trans.steps.symmetriccrypto.symmetriccryptotrans.SymmetricCryptoTrans.init(SymmetricCryptoTrans.java:226)
    2017/10/20 11:13:16 - Symmetric Cryptography: Last Name.0 - at org.pentaho.di.trans.step.StepInitThread.run(StepInitThread.java:69)
    2017/10/20 11:13:16 - Symmetric Cryptography: Last Name.0 - at java.lang.Thread.run(Unknown Source)
    2017/10/20 11:13:16 - Symmetric Cryptography: Last Name.0 - ERROR (version 7.1.0.0-12, build 1 from 2017-05-16 17.18.02 by buildguy) : Error initializing step [Symmetric Cryptography: Last Name]

    At this point I don't know what to do.....

  4. #4
    Join Date
    Apr 2008
    Posts
    4,696

    Default

    It looks from https://docs.oracle.com/javase/8/doc...to/Cipher.html that you want a scheme of AES/CBC/NoPadding not AES/CBC/NoPadding(256)
    Then use a 256 bit key.

    NOTE: I do not use this feature, so I am guiding you blindly.

  5. #5

    Default

    Tried what you suggested and unfortunately got an error:

    2017/10/20 13:27:36 - Symmetric Cryptography: Last Name.0 - ERROR (version 7.1.0.0-12, build 1 from 2017-05-16 17.18.02 by buildguy) : Error running step
    2017/10/20 13:27:36 - Symmetric Cryptography: Last Name.0 - ERROR (version 7.1.0.0-12, build 1 from 2017-05-16 17.18.02 by buildguy) : org.pentaho.di.trans.steps.symmetriccrypto.symmetricalgorithm.CryptoException:
    2017/10/20 13:27:36 - Symmetric Cryptography: Last Name.0 - java.security.InvalidKeyException: Illegal key size or default parameters
    2017/10/20 13:27:36 - Symmetric Cryptography: Last Name.0 - Illegal key size or default parameters
    2017/10/20 13:27:36 - Symmetric Cryptography: Last Name.0 -
    2017/10/20 13:27:36 - Symmetric Cryptography: Last Name.0 - at org.pentaho.di.trans.steps.symmetriccrypto.symmetricalgorithm.SymmetricCrypto.setEncryptMode(SymmetricCrypto.java:97)
    2017/10/20 13:27:36 - Symmetric Cryptography: Last Name.0 - at org.pentaho.di.trans.steps.symmetriccrypto.symmetriccryptotrans.SymmetricCryptoTrans.setSecretKey(SymmetricCryptoTrans.java:248)
    2017/10/20 13:27:36 - Symmetric Cryptography: Last Name.0 - at org.pentaho.di.trans.steps.symmetriccrypto.symmetriccryptotrans.SymmetricCryptoTrans.processRow(SymmetricCryptoTrans.java:154)
    2017/10/20 13:27:36 - Symmetric Cryptography: Last Name.0 - at org.pentaho.di.trans.step.RunThread.run(RunThread.java:62)
    2017/10/20 13:27:36 - Symmetric Cryptography: Last Name.0 - at java.lang.Thread.run(Unknown Source)
    2017/10/20 13:27:36 - Symmetric Cryptography: Last Name.0 - Caused by: java.security.InvalidKeyException: Illegal key size or default parameters
    2017/10/20 13:27:36 - Symmetric Cryptography: Last Name.0 - at javax.crypto.Cipher.checkCryptoPerm(Cipher.java:1026)
    2017/10/20 13:27:36 - Symmetric Cryptography: Last Name.0 - at javax.crypto.Cipher.implInit(Cipher.java:801)
    2017/10/20 13:27:36 - Symmetric Cryptography: Last Name.0 - at javax.crypto.Cipher.chooseProvider(Cipher.java:864)
    2017/10/20 13:27:36 - Symmetric Cryptography: Last Name.0 - at javax.crypto.Cipher.init(Cipher.java:1249)
    2017/10/20 13:27:36 - Symmetric Cryptography: Last Name.0 - at javax.crypto.Cipher.init(Cipher.java:1186)
    2017/10/20 13:27:36 - Symmetric Cryptography: Last Name.0 - at org.pentaho.di.trans.steps.symmetriccrypto.symmetricalgorithm.SymmetricCrypto.setEncryptMode(SymmetricCrypto.java:95)
    2017/10/20 13:27:36 - Symmetric Cryptography: Last Name.0 - ... 4 more
    2017/10/20 13:27:36 - Symmetric Cryptography: Last Name.0 - ERROR (version 7.1.0.0-12, build 1 from 2017-05-16 17.18.02 by buildguy) : org.pentaho.di.trans.steps.symmetriccrypto.symmetricalgorithm.CryptoException:
    2017/10/20 13:27:36 - Symmetric Cryptography: Last Name.0 - java.security.InvalidKeyException: Illegal key size or default parameters
    2017/10/20 13:27:36 - Symmetric Cryptography: Last Name.0 - Illegal key size or default parameters
    2017/10/20 13:27:36 - Symmetric Cryptography: Last Name.0 -
    2017/10/20 13:27:36 - Symmetric Cryptography: Last Name.0 - at org.pentaho.di.trans.steps.symmetriccrypto.symmetricalgorithm.SymmetricCrypto.setEncryptMode(SymmetricCrypto.java:97)
    2017/10/20 13:27:36 - Symmetric Cryptography: Last Name.0 - at org.pentaho.di.trans.steps.symmetriccrypto.symmetriccryptotrans.SymmetricCryptoTrans.setSecretKey(SymmetricCryptoTrans.java:248)
    2017/10/20 13:27:36 - Symmetric Cryptography: Last Name.0 - at org.pentaho.di.trans.steps.symmetriccrypto.symmetriccryptotrans.SymmetricCryptoTrans.processRow(SymmetricCryptoTrans.java:154)
    2017/10/20 13:27:36 - Symmetric Cryptography: Last Name.0 - at org.pentaho.di.trans.step.RunThread.run(RunThread.java:62)
    2017/10/20 13:27:36 - Symmetric Cryptography: Last Name.0 - at java.lang.Thread.run(Unknown Source)
    2017/10/20 13:27:36 - Symmetric Cryptography: Last Name.0 - Caused by: java.security.InvalidKeyException: Illegal key size or default parameters
    2017/10/20 13:27:36 - Symmetric Cryptography: Last Name.0 - at javax.crypto.Cipher.checkCryptoPerm(Cipher.java:1026)
    2017/10/20 13:27:36 - Symmetric Cryptography: Last Name.0 - at javax.crypto.Cipher.implInit(Cipher.java:801)
    2017/10/20 13:27:36 - Symmetric Cryptography: Last Name.0 - at javax.crypto.Cipher.chooseProvider(Cipher.java:864)
    2017/10/20 13:27:36 - Symmetric Cryptography: Last Name.0 - at javax.crypto.Cipher.init(Cipher.java:1249)
    2017/10/20 13:27:36 - Symmetric Cryptography: Last Name.0 - at javax.crypto.Cipher.init(Cipher.java:1186)
    2017/10/20 13:27:36 - Symmetric Cryptography: Last Name.0 - at org.pentaho.di.trans.steps.symmetriccrypto.symmetricalgorithm.SymmetricCrypto.setEncryptMode(SymmetricCrypto.java:95)
    2017/10/20 13:27:36 - Symmetric Cryptography: Last Name.0 - ... 4 more

    I even tried to use the "Secret key generator"
    Name:  Secret key generator.jpg
Views: 281
Size:  24.2 KB

    got the same error as above

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.