Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Which package contains the implementation of IPsec and which package contains the implementation of encryption algorithms that IPsec uses for encryption? I need to use custom crytographic algorithms in IPsec, so I need to edit the implementations of these packages.

share|improve this question
The IPsec implementation including any cryptographic algorithm is in the kernel. – scai Mar 7 '13 at 13:28
Ahmad Darwish, welcome to Unix SE! Unless you work with a bunch (100+) of gifted cryptographers who would review your implementation, rolling your own crypto is very very DANGEROUS. – Deer Hunter Mar 7 '13 at 18:52
thanks for your advice Deer Hunter, I know this is dangerous but the main idea is understanding the implementation – Ahmad Darwish Mar 10 '13 at 12:07
up vote 1 down vote accepted

On Linux and most other unices, IPsec and other network protocols up to the transport layer are implemented in the kernel. There are additional userland tools that handle key exchange; several implementations exist.

The cryptographic algorithms are in crypto. The network protocols are spread around net/ipv4, net/ipv6 and net/xfrm.

share|improve this answer
Thanks Gilles, it really helpful – Ahmad Darwish Mar 10 '13 at 12:12

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.