The Substitution Cipher Chaining Mode
Total Page:16
File Type:pdf, Size:1020Kb
THE SUBSTITUTION CIPHER CHAINING MODE Mohamed Abo El-Fotouh and Klaus Diepold Institute for Data Processing (LDV), Technische Universitat¨ Munchen¨ (TUM), 80333 Munich, Germany Keywords: Modes of operation, SCC, disk encryption, AES. Abstract: In this paper, we present a new tweakable narrow-block mode of operation, the Substitution Cipher Chaining mode (SCC), that can be efficiently deployed in disk encryption applications. SCC is characterized by its high throughout compared to the current solutions and it can be parallelized. We used this mode to modify Windows Vista’s disk encryption algorithm, to offer some parallelism in its original implementation and to improve its diffusion properties. 1 INTRODUCTION 2001). Bear, Lion and Beast are considered to be slow, as they process the data through multiple passes. And Mercy was broken in (Fluhrer, 2002). The other In todays computing environment, there are many method is to let a block cipher like the Advanced en- threats to the confidentiality of information stored on cryption standard AES (Daemen and Rijmen, 1998) end user devices, such as personal computers, con- (with 16-bytes as a block size) to process the data sumer devices (e.g. PDA), and removable storage me- within a mode of operation. These modes of operation dia like (e.g., USB or external hard drive). A common can be divided into two main classes the narrow-block threat against end user devices is device loss or theft, and wide-block modes. The narrow-block modes op- that can lead to identity theft and other frauds. Some- erate on relatively small portions of data (typically one with physical access to a device has many op- 16-bytes when AES is used), while the wide-block tions for attempting to view or copy the information modes encrypt or decrypt a whole sector (typically stored on that device. Another concern is insider at- 512-bytes) at a time (IEEE P1619 homepage, 2007). tacks, such as an employee attempting to access sensi- tive information stored on another employees device. The current narrow-block modes of operations Malware, another common threat, can give attackers are either slow and do not offer error propagation unauthorized access to a device, transfer information (like XTS (Rogaway, 2003) and LRW (Liskov et al., from the device to an attackers system, and perform 2002)) or are subjected to some attacks like (CBC and other actions that jeopardize the confidentiality of the CFB (Menezes et al., 1996)). A need for a new secure information on a device (NIST, 2007). and fast mode of operation, that offer error propaga- Usually the data stored on the PC asset is often tion, has aroused. significantly more valuable to a corporation than the In this paper, we propose a novel narrow-block asset itself (Ferguson, 2006). To prevent the disclo- disk encryption mode of operation. We named this sure of sensitive data, the data needs to be secured. mode Substitution Cipher Chaining mode (SCC). The Disk encryption applications are usually used to pro- SCC mode is a tweakable block cipher mode of oper- tect the data on the disk by encrypting it, where all the ation, that is base on Cipher Block Chaining mode data is encrypted with a single/multiple key(s) and en- (CBC) (Menezes et al., 1996) and the Static Substi- cryption/decryption are done on the fly, without user tution Model (SSM) (El-Fotouh and Diepold, 2008a). interference. The SSM model can provide a block cipher with a Disk encryption usually encrypts/decrypts a secondary key. The secondary key is used to replace whole sector at a time. There exist dedicated block some bits of the cipher’s expanded key. In SCC, each ciphers to encrypt the whole sector at a time like Bear, sector has its unique tweak, this tweak and the pre- Lion, Beast and Mercy (Anderson and Biham, 1996; vious ciphertext block will replace some bits of the Anderson and Biham, 1996; Lucks, 1996; Crowley, expanded key (with the exception to the first block). 421 Abo El-Fotouh M. and Diepold K. (2008). THE SUBSTITUTION CIPHER CHAINING MODE. In Proceedings of the International Conference on Security and Cryptography, pages 421-429 DOI: 10.5220/0001917904210429 Copyright c SciTePress SECRYPT 2008 - International Conference on Security and Cryptography In section 2, we will present the constraints fac- ing the disk encryption applications. In section 3, we will describe the current narrow-block modes of op- erations used in disk encryption. In section 4, we pre- sented our proposed mode of operation. In section 5, we present a performance analysis and a benchmark among the narrow-block modes of operations. In sec- tion 7, we present out proposed modification to Win- dows Vista’s disk encryption algorithm. Finally, we present our conclusions in section 8. Figure 1: Disk encryption general scheme for encrypting a sector. 2 DISK ENCRYPTION of operations have introduced other inputs. Some of these mode use initial vectors like in CBC, CFB and OFB modes (Menezes et al., 1996), counters Disk encryption is usually used to encrypt all the like in CTR (McGrew, 2002) or nonces like in OCB data on the hard disk, where all the hard disk is mode (Rogaway et al., 2001). The idea of using a encrypted with a single/multiple key(s) and encryp- tweak was suggested in HPC (Schroeppel, 1998) and tion/decryption are done on the fly, without user in- used in Mercy (Crowley, 2001). In (Liskov et al., terference (El-Fotouh and Diepold, 2007). The en- 2002), the formal definition of tweakable block ci- cryption is on the sector level, that means each sector phers has been introduced. In this paper, the term should be encrypted separately. In the following sub tweak is associated with any other inputs to the mode section, we will define the existing constrains. of operation with the exception of the encryption key and the plaintext. 2.1 Disk Encryption Constraints 2.4 Tweak Calculation The main constraints: Data Size. The ciphertext length should be the same There are different methods to calculate the tweak as the plaintext length. In this paper, we will use from the sector ID like ESSIV (Fruhwirth, 2005) and the current standard (512-bytes) for the plaintext. encrypted sector ID (Ferguson, 2006). We are going Performance. The used mode of operation should be to use the encrypted sector ID approach, where the fast enough, as to be transparent to the users (If sector ID (after being padded with zeros) is encrypted using the mode of operation results in a signif- by the tweak key to produce the tweak. icant and noticeable slowdown of the computer there will be great user resistance to its deploy- ment (Ferguson, 2006)). 3 NARROW-BLOCK MODES OF OPERATIONS 2.2 General Scheme In Figure 1, we present our general scheme for en- 3.1 Terminologies crypting a sector, where the mode of operation takes four inputs to calculate the ciphertext (4096-bits). The following terminologies are used to describe the These inputs are: modes of operations in this paper. 1. The plaintext of size 4096-bits. IN. The input plaintext of size 4096-bits. 2. Encryption key of size 128 or 256-bits. EK. The encryption key of size 128 or 256-bits. 3. Tweak Key of size 128 or 256-bits. TK. The tweak key of size 128 or 256-bits. 4. Sector ID of size 64-bits. BK. The block key of size 128 or 256-bits. SID. The sector ID encoded as 64-bits unsigned inte- 2.3 Tweak ger. GetTweak(TK,SID). Encrypts (using AES) SID af- Usually a block cipher accepts the plaintext and the ter padding with zeros with TK and returns the encryption key to produce the ciphertext. Modes result. 422 THE SUBSTITUTION CIPHER CHAINING MODE Table 1: CBC listing for disk encryption. Table 2: CFB listing for disk encryption. Encrypt-CBC(IN,EK,TK,SID) Encrypt-CFB(IN,EK,TK,SID) T=GetTweak(TK,SID) T=GetTweak(TK,SID) ExKey=Expand-Key(EK) ExKey=Expand-Key(EK) L IN0= IN0 T AES-Encrypt(ExKey,T,OUT0) L AES-Encrypt(ExKey,IN0,OUT0) OUT0= OUT0 IN0 for i=1 to 31 for i=1 to 31 L INi= INi OUTi−1 AES-Encrypt(ExKey,OUTi−1,OUTi) L AES-Encrypt(ExKey,INi,OUTi) OUTi= OUTi INi end for end for return OUT return OUT T. The tweak. Table 3: LRW listing for disk encryption. ExKey. The expanded AES key. Encrypt-LRW(IN,EK,TK,SID) ExKey=Expand-Key(EK) Expand-Key(EK). Expands the EK with the AES for i=0 to 31 key setup routine and returns the result. TK = TK N SID L th INi = INi TK Xi. The i block of text X, where a block is 128-bits. AES-Encrypt(ExKey,INi,OUTi) L L. Bitwise xor operation. OUTi= OUTi TK SID=SID +1 AES-Encrypt(ExKey,IN,OUT). Encrypts IN, using end for the AES encryption routine with ExKey as the ex- return OUT panded key, and returns OUT. N . Multiplication operation in finite field. 3.3 CFB: Cipher Feedback +. Integer addition operation modulo 264. Substitute(T,ExKey,i). Replaces the ith round sub- CFB turns a block cipher into a self-synchronizing keys in ExKey with T (Note that: the first round of stream cipher. The listing of CFB is in table 2. Where the AES is round zero and it is the pre-whitening the first ciphertext block is the result of the xor pro- process). cess between the first plaintext block and the tweak after encryption, and for the other blocks the plain- len(X).