You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@santuario.apache.org by "Pascal Knüppel (JIRA)" <ji...@apache.org> on 2015/05/08 09:45:59 UTC

[jira] [Created] (SANTUARIO-419) SecretKey Problem after decryption

Pascal Knüppel created SANTUARIO-419:
----------------------------------------

             Summary: SecretKey Problem after decryption
                 Key: SANTUARIO-419
                 URL: https://issues.apache.org/jira/browse/SANTUARIO-419
             Project: Santuario
          Issue Type: Bug
          Components: Java
    Affects Versions: Java 2.0.4, Java 2.0.3, Java 2.0.2
         Environment: Windows 7
Windows 8
Java 7
Java 8
            Reporter: Pascal Knüppel
            Assignee: Colm O hEigeartaigh
            Priority: Blocker


I found a reproducable problem that turned out to be a blocker for my application. I need to encrypt an xml-document with hybrid encryption. I'm using AES for content encryption and RSA for key encryption. I can encrypt and decrypt the message with no problems, but if I extract the AES key of the decrypted XML the algorithm of the SecretKey is set to RSA and cannot be reused for encryption. This is an absolut necessary part of my application and I'm stuck. 
I found a stupid workaround but this will break the possibility to keep my application capable of using several algorithms and will set it to AES only. This workaround is if I take the decrypted SecretKey and read it again with its bytes to a secret key like this:
secretKey = new SecretKeySpec(secretKey.getEncoded(), 0, secretKey.getEncoded().length, "AES")
This is my current but actually unusable workaround for this problem.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)