An Efficient Quasigroup Block Cipher

Similar documents
Some Cryptanalysis of the Block Cipher BCMPQ

4. Design Principles of Block Ciphers and Differential Attacks

Image Encryption Based on New One-Dimensional Chaotic Map

II. RC4 Cryptography is the art of communication protection. This art is scrambling a message so it cannot be clear; it

Journal of Discrete Mathematical Sciences & Cryptography Vol. ( ), No., pp. 1 10

Proceedings of Meetings on Acoustics

Linear Congruences. The solutions to a linear congruence ax b (mod m) are all integers x that satisfy the congruence.

A Secure Image Encryption Algorithm Based on Hill Cipher System

Chaotically Modulated RSA/SHIFT Secured IFFT/FFT Based OFDM Wireless System

Public Key Cryptography Great Ideas in Theoretical Computer Science Saarland University, Summer 2014

Random Bit Generation and Stream Ciphers

Successful Implementation of the Hill and Magic Square Ciphers: A New Direction

Symmetric-key encryption scheme based on the strong generating sets of permutation groups

GLOBAL JOURNAL OF ENGINEERING SCIENCE AND RESEARCHES AN EFFICIENT METHOD FOR SECURED TRANSFER OF MEDICAL IMAGES M. Sharmila Kumari *1 & Sudarshana 2

Diffie-Hellman key-exchange protocol

Chapter 4 The Data Encryption Standard

Low-cost Implementations of NTRU for pervasive security

