cancel
Showing results for 
Search instead for 
Did you mean: 

Map, encrypt and send encrypted payload as mail attachment?

krishg
Active Participant
0 Kudos

I have a payload generated via java mapping, which I am sending as mail attachment using Mail payload (mail package) in the same mapping. I would like to encrypt my payload before sending it as mail attachment.. What are my options?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos
krishg
Active Participant
0 Kudos

Lucas, we do not want to use SSL.. We just want the content of our attachment file encrypted (and our customers will then decrypt the file)...

Former Member
0 Kudos

- There is a parameter called "Content Encoding" on the "General" tab of the communication channel. You can set it to "Base 64" for encoding the content of the mail.

Or you can check the blog below and in the method that creates the attachment, add a Base64 encryption for example (there are many code examples and libraries over the web). This would encrypt only the attachment.

/people/stefan.grube/blog/2007/04/17/xi-mail-adapter-an-approach-for-sending-emails-with-attachment-with-help-of-java-mapping

Answers (1)

Answers (1)

agasthuri_doss
Active Contributor
0 Kudos

Hi,

>I would like to encrypt my payload before sending it as mail attachment

In your same message mapping call the encryption service to encrypt the message.

Cheers

Agasthuri

krishg
Active Participant
0 Kudos

So, if we use Base64 encoding while doing receiver mail adapter, does it ensure that data is transmitted securely? or do we need SSL to ensure secure transmission or encrypt the data to ensure more security? As far as I can see Base64 provides just a very basic level of security (as it is a encoding mechanism)

Agasthuri, we are using Java mapping...Is there a quick and dirty way to ensure that we can encrypt the string using java mapping? We will need to use different public keys based on our receiving party...I am search in SDN and saw couple of references to bouncycastle... but other than that, I couldn't find anything else.

Former Member
0 Kudos

In case of secure connection, you would need to use the SSL with the IAIK library (built-in on Java stack). Base64 would just encrypt the message, but no warranty from a security layer level. Is there any constraint or business requirement to NOT use the SSL certificates communication?

krishg
Active Participant
0 Kudos

We are using one mail adapter for all customers.. (dynamically specifying the mail id using 'use mail package')... In such a scenario, how do I specify the certificate for each of my customer (for encryption) in a single receiver agreement?

We do have PGP aedaptive encryption module... but again the question is would we have ability to specify the Public key ring of our customer dynamically?

agasthuri_doss
Active Contributor
0 Kudos

Krish,

>>Agasthuri, we are using Java mapping...Is there a quick and dirty way to ensure that we can encrypt the string using java mapping? We will need to use different public keys based on our receiving party

Java mapping a good option,

>We will need to use different public keys based on our receiving party

That is how it works for security purpose

>We do have PGP aedaptive encryption module

Good one, I have Implemented , Very east to use it..Just add the adapter module ( The Aedaptive modules )

> but again the question is would we have ability to specify the Public key ring of our customer dynamically?

No, Once you create the Public key to the each customer ..Make use of the the same

Cheers

Agasthuri

krishg
Active Participant
0 Kudos

Thank you Lucas and Agasthuri.

>

> >We do have PGP aedaptive encryption module

> Good one, I have Implemented , Very east to use it..Just add the adapter module ( The Aedaptive modules )

Yes, it is really very easy to use...

> > but again the question is would we have ability to specify the Public key ring of our customer dynamically?

> No, Once you create the Public key to the each customer ..Make use of the the same

Meaning there is no dynamic option to encrypt for all customers using one comm. channel... My client is not keen on creating new Comm. Channels for each of the customer ... but I don't see any other way around it, unless we go with the Java mapping? Would that be the correct statement.