![]() ![]() ![]() There are several block cipher modes, but the one that was originally standardized in SSL (and continues to be used in TLS) is Cipher Block Chaining (CBC). One solution to this is to "chain" blocks together by taking the output of one encryption and mixing it into the input for the next block. The fact that identical plaintext blocks are encrypted to identical ciphertext blocks gives an unwanted structure to encrypted data that reveals information about the plaintext. This property lets an attacker know which plaintext blocks match by looking at the ciphertext blocks.įor example, here’s what a high-resolution version of Linux’s "Tux" looks when encrypted in ECB mode: If two blocks have the same value, they will be encrypted to the same value. ECB turns out to be a very bad way to encrypt most kinds of data: if the data you are encrypting has redundant portions, say an image with many pixels of the same color, you end up with the "Tux" problem (demonstrated below). In ECB mode, you split your data into chunks that match the cipher’s block size and then encrypt each block with the same key. The naïve approach to encrypting data larger than the block size is called Electronic Code Book (ECB) mode. This splitting process is where things get tricky. If the data is longer than one block, then the data needs to be split into multiple blocks that are encrypted separately. You can either turn the block cipher into a stream cipher (using something called counter mode, more on this later), or you can include extra bytes as padding to align the data to the block size. To encrypt data that is less than one block long using a block cipher, you have several options. Examples of block ciphers are DES (8-byte blocks) and AES (16-byte blocks). Unlike stream ciphers, which can encrypt data of any size, block ciphers can only encrypt data in "blocks" of a fixed size. Although RC4 is no longer considered secure, we can still rely on ChaCha20 as a secure stream cipher for use on the web, but it was only recently standardized by the IETF and therefore does not have broad adoption. Examples of pure stream ciphers are RC4 and ChaCha20. Plaintext and ciphertext are always the same length. Stream ciphers encrypt data on a bit-by-bit basis. What’s in a block cipher?Ĭiphers are usually grouped into two categories: stream ciphers and block ciphers. From CloudFlare’s own data, we’ve seen the percentage of web clients that support safer cipher modes (such as AEAD) rise from under 50% to over 70% in six months, a good sign for the Internet. We’ll explain why CBC has proven difficult to use safely, and how recent trends in the adoption of secure ciphers by web clients have helped reduce the web’s reliance on this technology. In this blog post we explore the history of one widely used cryptographic mode that continues to cause problems: cipher block chaining (CBC). Even if we support the most secure cryptographic algorithms for our customers, web visitors won’t get the benefit unless their web client supports the same algorithms. Improving the cryptography used by the majority requires a coordinated effort between the organizations building web browsers and API clients and those working on web services like CloudFlare. At the same time, we want to make sure that as many people as possible are using the most modern and secure encryption available to them. At CloudFlare, we’re committed to making sure the encrypted web is available to everyone, even those with older browsers. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |