[xmlsec] Encrypt RSA Key with a symetric key

Aleksey Sanin aleksey at aleksey.com
Thu Dec 19 01:59:57 PST 2002


No, there is not. The XML Encryption spec does not specify a way to
encrypt RSA keys. Usually, you encrypt session symetric key with a public
(RSA) key. I would suggest to think twice before doing otherwise and
if you "really really" need this then feel free to add you custom key 
wrapper
for xmlsec (check AES KW, DES KW or RSA PKCS 1.5 in corresponding
files src/aes.c, src/des.c and src/rsa.c for details).

Aleksey

Mike Stone wrote:

>Aleksey,
>
>I want to encrypt an RSA key using a generated session key but it always fails because the readBin and writeBin function pointers are NULL for RSA keys (xmlsecRsaKeyId) but required by the xmlSecKeyWriteBin in order to fill in the EncryptedKey element.
>
>Is there a way to encrypt RSA keys?
>
>Thanks, 
>MS
>
>_______________________________________________
>xmlsec mailing list
>xmlsec at aleksey.com
>http://www.aleksey.com/mailman/listinfo/xmlsec
>  
>





More information about the xmlsec mailing list