OpenBSD IPsec AES-256 encryption problem

Posted on 2009-05-20
Last Modified: 2013-12-09
OpenBSD IPsec AES 256 encryption problem

I am having problems using Manual Configuration of SAs on OpenBSD IPsec when i try to use AES encryption with a key of greater than 128.

The OpenBSD ipsec.conf man pages specify the following encryption ciphers.

Cipher              Key Length
           des                 56 bits
           3des                168 bits
           aes                 128 bits
           aes-128             128 bits
           aes-192             192 bits
           aes-256             256 bits
           aesctr              160 bits      [phase 2 only]
           blowfish            160 bits
           cast                128 bits
           skipjack            80 bits
           null                (none)        [phase 2 only]

I cannot get it to work with aes-128, aes-192 or aes-256. All the others work fine.

Example of WORKING ipsec.conf
esp tunnel from to spi 0x4242:0x4243 enc aes authkey file "authfile:authfile" enckey file "keyfile:keyfile"

flow esp from to

Example of NOT-WORKING ipsec.conf
esp tunnel from to spi 0x4242:0x4243 enc aes-256 authkey file "authfile:authfile" enckey file "keyfile:keyfile"

flow esp from to

The Error message when I use the aes-256 is:-

ipsecctl: unsupported encryption algorithm 7

Using OpenBSD versions 4.4 and 4.5, both have the same problem.

Anyone got any ideas what the issue is ?

Please NOTE. I DO NOT want to use ISAKMP and PKI, I must use Manual SAs
Question by:radar264
  • 2
LVL 61

Expert Comment

ID: 24431693
Key size too small.

Author Comment

ID: 24436282
Thanks but No.   Key size is correct. Have tried aes-128, 192, 256 all with correct keys and all fail.

And to illustrate.  enc  aes     with a 128 bit key works Fine.

esp tunnel from to spi 0x4242:0x4243 enc aes authkey file "authfile:authfile" enckey file "keyfile:keyfile"

But     enc aes-128   with a 128 bit key  Fails. [both the above aes (the default) and aes-128 use the same size 128 key

esp tunnel from to spi 0x4242:0x4243 enc aes-128 authkey file "authfile:authfile" enckey file "keyfile:keyfile"

ipsecctl: unsupported encryption algorithm 5


Accepted Solution

svs earned 500 total points
ID: 24436523
AES-256 support is apparently missing from ipsecctl:

Author Comment

ID: 24440973
RE "AES-256 support is apparently missing from ipsecctl:"

Thats an interesting point. The author of the comment in the URL mentions that there is info in the man pages for ipsecctl and ipsec.conf for setting up
ipsec tunnels using AES with 256bit key.

The current man pages (both for releases 4.4 and 4.5) for ipsec.conf do include all the information for setting up ipsec tunnels using AES with 128, 192, & 256bit keys.

But even though it tells you how to do it, it still doesn't work .

I'll go do more digging.

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A metadevice consists of one or more devices (slices). It can be expanded by adding slices. Then, it can be grown to fill a larger space while the file system is in use. However, not all UNIX file systems (UFS) can be expanded this way. The conca…
Envision that you are chipping away at another e-business site with a team of pundit developers and designers. Everything seems, by all accounts, to be going easily.
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

861 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now