Using Quasigroups for Secure Encoding of File System Abstract 1. Introduction
Total Page:16
File Type:pdf, Size:1020Kb
Using Quasigroups for Secure Encoding of File System Eliška Ochodková, Václav Snášel [email protected], [email protected] Department of Computer Science Faculty of Electrical Engineering and Computer Science Technical University of Ostrava Ostrava, Czech Republic Abstract In this article we discuss a method for encoding a file system based upon properties of quasigroups. The presented cipher, due to its simplicity, can be easily implemented, giving in consequence a very fast enci- phering and deciphering. Beside that, the method can be very secure and resisting to any attack. Keywords: file system, quasigroups, Latin square, cryptography, stream ciphers. 1. Introduction Cryptography deals with the transformation of ordinary text (plaintext) into coded form (cipher text) by encryption, and transformation of cipher text into plaintext by decryption. Three of the most important services provided by cryptosystems are secrecy, authenticity, and integrity. Secrecy refers to a denial of access to information by unauthorized individuals. Authenticity refers to validating the source of a message. Integrity refers to an assurance that a message was not modified accidentally or deliberately in transit, by replacement, insertion or deletion. An ideal system might solve all of problems concurrently, i.e., using public keys; providing secrecy; and providing authenticity. Unfortunately no single technique has met all three criteria. Conventional systems such as DES [7] require management of secret keys; systems using public key components may provide authenticity but are inefficient for bulk encryption of data due to low bandwidths. The aim of this paper is to focus the reader’s attention to the existence of an algebraic system called qua- sigroups and to show that it can be applied in cryptography for constructing stream ciphers. It is demon- strated that it is possible to form a huge number of quasigroups quite easily and to construct stream ciphers over the alphabet of a finite order q, based on quasigroups. The method allows one to form many invertible transformations that may be used to encipher and decipher. Number of these transformation increases very rapidly with respect to q. We remind that quasigroups are equivalent to the more familiar Latin squares. The multiplication table of a quasigroup of order q is a Latin square of order q, and conversely as indicated in [2], every Latin square of order q is the multiplication table of a quasigroup of order q. In section 2 we define a stream cipher based upon the quasigroup, we use modified Hall algorithm (see [12]), section 3 describes some features of file system, in section 4 some results of implementation of our system are presented. - 175 - 2. Quasigroup Encryption 2.1 Algorithms and Keys Formally, a set of cryptographic algorithms or ciphers is defined as a set of mathematical functions used for encryption and decryption. There are two types of algorithms: 1. Algorithms that use public keys (for example well known RSA algorithm) 2. Algorithms that use secret keys (a typical example is DES). Asymmetric algorithms (public-key algorithms) use two keys: the first one is public and it is used for encryption and the second one is private and it is used for decryption. Secret-keys algorithms, also called symmetric algorithms, are algorithms where the encryption key can be calculated from the decryption key and vice versa. The security of a symmetric algorithm rests in the key, divulging of the key means that anyone could encrypt and decrypt messages. Symmetric algorithms can be divided into two categories: block algorithms (block ciphers) and stream algorithms (stream ciphers). Block ciphers operate on blocks of data and stream ciphers operate on the plaintext a single bit (or byte) at a time. Encryption and decryption with symmetric algorithm are denoted by EK (P) = C, DK (C) = P , where plaintext is denoted by P, cipher text is denoted by C, the encryption function is denoted by E, the decryption function is denoted by D, the secret key is denoted by K. Clearly, the following relation must hold: DK (EK (P)) = P . 2.2 Some necessary concepts Definition 1. Let A = {a1,a2 ,..., an}, be an alphabet, a k x n Latin rectangle is a matrix with entries aij Î A,i =1,2,...,k, j =1,2,..., n , such that each row and each column consists of different elements of A. If k =n we say a Latin square instead of a Latin rectangle. A Latin square is called reduced (or in standard form) if both the first row and the left column are in some standard order, alphabetical order being conven- ient. Definition 2. A grupoid (Q, *) is said to be a quasigroup (i.e. algebra with one binary operation * on the set Q) satisfying the law: (" u, v Î Q) ($! x, y Î Q) (u * x = v Ù y * u = v). (1) This implies: 1. x * y = x * z Ú y * x = z * x Þ y = z 2. the equations a * x = b, y * a = b have unique solutions x, y for each a, b Î Q. As a consequence we have that, when (Q, *) is a finite set, the main part of the Cayley scheme of the qua- sigroup (Q, *) represents a Latin square. We can associate to the operation * a new operation \ on Q (see [2]), called right inverse of *, by x * y = z Û x \ z = y. (2) Definition 3. We say that (Q, \) is inverse (or dual) quasigroup to (Q, *). We also say that the grupoid (Q, *, \) is a quasigroup. The quasigroup (Q, *, \) satisfies the following identities: (3) x \ (x * y) = y, x * (x \ y) = y. - 176 - 2.3 Constructing a stream cipher based upon quasigroups Let a finite set A = {a1, a2 ,...,an}, n ³1be an alphabet and let (A, *, \) be the quasigroup as defined above. Let A+ is the nonempty words formed by elements of A. The elements of A+ will be denoted by elements of A. Now we define on A+ two transformations as follows: Definition 4. Let uiÎA, k³1. Then f * (u1u2 ...uk ) = v1v2 ...vk Û v1 = l * u1 ,vi+1 = vi * ui+1 , i =1,2,...,k -1, (4) f \ (u1u2 ...uk ) = v1v2 ...vk Û v1 = l \ u1 ,vi+1 = vi \ ui+1 , i =1,2,...,k -1, (5) We say that the sextuple (A, *, \, f*, f\ ) is a quasigroup cipher over the alphabet A. Now it is possible to + say that f* o f \ = 1A+ , where 1A+ is the identical map on A and ° is the composition of maps. For the + proof see [1]. If u Î A is a plain text, it has been seen that f\ ( f* (u)) = u. Now it is clear that we can use first transformation defined in (4) as an encoding function, and second transformation defined in (5) as a decoding function over an alphabet A. Example 1. Let A ={0, 1, 2} and let the quasigroup (A, *), i.e. (A, \) be defined by Table 1. Let l = 0 and u =120001120. Then the cipher text of u is v = f* (u) = 220121001. After aplying of decoding function on v we get f\ (220121001) =120001120 = u. Table 1. The quasigroup (A, *, \) * 0 1 2 \ 0 1 2 0 1 2 0 0 2 0 1 1 2 0 1 1 1 2 0 2 0 1 2 2 0 1 2 2.4 Properties of the method It is mentioned in [11] that all reduced Latin squares of order n are enumerated for n £ 10 as it is shown in Tab.2. Let Ln be the number of Latin squares of order n, and let Rn be the number of reduced Latin squares of order n. It is easy to see that Ln = n! (n - 1)! Rn. In [11] there are also mentioned estimates of Latin squares of order up to 15. However, the problem of classification and exact enumeration of quasigroups of order greater than 10 probably still remains unsolved. This method of obtaining quasigroup is based on modified Hall algorithm [12] for generating n x n Latin squares. There is at least n! (n – 1)!…2! Latin squares. If we take an alphabet A={0…255} (i.e. data are represented by 8 bits) there are at least 256! 255! …2!>1058000 quasigroups. Suppose that intruder knows a cipher text v = v1v2 ...vk = f* (u1u2 ...uk ) , where u1u2 ...uk represents the unknown plain text. For recovering the quasigroup (A, *), which is the key of the encoding method he should solve a system of equalities of the form: v1 = l * u1 , v2 = v1 * u2 , ........ vk = vk-1 * uk . But, as mentioned above, this system of equalities has as many solutions as there are quasigroups of order 256. It implies this method to be resist to the brute force attack. - 177 - n La 1 1 2 1 3 1 4 4 5 56 6 9,408 7 16,942,080 8 535,281,401,856 9 377,597,570,964,258,816 10 7,580,721,483,160,132,811,489,280 Table 2. Numbers of reduced Latin rectangles Presented method seems to be resisting to statistical attack as it is shown in section 4. As it can be seen, presented method produces a cipher text with the same length as the plaintext, and encryption is of a stream nature. This method is also robust on errors, as it is shown in [1]. 3. Installable File Systems A file system is a software component that manages files on a disk or other local storage device, such as CD- drive, tape, and so on. There are two main types of file system drivers: local (media-based) and remote (network-based). A file system driver must access newly exposed system components or additional func- tionality of previously exposed system components.