0
$\begingroup$

Both block ciphers and symmetric-key encryption use a secret key to transform plaintext into ciphertext, and do so in a reversible manner. Are they the same? Or does symmetric-key encryption also includes things other than block ciphers?

$\endgroup$
2
  • 1
    $\begingroup$ Where have you encountered those terms? What definition was given there? Any source that does not properly define the technical terms it uses should be ignored. $\endgroup$
    – fkraiem
    Oct 22, 2017 at 10:08
  • $\begingroup$ @fkraiem I haven't heard them used together, but I am trying to connect the dots myself. "A block cipher is a method of encrypting text" - searchsecurity.techtarget.com/definition/block-cipher and "The algorithm described by AES is a symmetric-key algorithm, meaning the same key is used for both encrypting and decrypting the data." - en.wikipedia.org/wiki/Advanced_Encryption_Standard $\endgroup$
    – dayuloli
    Oct 22, 2017 at 14:28

3 Answers 3

2
$\begingroup$

Symmetric-key scheme just means use a key to encrypt and decrypt the same message.

Block ciphers just means encrypt your data in many small bits blocks (which can vary in size with padding randomized technique).

$\endgroup$
2
$\begingroup$

Symmetric(-key) encryption is a sub-field of cryptography, and historically the first one. It studies encryption methods of the symmetric breed; that is, using the same secret key for encryption and decryption, including ciphers and block ciphers.

By the modern definition of these terms, a block cipher is not a cipher. It is a building block used by some ciphers (and many other cryptographic primitives). It performs deterministic encryption of data blocks of some fixed size into a block of the same size, when ciphers have no such size restrictions and can meet more stringent security goals.


A common definition of a block cipher with block size $b$ bits and keyspace $\mathcal K$ is: a public, efficiently computable (encryption) function $E:\mathcal K\times\{0,1\}^b\to\{0,1\}^b$ (where $\{0,1\}^b$ is the set of the $2^b$ bitstrings of exactly $b$ bits); together with a matching public, efficiently computable (decryption) function $D:\mathcal K\times\{0,1\}^b\to\{0,1\}^b$, such that for any $K$ in keyspace $\mathcal K$, and any $P$ in $\{0,1\}^b$, it holds that $D(K,E(K,P))=P$ (that means: decryption always reverse encryption). In this case, the block cipher belongs straight to symmetric encryption, since the same key $K$ is used for encryption $E$ and decryption $D$. AES-256 is an example of such block cipher, with keyspace $\mathcal K=\{0,1\}^{256}$ and $b=128$ bits, thus plaintext and ciphertext blocks (the input and output of encryption by a block cipher) in the set $\{0,1\}^{128}$.

Note: Rarely, the definition might omit that $D$ is efficiently computable, e.g. might not mention $D$ and instead specify a condition implying its existence but not efficient computability, such as: for any $K$ in keyspace $\mathcal K$, and any distinct $P$ and $P'$ in $\{0,1\}^b$, $E(K,P)$ and $E(K,P')$ are distinct. It might be required that no efficiently computable $D$ exists, and optionally asked instead for an efficiently computable $D'$ such that $D'(K',E(K,P))=P$ , with $(K,K')$ forming a public/private key pair generated by some process, allowing asymmetric encryption/decryption. It is possible to construct this, or a block cipher that can not be deciphered even with the encryption key a known arbitrary bitstring, with a strong security argument; e.g. from RSA (for asymmetric decipherable) or the DLP in $\mathbb Z_p$ (for undecipherable), and cycle walking for operation on $\{0,1\}^b$ as required. But known such constructions tend to require large $b$, e.g. $b\ge2^{11}$ rather than $b\ge2^{7}$ for modern common symmetric decipherable block ciphers.


Ciphers are public methods allowing transfer of plaintext in an encrypted form (the ciphertext), computed from a key and the plaintext, while allowing decryption of the ciphertext back to the plaintext for one holding a key. In symmetric encryption, the key used for encryption is also used for decryption, thus is a secret; while in asymmetric encryption a public key is used for encryption, and a private (secret) key is used for decryption. Unless otherwise stated, ciphers aim at preventing an adversary ignoring the decryption key from learning anything new about the plaintext (except its length) by examination of the corresponding ciphertext, and possibly other ways (examining other ciphertext for which the corresponding plaintext is known or chosen, side channels, asking for decryption of chosen ciphertext..).

Contrary to a block cipher, a cipher is not restricted to having plaintext (input of encryption) and ciphertext (result of encryption) of the same fixed size. Plaintext can (and usually is) of variable size. Ciphertext is almost always sizably larger than the plaintext is. Also, a cipher is not necessarily such that the same plaintext and key always yield the same ciphertext, which would prevent ciphertext indistiguishability (equivalently security under chosen plaintext), considered a standard security requirement for a cipher, that all block ciphers lack.

Many any common ciphers are asymmetric (when no common block cipher is, see note). Some common symmetric ciphers internally use a block cipher in some mode of operation, but there are many notable ciphers that do not, typically stream ciphers.

$\endgroup$
2
  • $\begingroup$ Thanks for the detailed answer. So a block cipher is one of the algorithms that can be used in symmetric encryption, although there are many more. Would that be correct? $\endgroup$
    – dayuloli
    Oct 23, 2017 at 8:49
  • $\begingroup$ @dayuloli: Yes that would be correct. More precisely, a block cipher is one member of one class of algorithms (the block ciphers) that can be used in symmetric encryption. Caveat: the severe size limitation of a block cipher's data size (exactly 16 data bytes for AES) and lack of CPA security (allowing to detect identical plaintexts by comparing ciphertexts) makes directly using a block cipher unsuitable for general symmetric encryption. For this, one can use a block cipher and a mode of operation like CTR, CBC, CFB, OFB.. $\endgroup$
    – fgrieu
    Oct 23, 2017 at 11:28
0
$\begingroup$

No they are not the same. For instance stream ciphers are symmetric.

$\endgroup$
2
  • $\begingroup$ So would it be accurate to say block ciphers (and all ciphers in general) uses asymmetric key encryption? $\endgroup$
    – dayuloli
    Oct 22, 2017 at 14:29
  • $\begingroup$ @dayuloli: no that would not be accurate at all! Rather, all common block ciphers belong squarely to symmetric key encryption. $\endgroup$
    – fgrieu
    Oct 22, 2017 at 22:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.