mace-opensaml-users - Re: [OpenSAML] Encrypting Assertion in Browser Post Profile Use case
Subject: OpenSAML user discussion
List archive
- From: Brent Putman <>
- To:
- Subject: Re: [OpenSAML] Encrypting Assertion in Browser Post Profile Use case
- Date: Mon, 28 Apr 2008 18:27:20 -0400
Title: Encrypting Assertion in Browser Post Profile Use case
Janardhanan, Srilakshmi wrote:
Yes, it is functionally correct. You could also automate the building of the KeyEncryptionParameters (like the data enc params) using the SecurityHelper#buildKeyEncryptionParameters. I don't know if you want or need to send a ds:KeyInfo to help the partner identify the encryption key, but that will get included by default with that mechanism. Also, you might want to avoid using the constant from the Apache XMLCipher, we have a complete set of constants in the EncryptionConstants class. If we ever switch the underlying encryption impl to something else (e.g. something based on JSR106), that might go away. If you use the helper method, the KEK algorithm URI will be selected dynamically.
You're mixing up several things there between the data encryption key and key encryption key pair, algorithm URI's, key lengths, etc. Assuming all you want is just an auto-generated data encryption key based on aes256-cbc, then all you need to do is set the EncryptionParameters#setAlgorithm value to that EncryptionConstants algorithm URI. If you want to generate the data encrytpion key and credential yourself, you would use the SecurityHelper generateSymmetricKey(String) and getSimpleCredential(SecretKey), but you're still responsible for setting the algorithm URI on the encParams correctly based on the key you supply. I would avoid using things from the SecurityTestHelper class for production code. The only reason it's not in the test source tree is b/c it's used by multiple projects in the java-opensaml2 stack. --Brent |
- Encrypting Assertion in Browser Post Profile Use case, Janardhanan, Srilakshmi, 04/28/2008
- Re: [OpenSAML] Encrypting Assertion in Browser Post Profile Use case, Brent Putman, 04/28/2008
- RE: [OpenSAML] Encrypting Assertion in Browser Post Profile Use case, Janardhanan, Srilakshmi, 04/29/2008
- Re: [OpenSAML] Encrypting Assertion in Browser Post Profile Use case, Brent Putman, 04/29/2008
- RE: [OpenSAML] Encrypting Assertion in Browser Post Profile Use case, Janardhanan, Srilakshmi, 04/30/2008
- Re: [OpenSAML] Encrypting Assertion in Browser Post Profile Use case, Brent Putman, 04/29/2008
- RE: [OpenSAML] Encrypting Assertion in Browser Post Profile Use case, Janardhanan, Srilakshmi, 04/29/2008
- Re: [OpenSAML] Encrypting Assertion in Browser Post Profile Use case, Brent Putman, 04/28/2008
Archive powered by MHonArc 2.6.16.