Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 306
  • Last Modified:

Email and IPSec

I'd like to hear an explanation of how IPSec works with specific relation to email, in particular, I'd like to know how the encryption of the ESP header relates to the IP header with the routing information in it - for example, do network routers need to decrypt the ESP to do routing, or can they use a (presumably still) unencrypted IP header destination address - if it is indeed still unencrypted? (I say this because I understand that the ESP is dropped in before the IP header, and therefore I'm assuming that the IP header is left alone. This is what I want to clear up for myself mostly.) Thanks.
0
krakatoa
Asked:
krakatoa
  • 5
  • 2
1 Solution
 
DonbooCommented:
This might offer some insight....

http://en.wikipedia.org/wiki/IPsec
0
 
krakatoaAuthor Commented:
I've seen that, thanks, but that type of explanation is no good to me.
0
 
krakatoaAuthor Commented:
I've discovered that my underlying problem is that a DatagramSocketImpl's receive() method evidently does not want to recognise the packet's existence - requesting the sender's InetAddress and port from the packet returns "null" and "-1" every time.

How is this possible? What do I need to do to get the DatagramSocketImpl to handle the packet?
0
Who's Defending Your Organization from Threats?

Protecting against advanced threats requires an IT dream team – a well-oiled machine of people and solutions working together to defend your organization. Download our resource kit today to learn more about the tools you need to build you IT Dream Team!

 
nociSoftware EngineerCommented:
IPSEC is mostly used between two peaces of equipment.
and what it does is to encapsulate packets received by either prepending an extra ESP header.
(tunnel mode) or replacing the IP header (transport mode).

So you wouldnt normally handle it yourself. If you what to do that, then you might want to look into the code produced by f.e. openswan  project.

The outer stuff is (ESP(id=50) is in itself an IP protocol, just like TCP(id=6) or UDP(id=17)).
Routers only act on an address, and the IP header has just that.  So routers dont unpack it, they just pass on the packet.
After the ESP header all content is encrypted, even the IP header in tunnel mode.
0
 
krakatoaAuthor Commented:
That's really a super-concise and very helpful explanation, noci.

Is there any lit. or doc. sources known to you about how to operate on these fields, and IPSec, via Java by any chance?
0
 
krakatoaAuthor Commented:
Thanks for your help noci.
0
 
nociSoftware EngineerCommented:
For IPSEC look into the freeswan project (now dead, but the doc is stil usable).
OpenSwan & StrongSwan are fork that continued with a different focus.
1st on inter connectivity, 2nd on using X509 as authentication.

for freeswan you may need to google.
http://www.openswan.org/
http://www.strongswan.org/

This can be found using google:
http://www.tml.tkk.fi/Tutkimus/IPSEC/toc.html

As IPSEC is an IP level protocol i doubt you will find ANY implementation in higherorder languaged other than use of an API.
IPSEC is rather different from SSL beased solutions.
0
 
krakatoaAuthor Commented:
>>As IPSEC is an IP leve

Super. Thanks again.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 5
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now