Lecture 32. Handout or Document Camera or Class Exercise. Which of the following is equal to [53] [5] 1 in Z 7? (Do not use a calculator.

Sudoku an alternative history

Block Ciphers Security of block ciphers. Symmetric Ciphers

Pseudorandom Number Generation and Stream Ciphers

Cryptography. Module in Autumn Term 2016 University of Birmingham. Lecturers: Mark D. Ryan and David Galindo

B. Substitution Ciphers, continued. 3. Polyalphabetic: Use multiple maps from the plaintext alphabet to the ciphertext alphabet.

Cryptanalysis of an Improved One-Way Hash Chain Self-Healing Group Key Distribution Scheme

Error-Correcting Codes

Classical Cryptography

CDMA Physical Layer Built-in Security Enhancement

CARRY SAVE COMMON MULTIPLICAND MONTGOMERY FOR RSA CRYPTOSYSTEM

V.Sorge/E.Ritter, Handout 2

CRYPTANALYSIS OF THE PERMUTATION CIPHER OVER COMPOSITION MAPPINGS OF BLOCK CIPHER

Quasi group based crypto-system

Chapter 3 LEAST SIGNIFICANT BIT STEGANOGRAPHY TECHNIQUE FOR HIDING COMPRESSED ENCRYPTED DATA USING VARIOUS FILE FORMATS

DUBLIN CITY UNIVERSITY

A Novel Encryption System using Layered Cellular Automata

Multiple Input Multiple Output (MIMO) Operation Principles

Classification of Ciphers

A Recursive Threshold Visual Cryptography Scheme

A Cryptosystem Based on the Composition of Reversible Cellular Automata

DUBLIN CITY UNIVERSITY

MC CDMA PAPR Reduction Using Discrete Logarithmic Method

OFDM Based Low Power Secured Communication using AES with Vedic Mathematics Technique for Military Applications

A STENO HIDING USING CAMOUFLAGE BASED VISUAL CRYPTOGRAPHY SCHEME

Transform. Jeongchoon Ryoo. Dong-Guk Han. Seoul, Korea Rep.

Implementation and Performance Testing of the SQUASH RFID Authentication Protocol

Image Encryption using Pseudo Random Number Generators

Network Security: Secret Key Cryptography

New Linear Cryptanalytic Results of Reduced-Round of CAST-128 and CAST-256

High Diffusion Cipher: Encryption and Error Correction in a Single Cryptographic Primitive

Conditional Cube Attack on Reduced-Round Keccak Sponge Function

Hybrid ARQ Scheme with Antenna Permutation for MIMO Systems in Slow Fading Channels

6. FUNDAMENTALS OF CHANNEL CODER

Mathematics Explorers Club Fall 2012 Number Theory and Cryptography

Amalgamation of Cyclic Bit Operation in SD-EI Image Encryption Method: An Advanced Version of SD-EI Method: SD-EI Ver-2

Understanding Cryptography: A Textbook For Students And Practitioners PDF

IND-CCA Secure Hybrid Encryption from QC-MDPC Niederreiter

An Implementation of LSB Steganography Using DWT Technique

Cryptography CS 555. Topic 20: Other Public Key Encryption Schemes. CS555 Topic 20 1

A New PAPR Reduction in OFDM Systems Using SLM and Orthogonal Eigenvector Matrix

International Journal of Digital Application & Contemporary research Website: (Volume 1, Issue 7, February 2013)

Image Encryption Based on the Modified Triple- DES Cryptosystem

A New Compression Method for Encrypted Images

Discrete Mathematics & Mathematical Reasoning Multiplicative Inverses and Some Cryptography

The number theory behind cryptography

o Broken by using frequency analysis o XOR is a polyalphabetic cipher in binary

p 1 MAX(a,b) + MIN(a,b) = a+b n m means that m is a an integer multiple of n. Greatest Common Divisor: We say that n divides m.

Secret Key Systems (block encoding) Encrypting a small block of text (say 128 bits) General considerations for cipher design:

Chapter 4 MASK Encryption: Results with Image Analysis

Triple-DES Block of 96 Bits: An Application to. Colour Image Encryption

Algorithmic Number Theory and Cryptography (CS 303)

Implementation / Programming: Random Number Generation

Dr. V.U.K.Sastry Professor (CSE Dept), Dean (R&D) SreeNidhi Institute of Science & Technology, SNIST Hyderabad, India. P = [ p

COS433/Math 473: Cryptography. Mark Zhandry Princeton University Spring 2017

Meta-data based secret image sharing application for different sized biomedical

Generic Attacks on Feistel Schemes

Introduction to Cryptography CS 355

A Steganography Algorithm for Hiding Secret Message inside Image using Random Key

Chaos based Communication System Using Reed Solomon (RS) Coding for AWGN & Rayleigh Fading Channels

Dynamic Collage Steganography on Images

Quality of Encryption Measurement of Bitmap Images with RC6, MRC6, and Rijndael Block Cipher Algorithms

Solution: Alice tosses a coin and conveys the result to Bob. Problem: Alice can choose any result.

Differential Cryptanalysis of REDOC III

Volume 2, Issue 9, September 2014 International Journal of Advance Research in Computer Science and Management Studies

Mobile Communications TCS 455

A Novel Color Image Cryptosystem Using Chaotic Cat and Chebyshev Map

M.E(I.T) Student, I.T Department, L.D College Of Engineering, Ahmedabad, Gujarat, India

Robust Key Establishment in Sensor Networks

TMA4155 Cryptography, Intro

Lightweight Mixcolumn Architecture for Advanced Encryption Standard

Optimization Techniques for Alphabet-Constrained Signal Design

You ve seen them played in coffee shops, on planes, and

A Very Fast and Low- power Time- discrete Spread- spectrum Signal Generator

AES Encryption and Decryption in Microsoft.NET

OFDM Systems For Different Modulation Technique

Digital Audio Watermarking With Discrete Wavelet Transform Using Fibonacci Numbers

Digital Signal Processing. VO Embedded Systems Engineering Armin Wasicek WS 2009/10

Peak-to-Average Power Ratio (PAPR)

Signal Characteristics

LOSSLESS CRYPTO-DATA HIDING IN MEDICAL IMAGES WITHOUT INCREASING THE ORIGINAL IMAGE SIZE THE METHOD

Time-Memory Trade-Offs for Side-Channel Resistant Implementations of Block Ciphers. Praveen Vadnala

Design and Implementation of Game Based Security Model to Secure the Information Contents

Transcription:

Wireless Pers Commun DOI 10.1007/s11277-012-0959-x An Efficient Quasigroup Block Cipher Matthew Battey AbhishekParakh Springer Science+Business Media New York 2012 Abstract Low powered devices, such as smart phones, tablets and sensors, present a particular challenge for advanced encryption systems. In this paper, we present a new quasigroup block encryption system that has low memory and computational requirements and hence suitable for low powered devices. We compare its performance against Advanced Encryption Standard-256 (AES-256) bit algorithm using the NIST statistical test suite (NIST-STS). Since it is well known that a good encryption algorithm must destroy any statistical properties of the input sequence and produce output close to a true random sequence, the NIST-STS suite results provide us a good test bench. In almost all tests from the suite, the proposed algorithm performs better than AES-256. Keywords Quasigroup Cryptosystem AES-256 Block cipher 1 Introduction Low powered systems such as smart phones, tablets and sensor networks provide a challenging area of research because of their constraints of low computational power, low memory capacity and limited communication ranges. While most encryption algorithms such as RSA and AES were developed for desktop environments, as key sizes become larger, these algorithms become a drain on battery life of hand-held devices. Further, with proliferation of cloud services the amount of data being transmitted and received by these devices is growing at an exponential rate [15]. M. Battey Department of Computer Science, University of Nebraska at Omaha, Omaha, NE 68168, USA e-mail: mbattey@unomaha.edu A. Parakh (B) Nebraska University Center for Information Assurance, University of Nebraska at Omaha, Omaha, NE 68182, USA e-mail: aparakh@unomaha.edu

M. Battey, A. Parakh Sensor networks are increasingly being used for applications such as surveillance, patient health monitoring, and environment data collection leading to an increasing demand for security and privacy [16,17]. Further, the advances in near field radio frequency technology, allow direct communication between personal electronics and fixed position devices. Designed with the primary goal of facilitating financial transactions, this over-the-air communication must be secure for no other reason than to protect one s pocket book. Moreover, recently produced smart-phones have several sensors within. These may be used to monitor location and health conditions, which will further enable emergency response services in the future. With this and similar cases, security, integrity and privacy of transmitted data are of utmost importance. Today, the most popular method for encryption in low powered devices is the use of secret key encryption systems such as Triple DES or AES. This is because secret key algorithms have much lower computational requirements than public-key systems (such as RSA). In this paper we develop a new secret key encryption scheme, that is ideally suited for encryption in computationally and memory constrained environments. We run statistical tests on both the input and output streams, testing them for randomness using the NIST-STS package. The test results are compared with the popularly used and mandated Advanced Encryption Standard 256 (AES-256) bit encryption. The results show equal or better performance under all tests and that the encryption method is very good in destroying the structure of the input sequence. Quasigroups share a history with the popular game Sudoku and the long lived Latin squares. The core of a Quasigroup is defined in the same manner as a Latin square. These consist of an n 2 set of ordered triples having the form (r i, c j,v ij ); r i, c j,v ij Integers, with the additional stipulation that for each (r i,v ij ) and (c j,v ij ), v ij is unique. This relation can be represented as a n n square matrix with r i and c j being the row and column indices and v ij is the value in the r i th row and c j th column. The difference between a Quasigroup and a Latin square is the definition of an operator on a Quasigroup. This operator is somewhat simple in that it performs a table/matrix lookup from the Quasigroup. A Quasigroup equation of the form x y = z translates directly to the ordered triple (r x, c y,v xy ),wherez := v xy.by these definitions, the Quasigroup operation is both closed and invertible, making Quasigroups prime candidates for encoding systems. Latin squares have been previously investigated for their application to encryption, where they are known exclusively by their Quasigroup name [2]. Gligoroski et al. [6 8] looked at stream cipher and public key implementations with quasigroups. A multi-level quasigroup implementation was proposed by Satti and Kak [20]. Satti and Kak combined the implementation with indices and nonces to improve on the strength of the encryption. However, their system also focuses on a stream cipher implementation. Marnas et al. [13] implement a quasigroup all-or-nothing system. However, they only use quasigroup encryption to replace the XOR operation used within other all-or-nothing system, hence in the end the actual encryption is done using other cryptosystems. Quasigroups have also been applied to error correction [9] and in construction of message authentication codes (MAC) [1]. One may view quasigroup transformation as a substitution and permutation operation. These operations form the basis of numerous encryption systems specially in speech encryption [3,14]. Further, public key systems such as NTRU [11] and elliptic curve cryptosystems [12] have lower power consumptions compared to RSA however compared to secret key systems they are much more computationally expensive. Moreover, the algorithms proposed in this paper do not require any computations to be performed but only table look up operations for encryption and decryption.

An Efficient Quasigroup Block Cipher To authors knowledge this is the first complete block cipher algorithm based on quasigroups. 2 Background on Quasigroups Quasigroups, when used in cryptography, consist of an n n matrix formed by permutations of elements {1, 2,...,n}, such that no element repeats in any row or column and all elements appear in every row and column. Here n is called the order of the quasigroup. Commonly chosen value of n is 256, this allows for a convenient equivalency between Quasigroup entities and individual 8-bit bytes. Quasigroups support an operation, denoted by, for any two indices the matrix such that a corresponding inverse operation, denoted by \, exists. For example, for any two indices x and y, the following holds true: x y = x z y = z and y x = z x y = z.further,x y = z implies y = x \ z. As such, the operation has closure based on the definition of the finite field and is invertible. However, in general, this operation is not commutative, distributive, or associative. Latin square equivalence classes [18] are those squares that are related by some simple transformation. One example is to take a given square and add one modulo n. Examining the pattern of numbers distributed in the square, both have the same symmetries, and thus form a type of equivalence. The equivalence class we are interested in is one where we rearrange the members of the ordered triple found in the orthogonal array representation. Here we transpose (r i, c j,v ij ) with (r i,v ij, c j ) of our Quasigroup. This is a valid transposition producing an equivalent Quasigroup. We know this to be true by the very nature of the Quasigroup s Latin square definition. Tables 1 and 2 are transpositions of each other. Example 1 Table 1 presents a quasigroup of order 6. The left most column and the top most row are index numbers. An initial seed element is chosen, say s = 3, and let the input data stream be represented by {m 1, m 2, m 3, m 4, m 5, m 6, m 7, m 8 }={1, 5, 4, 2, 6, 4, 5, 3}. Then the encryption process produces an encrypted output stream {c 1, c 2, c 3, c 4, c 5, c 6, c 7, c 8 } as follows: Quasigroup Encryption 1. Let qgroup[][] represent the quasigroup matrix 2. To encrypt m i s do, Set c 1 = qgroup[s][m 1 ] For i > 1, repeat until all m i s are encrypted c i = qgroup[c i 1 ][m i ] Table 1 A quasigroup of order 6 1 2 3 4 5 6 1 1 3 2 6 4 5 2 2 6 4 5 1 3 3 3 2 6 4 5 1 4 4 5 1 3 2 6 5 5 1 3 2 6 4 6 6 4 5 1 3 2

M. Battey, A. Parakh Table 2 Inverse for the quasigroup in Table 1 1 2 3 4 5 6 1 1 3 2 5 6 4 2 5 1 6 3 4 2 3 6 2 1 4 5 3 4 3 5 4 1 2 6 5 2 4 3 6 1 5 6 4 6 5 2 3 1 Execution of the encryption operation for the given input stream is shown below: c 1 = s m 1 = 3 1 = 3 c 2 = c 1 m 2 = 3 5 = 5 c 3 = c 2 m 3 = 5 4 = 2 c 4 = c 3 m 4 = 2 2 = 6 c 5 = c 4 m 5 = 6 6 = 2 c 6 = c 5 m 6 = 2 4 = 5 c 7 = c 6 m 7 = 5 5 = 6 c 8 = c 7 m 8 = 6 3 = 5 The above encryption operation is a table look up operation over Table 1. For the decryption operation, inverse quasigroup matrix is constructed (Table 2). To construct the invqgroup[][] matrix, do the following: in the jth column of the ith row in invq- Group[][] matrix write the column number of element j from the ith row in qgroup[][]. To decrypt do the following, 1. m 1 = invqgroup[s][c 1 ] 2. For i > 1, do until all c i s are decrypted m i = invqgroup[c i 1 ][c i ] In general, the direct application of the above encryption algorithm is very effective in randomizing the input data stream. However, given an input data stream and its corresponding output data stream a known plain text attack can be launched because qgroup[c i 1 ][m i ]=c i. Consequently, qausigroups as stream ciphers may provide only limited security. 3 Proposed Algorithm 1: Quasigroup Block Cipher In order to make quasigroup similar in functionality to the popular AES system, we use 32 different seeds for each round of encryption. Multiple rounds of encryption with different seeds in different rounds finesse the known-plaintext attack and provide a higher level of security, as in the case of Triple DES and AES. We choose 32 seeds, because we assume that each seed is one byte in size and 32 bytes is equal to 256 bits, which is the commonly used key length for AES systems. In order to introduce dependencies between bytes of input data, we divide the data into 128 bit (16 byte) blocks and encrypt each block separately using Algorithm 1. Algorithm 1 1. Construct a 256 256 size quasigroup.

An Efficient Quasigroup Block Cipher 2. Generate a random 256 bit encryption key and divide it into 8 bit (1 byte) blocks which will be used as seed elements at every round of encryption. This results in 32, 1 byte, seeds. 3. Divide the source data into 128 bit (16 byte) blocks 4. For each block do the following: (a) For each 8-bit block in the cipher key do the following: i Using the current block as a stream of 16, 8-bit integers, apply the current 8-bit key as the quasigroup cipher seed and encrypt the block. ii Left shift the currently encrypted block by 1, 3, 5 or 7 bits depending on the index of the current 8-bit key block modulo 4. Note that although each block is 128 bits long, when applying quasigroup encryption we further divide the block into 16, 1 byte sub-block. After every round of encryption, all the bits (in the sub-blocks) are taken together and then rotation is applied before the procedure is repeated. A pseudo code is given below: The shift distances of 1, 3, 5, and 7 are each relatively prime to 2 and thus to 8 (size of a byte). Their sum is 16 (size of 2 bytes) and if each shift is applied 8 times, their sum becomes 128, which is equal to the block size of 128 bits (16 bytes) into which the input data was divided. Therefore, one full rotation of block occurs with shifts of 1, 3, 5 and 7 when all the 32 seeds are used. This ensures that all the bytes in the encrypted block become interdependent. Figure 1, below demonstrates this algorithm graphically. Here again, we see the process of selecting a block performing the Quasigroup transformation, bit-shifting, and repeating. 3.1 Test Implementation A test implementation was developed in C#.net, because of the popular adoption of C# and the pre-existing AES cipher suite. Also, Microsoft Visual Studio 2010 has built in unittesting facilities, which combined with Test-Driven-Development, produced well-tested code in reduced increments of time. The test implementation has the ability to overwrite the plaintext buffer in place, limiting the memory footprint required to encode a buffer. Keys were generated using random-number generator, System.Random, allocating 16 random bytes per request. Full n n Quasigroup matrices were constructed for both encryption and decryption

M. Battey, A. Parakh Fig. 1 Flowchart for the quasigroup block cipher (proposed Algorithm 1). Here M is the entire message, M( j) is the jth block in the message, K is the key, K (i) is the ith seed in the key string, M is the size of message in bytes, K is the size of key string in bytes, i is the iterator of key bytes and j is the iterator of message blocks using the Knuth/Fisher Yates Shuffle [5]. Both the encryption and decryption routines were constructed and tested. 3.2 Analysis We used the National Institute of Technology-Statistical Test Suite (NIST-STS) suite to evaluate the randomness introduced by the system in the cipher. The NIST-STS package gives a P value and Success/Fail status for various standardized tests. The P value is the probability that a perfect random number generator would have produced a less random sequence than the one being tested [19]. Based on the research by the NIST-STS team, each test was given a P value threshold. When a P value result from a test crossed these thresholds, the test was considered successful. Control tests were performed against the plain text source (it should be noted the control failed each test). The NIST-STS test suite is available freely in C source code, and downloadable from http://csrc.nist.gov/groups/st/toolkit/rng/index. html. The tool can be configured to read a source file as a stream of bits, and evaluate the randomness of that stream. We report the results for the following tests, where the parameters used for the tests are given in Table 3. Approximate Entropy (AE): A test comparing all overlapping m-bit patterns. Block Frequency (BF): A test which evaluates the proportion of 1 s in m-bit blocks.

An Efficient Quasigroup Block Cipher Table 3 Parameters for the NIST-STS test Block length (m) Block frequency test 128 Non-overlapping template test 9 Overlapping template test 9 Approximate entropy test 10 Serial test 16 Linear complexity test 500 Table 4 The table shows average P values (over 20 runs) for quasigroup encryption as compared to AES256 encryption system when the same encryption key is used for both cryptosystems without Cipher-Block- Chaining (CBC). Each source data set consists of 288 bytes of sample data Test P value for QG P value for AES P value QG as %ofp value of AES All 0x00 input AES All 0x00 input QG All 0xFF input AES All 0xFF input QG Block frequency 0.57189 0.53593 106.71 0.59109 0.57530 0.48253 0.64041 CS-F 0.47759 0.45340 105.33 0.47739 0.42955 0.36766 0.50679 CS-R 0.47995 0.46111 104.08 0.48052 0.43870 0.36949 0.49906 FFT 0.15798 0.15622 101.12 0.03377 0.043198 0.05215 0.05501 Frequency 0.40314 0.40006 100.77 0.38935 0.34988 0.29779 0.39156 Longest run 0.30803 0.29188 105.53 0.24881 0.21313 0.17118 0.27998 Runs 0.40384 0.40136 100.62 0.37347 0.37045 0.38143 0.35849 Cumulative Sums, Forward (CSF), Reverse (CSR): Evaluates whether the maximal cumulative sum of partial sequences is outside the range for expected behavior of a random sequence. Discrete Fourier Transform (FFT): Implemented as a Fast Fourier Transform, detects repeating or periodic features that are near to each other. Frequency (FREQ): Evaluates the frequency of 1 s and 0 s in the entire sequence. Longest Run: Comparison of longest contiguous run of 1 s in m-bit blocks to expected frequency of same. Rank: The rank of disjoint sub-matrices within the entire sequence. Runs: Finds and evaluates the longest sequence of contiguous 1 s in the entire sequence and compares the oscillation between 1 s and 0 s to a standard frequency. Serial: Compares the frequency of all m-bit overlapping patterns in the full sequence. Two variations are applied. Each test, upon test completion, a P value result is rendered which is to be interpreted as above. If a P value for a test is determined to be equal to 1, then the sequence appears to have perfect randomness. A P value of zero indicates that the sequence appears to be completely non-random [19]. However, both P values of 1 and 0 are fatal error conditions in the tests. Table 4 shows the P values for the various tests. In the table the first three columns show the average P values for all zero (0x00) input, all 0xFF input and a text taken from Aesop fables ( From the Goose and the Golden Eggs ). The first column lists the various tests done, second column is the average P values for encryption of all three inputs using quasigroups, third column is the average P value for all three inputs using AES and the fourth column

M. Battey, A. Parakh Table 5 Operations necessary to encrypt a 16 byte block with a 32 byte key, note left shift can be greatly reduced using integers wider than 8 bits Encrypt One 2D array lookup 1 op Left shift Two 64-bit left shift 2 ops Total Ops 16 byte block 3 16 48 ops Total Ops 32 byte key 48 32 1,536 ops is the ratio of the P value of encryption using quasigroups to that using AES multiplied by 100. The last four columns are P values for all zero (0x00) and 0xFF inputs. On memory and computational requirements: The n n matrix consumes 64 KB ram. The function was developed in such away that the input data could be directly overwritten, no additional buffers were required. Processing efficiency is as follows: for each byte in the block, lookup the QG re-encoded value from the matrix, then left shift the block. Table 5 lists the number of operations necessary when encrypting data. The number of operations to decrypt is similar. 4 Proposed Algorithm 2: Quasigroup Block Encryption with Cipher Block Chaining To improve the performance of quasigroup block ciphers in the Approximate Entropy, Serial 1 and Serial 2 tests, we extended algorithm 1 to include cipher block chaining (CBC). Mathematically, CBC is written as: C 0 := e(k, M 0 iv) C n+1 := e(k, M n+1 C n ) where, C n : an indexed cipher text block, M n : an indexed plain text block, k: the cipher key (here seed), iv: A random initialization vector, where iv = C n = M n, e(k, m): the encryption function, QGBC in this case. 4.1 Test Implementation After implementing quasigroup block cipher with cipher block chaining, tests were repeated 20 times using a 256 bit random key (32, 1 byte seeds) each time. The resulting encrypted data was tested for randomness using the NIST-STS test suite, using the same parameters as before. Table 6 compares a average P value results from the NIST-STS test suite. The quasigroup block cipher with CBC outperformed AES256 with CBC in almost all cases. It is to be noted that the variance of P values between different test results may be misleading, as each test has different acceptance tolerance for P values. For this reason, the NIST-STS package provides a Success/ Fail determination. Every test, in the NIST-STS suite, has been evaluated by the test designers and a threshold set indicating the point where P values are considered good enough. A second evaluation of the AES and QGBC cryptosystems (both in CBC mode) was also run. Here, source data sets of 295 KB are encrypted and then assessed by the STS suite. One thousand (1,000) encryption runs were executed against a file consisting of all binary zeros, all binary 0xFF s, all ASCII letter E s, and the Project Gutenberg imprint of Beowulf [10]. Each of the 1,000 runs used a unique 256 bit key. Each of the four input files was first encrypted via AES and then via QGBC.

An Efficient Quasigroup Block Cipher Table 6 The table shows average P values (over 20 runs) for quasigroup encryption as compared to AES256 encryption system when the same encryption key is used for both cryptosystems with Cipher-Block-Chaining (CBC). Data sets were of a short variety, constructed from a sequence of 288 bytes Test P value for QG P value for AES- CBC P value QG as %ofp value of AES-CBC All 0x00 input AES- CBC All 0x00 input QG All 0xFF input AES- CBC All 0xFF input QG Block frequency 0.48822 0.51274 95.22 0.52155 0.47478 0.50250 0.48499 CS-F 0.51939 0.50588 102.67 0.50527 0.49851 0.48968 0.48843 CS-R 0.52502 0.48904 107.36 0.49205 0.51126 0.47860 0.49353 FFT 0.50188 0.48532 103.41 0.46172 0.48304 0.49187 0.49118 Frequency 0.50190 0.47353 105.99 0.48847 0.47584 0.46486 0.48745 Longest 0.50468 0.47228 106.86 0.47476 0.46822 0.46320 0.53736 run Runs 0.54392 0.52 106.17 0.53926 0.55004 0.51784 0.54467 Serial 1 0.53571 0.53584 99.98 0.53300 0.51054 0.54146 0.56533 Serial 2 0.51635 0.49246 104.85 0.49903 0.52310 0.47274 0.51659 Table 7 Successes per 1,000 encryption tests. 295 KB of 0x00, E, 0xFF, and the text of Beowulf [10] were encrypted with 1,000 different keys via the Quasigroup Block Cipher and AES, both in CBC mode, to demonstrate the ability to produce randomized data sets for long input data sequences Test AES QGBC 0x00 E 0xFF Beowulf 0x00 E 0xFF Beowulf AE 988 989 986 985 986 995 988 992 BF 992 990 994 991 991 991 986 991 CSF 990 993 990 994 988 992 996 992 CSR 994 989 991 994 986 994 994 994 FFT 990 988 989 986 984 981 990 980 FREQ 992 992 989 994 991 992 996 992 LR 991 987 991 989 990 988 987 991 Rank 989 989 996 989 994 995 982 995 Runs 994 988 993 991 987 993 989 993 Ser1 990 992 995 995 991 990 989 994 Ser2 986 993 990 987 984 993 991 988 Table 7 and Fig. 2 compare the success rates for these assessments. Results between the AES system and QGBC are comparable, both scoring in the 98 percentile or better. 4.2 Test on Audio Input Since sensors may be used to collect audio signals we perform the encryption operation using quasigroups on an audio input file. The source (taken from http://www.nch.com.au/ acm/11k16bitpcm.wav) and the encrypted audio waveforms are plotted in Figs. 3 and 4

M. Battey, A. Parakh Fig. 2 Plot of success results when evaluating 1,000 encryption runs of the 295 KB source files. Here we see that the QGBC compares favorably to the AES results Fig. 3 Plot of original input audio waveform respectively. As we can see the quasigroup encryption system is very good at distributing the amplitude of the audio signal over the entire range. We further perform a comparison of the randomness of the signal using the NIST-STS and tabulate the results for the various tests in Table 8. We see that in most cases the quasigroup block cipher with CBC randomizes the input waveform much more than AES256 does, especially in the case of Fast Fourier Transform (FFT) tests. 5 On Theoretical Security of Quasigroup Ciphers The total number of Latin squares of order n, n > 2, is given by LS(n) = n!(n 1)!T (n), where T (n) denotes the number of reduced Latin squares of order n. The numbers T (n) and LS(n) increase very quickly with n [20]. Table 11 gives the number of reduced Latin squares. From Table 12 we see that the number of possibilities for the Latin squares is astronomical. Therefore, if the quasigroup is kept secret along with the 256 bit key (32 random seeds) the system provides very good security.

An Efficient Quasigroup Block Cipher Fig. 4 Plot of encrypted output audio waveform Table 8 P values for the audio encryption using quasigroup encryption and AES256 Tests P value for AES- CBC P value for QG- CBC P value of QG-CBC as %ofp value of AES-CBC Approximate entropy 0.00240 0.00221 92.13 Block frequency 0.47894 0.46862 97.84 CS-F 0.45362 0.50949 112.32 CS-R 0.45870 0.49385 107.66 FFT 0.44155 0.49124 111.26 Frequency 0.45255 0.50741 112.12 Longest run 0.47043 0.48993 104.15 Rank 0.48931 0.46916 95.88 Runs 0.48137 0.49307 102.43 Serial 1 0.52025 0.50224 96.54 Serial 2 0.50510 0.50571 100.12 6 Storage Optimization: Low-Overhead Quasigroup Representation A quasigroup matrix of order n requires the storage of a matrix of size n n.ifweconsider each element to be one byte in size (n = 256) then the matrix required is of size 256 256, resulting in a storage requirement of 64 KB or n 2 elements. In order to reduce the amount of storage, we take the advantage of the fact that if we set v ij = r i + c j mod n, then a matrix preserves the quasigroup structure; where r i and c j are row and column indices, respectively, and v ij is the value in the cell denoted by row r i and column c j. Now, one could shuffle the columns and rows using Fisher-Yates shuffling algorithm to generate a random quasigroup. In essence, if we were to use the initial identity v ij = r i + c j mod n and only store the shuffled states of the indices of rows and columns then we can reduce the storage requirement to 2n from n 2, which is a savings of O(n 2 ). This comes at the cost that total number of quasigroups that can be created by shuffling of rows and columns is (n!) 2 (which is less than n!(n 1)!T (n)). However, for all practical purposes for our implementation this gives (256!) 2 possibilities for the quasigroup, which is very large and provides practical security.

M. Battey, A. Parakh Table 9 A un-shuffled Quasigroup corresponding to v ij r i + c j mod n 0 1 2 3 4 5 0 0 1 2 3 4 5 1 1 2 3 4 5 0 2 2 3 4 5 0 1 3 3 4 5 0 1 2 4 4 5 0 1 2 3 5 5 0 1 2 3 4 Table 10 A shuffled quasigroup resulting from r i and c j having been shuffled Note that while the values within the Quasigroup still conform to the v ij r i + c j mod n,but have lost the regularity of the un-shuffled reduced Quasigroup 2 0 5 4 3 1 4 0 4 3 2 1 5 1 3 1 0 5 4 2 3 5 3 2 1 0 4 5 1 5 4 3 2 0 0 2 0 5 4 3 1 2 4 2 1 0 5 3 Table 9 is the initial starting matrix given by the identity v ij = r i + c j mod n. Table10 shows a randomly shuffled state of the quasigroup matrix in Table 9. Thetoprowandthe left most column are the row and column indices of the matrix. Table 10 shows the shuffled state of the indices from Table 9. Our storage savings arise from the fact that we can store only the initial identity equation and the 2n shuffled indices for the entire quasigroup. 7 Conclusion and Future Work In this paper we have proposed algorithms for implementation of quasigroup block cipher. The strength of the algorithms was assessed by assessing the randomizing property of the system and the use of statistical test suite by NIST (NIST-STS). Results of the simulations are tabulated and it is observed that in almost all the cases the output generated by the quasigroup encryption system is as or more random than that produced by AES256 for the same encryption key used. The results presented were for average P values over 20 runs for all zero (0x00) input, all 0xFF input, and an Aesop fable. We also performed tests on audio input and results have been presented. In future work, we intend to perform cryptanalytic attacks on the proposed quasigroup algorithms. We would also like to make the quasigroup matrix public with only 32 seeds kept secret. A research question would be to see what is a good candidate for a quasigroup (out of numerous possibilities) when it is public [4]. We also intend to look into FPGA implementations of the proposed system. References 1. Bakhtiari, S., Safavi-Naini, R., & Pieprzyk, J. (1997). A message authentication code based on latin squares. In Proceedings of the second Australasian conference on information security and privacy (ACISP 97), London, UK (pp. 194 203). Berlin: Springer.

An Efficient Quasigroup Block Cipher Table 11 Number of reduced Latin squares of order 2 15 n T(n) 2 1 3 1 4 4 5 56 6 9048 7 16942080 8 535281401585 9 377597570964258 10 7580721483160132811489280 11 5.36 10 33 12 1.62 10 44 13 2.51 10 56 14 2.33 10 70 15 1.50 10 86 Table 12 Bounds for number of Latin squares for orders 16, 32, 64, 128 and 256 0.689 10 138 LS(16) 0.101 10 119 0.985 10 785 LS(32) 0.414 10 726 0.176 10 4169 LS(64) 0.133 10 4008 0.164 10 21091 LS(128) 0.337 10 20666 0.753 10 102805 LS(256) 0.304 10 101724 2. Battey, M., Parakh, A. (2012). Efficient quasigroup block cipher for sensor networks. In 2012 21st international conference on computer communications and networks (ICCCN) (pp. 1 5). July 30 2012 August 02 2012. 3. Borujeni, S. (2000). Speech encryption based on fast fourier transform permutation. In The 7th IEEE international conference on electronics, circuits and systems, 2000 (ICECS 2000) (Vol. 1, pp. 290 293). 4. Dvorsky, J., Ochodkova, E., Sna, & Andel V. (2010). Quasigroups with good statistical properties. In 2010 International conference on computer information systems and industrial management applications (CISIM) (pp. 244 249). 5. Fisher, R. A., & Yates, F. (1965). Statistical tables for biological, agricultural and medical research. 6. aufl. oliver & boyd, London 1963. 146 s. preis 30 s. Biometrische Zeitschrift, 7(2), 124 125. 6. Gligoroski, D. (2004). Stream cipher based on quasigroup string transformations in zp. In Contributions, Sec. Math. Tech. Sci. 7. Gligoroski, D. (2005). Candidate one-way functions and one-way permutations based on quasigroup string transformations. Cryptology eprint Archive, Report 2005/352. 8. Gligoroski, D., Markovski, S., & Knapskog, S. J. (2008). Public key block cipher based on multivariate quadratic quasigroups, 2008. Updated and extended version of the paper presented at MATH 08 Cambridge, MA, USA, March 24 26, 2008. Last revised August 2, 2008. 9. Gligoroski, D., Markovski, S., & Kocarev L. (2007). Error-correcting codes based on quasigroups. In Proceedings of 16th international conference on computer communications and networks, 2007 (ICCCN 2007) (pp. 165 172). 10. Gummere, F. B. (1997). Beowulf. http://www.gutenberg.org/ebooks/981.txt.utf-8. 11. Hoffstein, J., Pipher, J., & Silverman, J. H. (1998). Ntru: A ring-based public key cryptosystem. In Lecture Notes in Computer Science (pp. 267 288). Springer: Berlin. 12. Ian, G. S., Blake, F., & Smart, N. P. (2005). Advances in elliptic curve cryptography. Cambridge University Press. 13. Marnas, S. I., Angelis, L., & Bleris, G. L. (2007). An application of quasigroups in all-or-nothing transform. Cryptologia, 31(2), 133 142. 14. Mosa, E., Messiha, N., & Zahran, O. (2009). Chaotic encryption of speech signals in transform domains. In International conference on computer engineering systems, 2009 (ICCES 2009) (pp. 300 305).

M. Battey, A. Parakh 15. Parakh, A., & Kak, S. (2009). Online data storage using implicit security. Information Sciences, 179(19), 3323 3331. 16. Parakh, A., & Kak, S. (2010). Efficient key management in sensor networks. In 2010 IEEE GLOBECOM workshops (GC workshops) (pp. 1539 1544). 17. Parakh, A., & Kak, S. (2011). Matrix based key agreement algorithms for sensor networks. In 2011 IEEE 5th international conference on advanced networks and telecommunication systems (ANTS) (pp. 1 3). 18. Rosenhouse, J., & Taalman, L. (2011). Taking Sudoku Seriously: The math behind the world s most popular pencil puzzle. USA: Oxford University Press. 19. Rukhin, A., Soto, J., Nechvatal, J., Barker, E., Leigh, S., Levenson, M., et al. (2001). A statistical test suite for random and pseudorandom number generators for cryptographic applications. NIST, Special Publication 800-22, Revision 1a. 20. Satti, M., & Kak, S. (2009). Multilevel indexed quasigroup encryption for data and speech. IEEE Transactions on Broadcasting, 55(2), 270 281. Author Biographies Matthew Battey is with the Computer Science Department at University of Nebraska at Omaha and a Principal Architect with Aspect Software, a Microsoft Professional Services and Telephony company in Omaha, NE. Matt s interests lie in distributed systems and data coding which culminate in cryptography and related studies. Abhishek Parakh is with the Nebraska University Center for Information Assurance at the University of Nebraska at Omaha. His research interests include applied cryptography, computer networks, data security and privacy in cloud computing, information assurance and design and analysis of algorithms.