Rabbit cipher
Rabbit stream cipher implemented per RFC 4503: a 128-bit key (first 16 bytes of UTF-8, or 32 hex digits), an optional 64-bit IV, and independent input/output encodings (UTF-8, hex, Base64, decimal bytes). Encryption and decryption are the same operation — paste the ciphertext back and pick decrypt. The implementation reproduces every one of the six published vectors in RFC 4503 Appendix A byte for byte.
Runs in your browserEvery computation happens in your browser — your data never leaves this device.
Result
Matches all six RFC 4503 Appendix A vectors; never reuse an IV with the same key.
Enter content to see the result
Input bytes: 0 · Key bytes: 0 · Result bytes: 0
What this tool does
- Cross-check a Rabbit implementation against RFC 4503 keystream vectors.
- Interoperate with legacy systems that require Rabbit (neither TLS nor JOSE supports it).
- Demonstrate IV reuse risks: the same key with a different IV yields completely different output.
Example
Input
Hello, world!
Output
aa4cd6cceda107f8195071c48d
Verified against all six published vectors in RFC 4503 Appendix A (three without IV, three with, 48 bytes each) — every byte matches. The Appendix B key-setup intermediates (initial X/C, X/C after four iterations, and the final C xor) match too.
Frequently asked questions
Is Rabbit secure?
The algorithm itself has not been broken (no practical attack since RFC 4503), but it is no longer in the mainstream: TLS, JOSE and the common crypto libraries do not offer Rabbit, so use AES-GCM or ChaCha20-Poly1305 for anything new.
How thoroughly were the test vectors checked?
All six Appendix A vectors (zero key, 9128…, 8395… without IV, plus zero IV, c373…, a6eb… with IV) match byte for byte across 48 bytes each. The Appendix B key-setup intermediates (X/C states) also match the RFC's printed values, which together cover key scheduling, counter carry propagation and the extraction function.
Are encryption and decryption the same operation?
Yes. A stream cipher xors the keystream with the data: ciphertext = plaintext XOR keystream and plaintext = ciphertext XOR keystream. With the same key and IV the input is restored; the encrypt/decrypt switch is only a label.
Why is IV reuse forbidden?
Reusing an IV under the same key reproduces the exact same keystream, so xoring two ciphertexts equals xoring the two plaintexts and leaks information — the one-time pad property is destroyed. RFC 4503 §3.2 explicitly warns against it.
What key and IV lengths are required?
The key must be 16 bytes (UTF-8 input is truncated to the first 16 bytes and shorter input is rejected outright; hex input needs 32 hex digits). The IV is optional and must be 8 bytes (16 hex digits). Wrong lengths are never silently padded.
Keywords:RabbitRFC 4503stream ciphereSTREAMIV