You are viewing a plain text version of this content. The canonical link for it is here.
Posted to rampart-c-dev@ws.apache.org by Kasun Indrasiri <ka...@gmail.com> on 2008/02/03 18:04:17 UTC
Asymmetric encryption using existing keys
Hi,
For the WS-Trust implementation, I need to encrypt a SAML token form an
existing public key (In STS side) and decrypt it using private key at the
receiver (Relying party).
I do have couple of problems regarding this issue.
- I tried to use the 'oxs_xml_enc_encrypt_data' method but I couldn't
clarify the way that I have to load the key from .pem file and then encrypt
the message from that loaded key.
- And also, Is .pem file store a private or public key. (because I found
.cert files under rampart samples)
Is there a preferred way to do this.
Thanks.
Kasun.
Re: Asymmetric encryption using existing keys
Posted by Uthaiyashankar <sh...@wso2.com>.
Kasun Indrasiri wrote:
> Hi,
>
> For the WS-Trust implementation, I need to encrypt a SAML token form an
> existing public key (In STS side) and decrypt it using private key at the
> receiver (Relying party).
> I do have couple of problems regarding this issue.
>
> - I tried to use the 'oxs_xml_enc_encrypt_data' method but I couldn't
> clarify the way that I have to load the key from .pem file and then encrypt
> the message from that loaded key.
>
Have a look at rampart_enc_encrypt_session_key() method and
rampart_shp_process_encrypted_key() method. It is similar to what you
are trying to achieve.
> - And also, Is .pem file store a private or public key. (because I found
> .cert files under rampart samples)
>
.pem file store private keys.
> Is there a preferred way to do this.
> Thanks.
>
> Kasun.
>
>