We use cookies.This website uses essential cookies to operate core features. With your consent, we also use analytics cookies to understand traffic and improve the service. For more details, see our .
Was this tool helpful to use?
Your feedback helps us make it better
A text encryption and decryption tool based on the Serpent algorithm, supporting multiple key lengths and operation modes.
Raw-block encryption and decryption passed nine NESSIE vectors maintained by Bouncy Castle for 128/192/256-bit keys (2026-09-30). Limited reference tests, not a security audit. Previous incorrect ciphertext may differ; ECB/CBC do not authenticate ciphertext. Reference
Please enter content and click Encrypt/Decrypt.
Overview
Understand what the tool solves, how it works, and the boundaries of its data.
Serpent is a symmetric block cipher: the same secret key is used to encrypt and later decrypt data. This page applies Serpent to text and lets you set a key size, operation mode, and padding. The available key sizes are 128, 192, and 256 bits; the modes are ECB and CBC; the padding choices are PKCS7 and zero padding. CBC requires an initialization vector (IV), while ECB does not.
The cipher processes fixed-size blocks, so text that does not fill a block needs a padding convention. PKCS7 records how many padding bytes were added; zero padding appends zero bytes and can be ambiguous if the original text itself ends with zero bytes. In CBC mode, the IV affects the first block and must be available to decrypt the same ciphertext. The output can be copied as hexadecimal or Base64 text.
NIST’s AES selection history lists Serpent among five finalists considered in the AES process. That historical selection does not mean this page’s configuration is an approved or recommended way to protect current sensitive data. A cipher alone does not provide authenticated encryption or a complete key-management workflow.
Guide
Follow the workflow and verify inputs and outputs with practical examples.
For encryption, enter readable text. For decryption, provide ciphertext in the supported hexadecimal or Base64 input format.
Select 128, 192, or 256 bits and enter a key that matches the selected length. Choose ECB or CBC and the padding convention. CBC encryption generates an IV by default; retain the displayed IV and supply the same value, mode, key, and padding when decrypting.
Run the operation and copy either the hexadecimal or Base64 output. These are encodings of bytes, not separate encryption methods. When decrypting, select the matching ciphertext encoding and use exactly the settings used to encrypt.
A simple round-trip check is to encrypt a short test phrase, then decrypt the result with the same key, mode, padding, and (for CBC) IV. The recovered text should match the original input.
Use cases
See how the tool fits into real work and everyday tasks.
A student can change between CBC and ECB on non-sensitive sample text to see that mode is part of the encryption parameters and must be recorded for decryption.
A developer with a known test vector or legacy format can enter controlled sample values and confirm the expected key length, IV, padding, and ciphertext representation.
Q&A
Find concise answers to common questions and confusing cases.
Yes. Use the exact IV paired with the ciphertext, along with the same key, mode, and padding. An automatically generated IV must be saved with the encrypted output if you will decrypt it later.
Yes. Choose the matching input encoding for decryption. Hex and Base64 only represent the encrypted bytes; they do not replace the cipher settings.
They fill an incomplete final block differently. PKCS7 adds bytes that encode the padding length. Zero padding uses zero bytes, which may not distinguish padding from original trailing zero bytes in every data format.
Notes
Review scope, result limitations, and important precautions before use.
Use non-sensitive examples for learning or compatibility checks. Do not enter passwords, private records, credentials, or confidential business data unless you have independently verified the page’s data handling and your organization permits that use.
Related
Discover related tools, collections, and available API capabilities.