Cryptmt
A Mersenne Twister-based stream cipher from the eSTREAM project
Source found and wired, correctness not fully proven. Root API only. Reach it with NextSSL(root=True) in Python or the nextssl_root_* functions in C.
About Cryptmt
Cryptmt is a stream cipher. It uses a 16-byte (128-bit) key and a 16-byte nonce. NextSSL lists it in the unverified tier and exposes it through the root API only (NextSSL(root=True) in Python, nextssl_root_* in C).
Overview
CryptMT is a stream cipher designed by Makoto Matsumoto, Mutsuo Saito, Takuji Nishimura and Mariko Hagita, the team behind the Mersenne Twister. It was submitted to eSTREAM and reached the third phase without entering the portfolio.
CryptMT combines a large linear generator derived from the Mersenne Twister family with a non-linear filter that accumulates outputs through multiplication, which destroys the linearity that makes the plain Mersenne Twister predictable. Version 3 uses SIMD-oriented operations for speed. Its approach is unusual. It is research-grade. It was designed for speed on modern CPUs.
NextSSL includes CryptMT from source without verification. The plain Mersenne Twister is not cryptographically secure; CryptMT's filter is what is intended to provide security. Its large state requires careful initialisation. Because the tier is unverified, outputs should be checked against independent reference values before they are relied on for anything beyond experimentation.
History
2004–2008ECRYPT launches eSTREAM to find new stream ciphers
eSTREAM projectCryptMT published by Makoto Matsumoto, Mutsuo Saito, Takuji Nishimura, Mariko Hagita
34 designs submitted
eSTREAM projectFinal eSTREAM portfolio published
eSTREAM project
Security notes
No practical attacks on CryptMT version 3 are known, but it has had limited analysis compared with portfolio ciphers. NextSSL's implementation is unverified.
Typical uses
Sizes
| Field | Bytes | Meaning |
|---|---|---|
| key | 16 | Secret key |
| nonce | 16 | Nonce / IV |
Use it
from nextssl_demo import NextSSL
root = NextSSL(root=True) # tier 'unverified' is reachable from the root API only
ct = root.call("stream_apply", "cryptmt", None, key, nonce, b"secret")[0] # same call decrypts
nextssl_root_stream_apply("cryptmt", NULL, key, nonce, data, out);
use nextssl_core::Params;
use nextssl_registry::{self as reg, Policy};
let alg = reg::new_streamcipher_in(reg::all(), Policy::Any, "cryptmt", &Params::new())?;
let ct = alg.apply_keystream(&key, &nonce, b"secret")?;
Calls follow the NextSSL C ABI and its language bindings. Buffer sizes are validated against the sizes above.
Similar names
Looking for something else?More stream ciphers
All 37Frequently asked questions
What is Cryptmt?
Cryptmt is a stream cipher in the CryptMT family. CryptMT is a stream cipher designed by Makoto Matsumoto, Mutsuo Saito, Takuji Nishimura and Mariko Hagita, the team behind the Mersenne Twister.
What are the Cryptmt sizes?
In NextSSL, Cryptmt uses: key 16 bytes, nonce 16 bytes.
Who designed Cryptmt and when?
Cryptmt belongs to the CryptMT family, first published in 2005 by Makoto Matsumoto, Mutsuo Saito, Takuji Nishimura, Mariko Hagita. Its origin: eSTREAM (phase 3).
Is Cryptmt safe to use?
Cryptmt is in the unverified tier. Source found and wired, correctness not fully proven. Root API only. It is only reachable through the root API (NextSSL(root=True) in Python, nextssl_root_* in C).