Cipher
Last Updated: November 19, 2026
In the context of blockchain and cryptography, a cipher is an algorithm used to encrypt and decrypt data with a key. It turns readable data (plaintext) into an unreadable format (ciphertext) and back again. Ciphers protect data in storage and in transit, such as wallet backups and links to exchanges.
How Ciphers Work
A cipher takes two inputs: the data and a key. Encryption runs the cipher forward to produce ciphertext, and decryption runs it backward with the correct key. Symmetric ciphers use the same key for both steps, while asymmetric ciphers, like those used in public-private key systems, use two different keys.
A simple example is the classic shift cipher. Moving each letter three places forward turns HELLO into KHOOR, and moving back three places restores it. The key here is the number 3. Modern ciphers follow the same idea with far more complex math and keys of 128 or 256 bits, so guessing the key is not practical.
Common Types of Ciphers
- AES: the symmetric block cipher NIST published as FIPS 197 on November 26, 2001. It is widely used to protect stored and sent data.
- ChaCha20-Poly1305: a fast symmetric cipher with a built-in tamper check, used in TLS and in Bitcoin’s encrypted node links (BIP 324).
- RSA: an asymmetric system that can encrypt small amounts of data and sign messages; see our RSA entry.
Hash functions, like SHA-256, are not ciphers. They have no key and cannot be reversed, but blockchains use them, together with digital signatures, to make records tamper-evident.
Where Ciphers Appear in Crypto
Public blockchains do not encrypt transactions; anyone can read them. Ciphers protect the data around the chain instead. Ethereum’s keystore standard on ethereum.org (page updated April 3, 2026) requires wallets to support AES-128-CTR, which encrypts a private key with a key made from your password. The file even names its fields: cipher, cipherparams and ciphertext.
Bitcoin nodes encrypt their links too. Since Bitcoin Core 27.0, released April 2, 2024, nodes use BIP 324 encrypted links by default whenever the peer supports them. Wallet apps and websites reach exchanges and RPC nodes over TLS, which uses the same kinds of ciphers.
Why Secure Encryption Matters
Ciphers keep wallet backups, passwords and network traffic away from prying eyes. They do not stop on-chain records from being changed; hashes and signatures do that. A cipher is also only as strong as its key. A weak password can be guessed, which is why keystores slow down each guess when they turn plaintext passwords into keys.
Block Ciphers and Stream Ciphers
Symmetric ciphers come in two broad kinds. A block cipher, such as AES, scrambles data in fixed blocks of 128 bits. A stream cipher, such as ChaCha20, mixes the data with a long stream of pseudorandom bits made from the key. Both can protect files and network traffic, and both need a secret key that only the right parties hold.
A block cipher on its own handles only one block, so it runs in a mode of operation for longer data. CTR mode, used in Ethereum keystore files, turns AES into a stream of bits. GCM mode adds an authentication tag that reveals tampering, which is why TLS connections often use AES-GCM.
Ciphers and Quantum Computers
Quantum computers threaten public-key systems such as RSA far more than symmetric ciphers. In its IR 8547 report on the move to post-quantum cryptography, NIST says its symmetric standards are less vulnerable to quantum attacks and that it does not expect to move away from them. It maps AES-128, AES-192 and AES-256 to its post-quantum security categories 1, 3 and 5.
For crypto users, the near-term quantum question is about signatures, not encryption. Wallet files protected with AES are expected to stay safe, while the elliptic curve signatures that control coins on-chain are the part that would need replacing. Our quantum computing entry covers that debate.
Frequently Asked Questions
What is the difference between a cipher and a hash function?
A cipher uses a key and can be reversed: you encrypt data, then decrypt it with the right key. A hash function has no key and runs only one way, turning data into a fixed-length fingerprint. Blockchains rely mainly on hashes and signatures, while ciphers protect wallet files, passwords and network connections.
Which cipher do crypto wallets use?
It depends on the wallet. Ethereum’s standard keystore file must support AES-128-CTR, with the key derived from your password through PBKDF2 or scrypt. Connections to exchanges and nodes use TLS, which typically relies on AES-GCM or ChaCha20-Poly1305. Most wallet makers describe these choices in their security documentation or open-source code.
Is AES safe from quantum computers?
According to NIST, yes for now. Its IR 8547 report says symmetric standards such as AES are less vulnerable to quantum attacks and that it does not expect to replace them in the post-quantum migration. It places AES-128 in its lowest post-quantum security category and AES-256 in its highest. The bigger quantum risk lies with public-key systems such as RSA and elliptic curves.
Data sources: NIST (FIPS 197, AES, November 26, 2001); ethereum.org Web3 Secret Storage Definition (page updated April 3, 2026); Bitcoin Core 27.0 release notes (April 2, 2024); BIP 324; NIST IR 8547 (October 2026).