# perldoc > Crypt::Cipher::Noekeon

---
type: CommandReference
command: Crypt::Cipher::Noekeon
mode: perldoc
section: 
source: perldoc
---

## Quick Reference
- `my $cipher = Crypt::Cipher::Noekeon->new($key);` — Creates a new Noekeon cipher object with a 128‑bit key.
- `$ciphertext = $cipher->encrypt($plaintext);` — Encrypts a single 16‑byte block.
- `$plaintext = $cipher->decrypt($ciphertext);` — Decrypts a single 16‑byte block.
- `my $cbc = Crypt::Mode::CBC->new('Noekeon'); $cbc->encrypt("data", $key, $iv);` — Encrypt general data using CBC mode (recommended).
- `$cipher->keysize();` — Returns key size in bytes (16).
- `$cipher->blocksize();` — Returns block size in bytes (16).

## Name
Symmetric cipher Noekeon, key size: 128 bits (16 bytes).

## Synopsis
perl
# Fast: use Crypt::Mode::CBC
use Crypt::Mode::CBC;
my $key = '...';    # exactly 16 bytes
my $iv  = '...';    # 16 bytes
my $cbc = Crypt::Mode::CBC->new('Noekeon');
my $ciphertext = $cbc->encrypt("secret data", $key, $iv);

# Slower but compatible with Crypt::CBC
use Crypt::CBC;
use Crypt::Cipher::Noekeon;
my $cbc2 = Crypt::CBC->new(
  -cipher => 'Cipher::Noekeon',
  -key    => $key,
  -iv     => $iv
);
my $ciphertext2 = $cbc2->encrypt("secret data");
## Methods
All methods can be called as instance methods or as class methods (e.g., `Crypt::Cipher::Noekeon->keysize()`).

- `new($key, [$rounds])` — Creates a new Noekeon cipher object. `$key` must be exactly 16 bytes. Optional `$rounds` overrides the default number of cipher rounds.
- `encrypt($plaintext)` — Encrypts a single 16‑byte block. Returns the 16‑byte ciphertext.
- `decrypt($ciphertext)` — Decrypts a single 16‑byte block. Returns the 16‑byte plaintext.
- `keysize()` — Returns the key size in bytes (always 16).
- `blocksize()` — Returns the block size in bytes (always 16).
- `max_keysize()` — Returns the maximum key size (16 bytes).
- `min_keysize()` — Returns the minimum key size (16 bytes).
- `default_rounds()` — Returns the default number of cipher rounds.

## See Also
- [Crypt::Cipher](https://www.chedong.com/phpMan.php/perldoc/Crypt%3A%3ACipher/markdown)
- [Crypt::Mode::CBC](https://www.chedong.com/phpMan.php/perldoc/Crypt%3A%3AMode%3A%3ACBC/markdown)
- [Crypt::Mode::CTR](https://www.chedong.com/phpMan.php/perldoc/Crypt%3A%3AMode%3A%3ACTR/markdown)
- [Crypt::CBC](https://www.chedong.com/phpMan.php/perldoc/Crypt%3A%3ACBC/markdown)
- CryptX
- [NOEKEON on Wikipedia](https://en.wikipedia.org/wiki/NOEKEON)