0

I have to encrypt a xml message with a specific algorithm(http://www.tta.or.kr/2001/04/xmlenc#seed-cbc) and I want to use the org.apache.xml.security.encryption.XMLCipher class(xmlsec 1.5.6).

I have tried to add the bouncycastle provider and have tried several ways to init the xmlCipher class(getProviderInstance(), getProvider()...) but all failed.

Everytime I get the warning:

WARNING: Algorithm non-standard, expected one of http://www.w3.org/2001/04/xmlenc#tripledes-cbc
http://www.w3.org/2001/04/xmlenc#aes128-cbc
http://www.w3.org/2001/04/xmlenc#aes256-cbc
http://www.w3.org/2001/04/xmlenc#aes192-cbc
http://www.w3.org/2001/04/xmlenc#rsa-1_5
http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p
http://www.w3.org/2009/xmlenc11#rsa-oaep
http://www.w3.org/2001/04/xmlenc#kw-tripledes
http://www.w3.org/2001/04/xmlenc#kw-aes128
http://www.w3.org/2001/04/xmlenc#kw-aes256
http://www.w3.org/2001/04/xmlenc#kw-aes192
http://www.w3.org/2009/xmlenc11#aes128-gcm
http://www.w3.org/2009/xmlenc11#aes192-gcm
http://www.w3.org/2009/xmlenc11#aes256-gcm

and the corresponding Exception:

org.apache.xml.security.encryption.XMLEncryptionException: No transformation given

Is it possible to define the http://www.tta.or.kr/2001/04/xmlenc#seed-cbc when using XmlCipher?

soilworker
  • 1,317
  • 1
  • 15
  • 32
  • XMLcipher seems to work with AES, not with RSA. See this: http://stackoverflow.com/questions/27049976/encrypt-a-xml-file-with-xmlcipher-rsa – guillaume girod-vitouchkina Nov 25 '15 at 13:44
  • 1
    I think that's not correct, I also encrypt the key with xmlcipher and rsa1.5 algorithm and that works. The encryption of the whole xml doesn't work with http://www.tta.or.kr/2001/04/xmlenc#seed-cbc – soilworker Nov 26 '15 at 08:36
  • thanks for the point. You should also answer to : http://stackoverflow.com/questions/27049976/encrypt-a-xml-file-with-xmlcipher-rsa – guillaume girod-vitouchkina Nov 26 '15 at 08:39

0 Answers0