# About Cookie encryption

**URL:** <https://community.f5.com/t/about-cookie-encryption/9048>\
**Category:** Technical Forums\
**Tags:** dev, irules, devops, application-delivery\
**Created:** [September 24, 2006, 4:05am UTC](https://community.f5.com/t/about-cookie-encryption/9048 "2006-09-24T04:05:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Song\_chi\_woon\_2](https://avatars.discourse-cdn.com/v4/letter/s/f0a364/32.png) [@Song\_chi\_woon\_2](https://community.f5.com/u/Song_chi_woon_2)\
**Post date:** [September 24, 2006, 4:05am UTC](https://community.f5.com/t/about-cookie-encryption/9048/1 "2006-09-24T04:05:52Z")

</div>

Hi

I want to know encoded level of COOKIE to BIGIP6400 equipment.

When attempted server’s ssl call by web server in Test pc,I want to know encoded level of Cookie in TestPC

I want to confirm encoded method of cookie in BIGIP using Irule in BIGIP.

I want to know establishment option to cookie name and so on in iRULE establishment (Cookie encryption) city.

Ask help.

---

<div class="post-metadata">

**Author:** ![hoolio](https://avatars.discourse-cdn.com/v4/letter/h/f6c823/32.png) [@hoolio](https://community.f5.com/u/hoolio)\
**Post date:** [September 25, 2006, 12:15pm UTC](https://community.f5.com/t/about-cookie-encryption/9048/2 "2006-09-25T12:15:20Z")

</div>

Hi,

I don’t believe there is a stock way to have BIG-IP encrypt cookies without using an iRule. To use an iRule, see this example from unRuleY:

[Click here](http://devcentral.f5.com/wiki/default.aspx/iRules/EncryptingCookie.html)

The example uses AES to perform the en/decryption. For more info on AES check here:

[Click here](http://en.wikipedia.org/wiki/Advanced_Encryption_Standard)

I believe you can use 128, 192 or 256 bit keys using the format:

```tcl
[AES::key 256]

```

The wiki page on AES doesn’t indicate you need to specify a key length ([Click here](http://devcentral.f5.com/wiki/default.aspx/iRules.AES)) but TMM seems to expect it:

Test rule on 9.2.3:

```tcl
log local0. "key: [AES::key]"

```

TMM error:

Sep 25 12:54:43 tmm tmm[21152]: 01220001:3: TCL error: Rule log\_aes\_key\_rule - wrong args: should be “AES::key \<128 | 192 | 256\>” while executing “AES::key”

It worked when I tested [AES::key 256].

Hope this gets you started…

Aaron
