- Open Access
A 3-d advancement of PythoCrypt for any file type
© Jois et al. 2015
- Received: 29 March 2015
- Accepted: 29 November 2015
- Published: 18 December 2015
This research work discusses a file-type-independent cryptosystem using the conversion of Cartesian and Polar coordinate systems in three dimensions. This is an advancement to PythoCrypt (IJESM, Vol-3,Issue-2, 48-51,2013) where a new algorithm was discussed that can be effectively used to provide security to medical images (IEEE, Proceedings of ICe-HNAS-9, 244 – 247, 2007) or files that have a small region or block of interest (JMBE, Vol- 27, Issue-3,144-149, 2007)(Springer.Link, FAW-1 proceedings, 62-73,2007). The usage of geometrical objects for encryption is still young and an attempt was made to employ an enhanced method of PythoCrypt to encrypt different file types. The present research work explores the inter-operability of the two coordinate systems as a basis for a cryptosystem. The work proposes a crypto-system with considerable security with one requirement; the use of a secure channel for key exchange.
- 3-d coordinates
- Block cipher
Cryptography is the prime requisite for secure communication systems as networks are required to provide the user with privacy and security. The increase in security threats to communication and data has prompted a great leap in research towards development of advanced cryptosystems. The evolution is documented as follows.
Apart from Caesar cipher (Andrew 2006) - a cyclic substitution cipher used by Julius Caesar in 50 B.C., there are many codes that are no longer used. Instead of the codes the security of information is more dependent on higher mathematical algorithms.
The Diffie–Hellman (Diffie and Hellman 1976) key exchange algorithm addressed one of the biggest challenges of all reasonably secure cryptography that was the need for a secret key distributed separately to ensure encrypted communications. In 1976, Whitfield Diffie and Martin Hellman published their method for public exchange of a secret key. This algorithm popularly known as Diffie - Hellman key exchange and was the first known way to distribute keys for secure communication that didn’t involve transmitting the key by some private mechanism first.
The RSA (Rivest) algorithm proposed by and named after R. Rivest, A. Shamir and L. Adleman in 1978 is used for both public key encryption and digital signatures. It is the most widely used public key encryption algorithm. The basis of the security of the RSA algorithm is that it is mathematically infeasible to factor sufficiently large integers. The RSA algorithm is believed to be secure if its keys have a length of at least 1024-bits.
Data Encryption Standard (Meyer and Matyas 1982; Coppersmith 1992) is a block cipher that was selected by the National Bureau of Standards as an official Federal Information Processing Standard (FIPS) for the United States in 1976 and which has subsequently enjoyed widespread use internationally. It is based on a symmetric-key algorithm that uses a 56-bit key. DES consequently came under intense academic scrutiny which motivated the modern understanding of block ciphers and their cryptanalysis. DES is now considered to be insecure for many applications. This is chiefly due to the 56-bit key size being too small
Advanced Encryption Standard (Highland 1992) is an encryption standard which comprises of three block ciphers, AES - 128, AES – 192, AES – 256. Each AES cipher has a 128-bit block size, with key sizes of 128, 192 and 256 bits, respectively. The AES ciphers have been analyzed extensively and are now used worldwide, as was the case with its predecessor, the Data Encryption Standard (DES).
3-DES is similar to the DES. It is three times slower than the actual DES but when used appropriately is more secure than DES. Triple DES enjoys much wider use than DES because DES is so easy to break with today’s rapidly advancing technology. Triple DES is simply another mode of DES operation. It takes three 64-bit keys, for an overall key length of 192 bits. It also has the advantage of proven reliability and a longer key length that eliminates many of the shortcut attacks that can be used to reduce the amount of time it takes to break DES.
Elliptic Curve Cryptography (William et al. 2013) is one of the latest additions to Asymmetric Key Cryptosystems. It uses planar elliptic curves as bases for encrypting data, where points on the plane are used as parameters with infinity (∞) as a reference (identity) point. However, like any asymmetric (public) key cryptosystem, the integrity of this system is not proven.
Quantum Key Cryptography (William et al. 2013) or Quantum Cryptography is one of the most promising new entries into symmetric key cryptosystems. It employs quantum mechanics principles to accomplish cryptographic tasks. Even though currently it is being used only sparingly for key distribution and is extremely costly to install, it may be the future of cryptosystems as it is the only defense against a quantum computing attack (William et al. 2013).
PythoCrypt (Harsha et al. 2013) discussed the application of Pythagorean triplets for encryption and subsequent decryption of medical images in two dimensions. Here a concept that is used in civil engineering; especially survey (Geological Survey Professional Paper, Volumes 1375–1984, Survey marking, Cornell University, Fall 1981), to locate a point using 3 parameters is used. The method is to permanently mark a point before closure of the days survey work with which the commencement of survey can be done without hassle on any subsequent day. The permanent point will be theoretically marked with two basic parameters and one validating parameter. There can be more number of points satisfying that basic parametric condition. The basic parameters are sufficient for encryption but the third dimension parameter or validating parameter is necessary for decryption. Hence this location system is a “3–d coordinate system” that is very efficient for surveys that need to cover very large areas and requires more time to complete the work.
In this paper the method of 3–d system with mapping between Cartesian and Polar coordinates that can be used for encryption and decryption of files of various types and sizes effectively will be discussed. Pythocrypt (Harsha et al. 2013) was specifically developed for medical images where as the present system proposed can be applied for any file type supported by any platform and hence it is termed file-type-independent. The algorithm proposed in this paper shall henceforth be addressed as “3-d Pythocrypt”.
3-d Pythocrypt is a new concept which has been developed to encrypt and decrypt files of all types using a file-type independent algorithm proposed in Pythocrypt (Harsha et al. 2013). The algorithm “3-d Pythocrypt” uses the infinite divergence (Ashtiyani M., etal, 2008) of the 3-dimensional coordinate system definition of a sphere. The algorithm is unique compared to all the existing algorithms as it does not need a key for encryption, but generates one for the purpose of decryption. Also the entire algorithm is asymmetric, i.e. the encryption and decryption processes are dissimilar.
The algorithm “3-d Pythocrypt” is independent of platforms and applications. It can be implemented on any system depending on the type of application needed. Any application such as mail, chat and file system can use this algorithm as an add-on without hindering the performance.
It is this feature that prompted the use of the inter-operability of the Cartesian and Polar coordinates for 3- dimensional systems.
Similar to the 2-dimensional coordinates, the 3-dimensional coordinates are also infinitely divergent. This unique feature has been exploited in the design of “3-d Pythocrypt”.
The Encryption phase: Here the plain text i.e. the information is read as byte stream. One set of 3 chunks having 2 bytes each is mapped onto a sphere base using the 3-D coordinate system.
The Key generation phase: Here the destination set, i.e. the parameters defining the sphere are obtained and separated into two subsets.
The sphere’s base is combined with one of the subsets and stored as cipher text. The other subset forms the Decryption key.
The Decryption phase: The cipher text and the key are parsed to separate the Sphere base and the definition parameters.
The actual byte sets are obtained by individually operating the sphere base with the necessary parameters. During this process, each set of 6 bytes (48 bits) of plain text generates 8 bytes (64 bits) of cipher text and key and it has a minimal bloating up of the file which means, lower network transit time (Andrew 2006), Computation Time (CPU time in term of clock cycles) and Optimization of routing Algorithms (Andrew 2006).
The encryption phase
The design of the algorithm uses the inter-convertibility from Cartesian to Polar Coordinates. It is necessary to have at least four of these parameters (Niven and Zuckerman 1972) to evaluate the other four. That is a condition, which can exist only if the four available parameters are independent. Otherwise a subset having five parameters is the minimum requirement for the complete set to emerge.
The algorithm “3-d Pythocrypt” utilizes this to and fro conversion for encrypting and decrypting data.
R is a large number in the format ccccccc.eeeeeee. R is floored (rounded down) to get only ccccccc. This forms C (Cipher text Parameter 1). The number of digits (n) in eeeeeee is counted. C is subtracted from R to get 0.eeeeeee, which is then multiplied with 10n to obtain eeeeeee as another integer. This forms E (cipher text parameter 2).
The planar radii OA and OB form the parameters A and B respectively.
Then the supporting parameters θ and Φ are obtained using arccosine functions on A, B and R as shown in Fig. 2.
The key generation phase
The parameters obtained in previous section are separated and put into two files having type suggested by the user (Meyer and Matyas 1982; Bruce et al. 1995). These form the cipher text and the key. The key generated after the encryption is complete and does not play any role in the process of encryption. This is the most important characteristic of “3-d Pythocrypt”.
The separation is done as C, E and OA go to the cipher text file and OB, θ and Φ go to the key file. Each of these parameters is 16 bits long and hence the size change from N bytes in the plain text to 4 N/3 in the cipher text. The generated key also has the same length as that of the cipher text.
The decryption phase
In this phase, the cipher text and the key text are combined to bring back the original plain text (Sinkov 1966). However, unlike the existing standard algorithms the decryption process in “3-d Pythocrypt” is not a mirror of the encryption process. This is again, a unique characteristic of “3-d Pythocrypt” which is explained as follows.
The numbers (OX, OY and OZ) are written into a file which forms the decrypted plain text file. Since the decryption process uses a separate set of operations compared to encryption unlike existing algorithms, this asymmetry of process is a unique feature.
The algorithm is tested on a number of files of different types. First the program is run on a simple English string. The cipher text and key generated are shown in the table in case 1 (Additional file 1). The last column displays the decrypted text and it is clear that there is no error in the decryption phase.
Then the algorithm is run on a simple image file as shown in Additional file 1: Figure S1. It is a sample image available in all windows™ Computers to be used in MS Office™ applications. The cipher text and key are shown in case 2 (Additional file 1), as text files. The decrypted image is shown in Additional file 1: Figure S2. Once again there is no difference between the decrypted file and original file indicating the success of “3-d Pythocrypt”.
As an example to show that “3-d Pythocrypt” also works on formatted files (.doc, .docx, .xls, .ppt etc.), this document (3-d Pythocrypt.docx) is encrypted using “3-d Pythocrypt” and the results are shown in Additional file 1: Figures S3-S6.
Performance comparison of “3-d Pythocrypt” with some standard algorithms and Pythocrypt (Harsha et al. 2013) considering Weighted Space-Time-Complexity (WSTC)
DH (Diffie and Hellman 1976)
DES (Coppersmith 1992)
3-DES (Biham et al. 1993)
PythoCrypt (Harsha et al. 2013)
Pythocrypt and 3-d Pythocrypt are unique as the encryption process is independent of the key
Multiple Iterations of Simple logical operations
Multiple Iterations of Simple logical operations
Multiple Iterations of Simple logical operations
Trigonometry of 2-dimensions
Trigonometry of 3-dimensions
The conversion between coordinate systems is the key in 3-d Pythocrypt
Brute Force, Relative Key (William et al. 2013)
Brute Force, Relative Key (William et al. 2013)
Relative Key (William et al. 2013)
Multi-agents (William et al. 2013)
Multi- agents (William et al. 2013)
“3-d Pythocrypt” can be partially cryptanalyzed using Multi agent systems for pattern recognition
Varies depending on implementation
On an octa-core (William et al. 2013) AMDTM PhenomTM Processor
3.40282E + 38
1.8447E + 19
7.2058E + 16
1.16E + 77
6.2771E + 57
1.3E + 154
4.013E + 205
Normalized Key size
Ratio of Key size and File size
Normalized Cryptanalysis Time
“3-d Pythocrypt” needs the maximum time for cryptanalysis
Normalized Encryption Time
Normalised against 3-DES
Weighted Space–Time- Complexity Index
The proposed index for comparison
The parameters used to obtain the Weighted Space-Time-Complexity Index proposed in this paper and the parameters used to obtain it are detailed below.
The file sizes taken as 1024 bits where as the key sizes are dependent on the algorithms. The encryption and cryptanalysis are done on an AMD™ Phenom™ Octa-core Processor and times are normalized. The time required to cryptanalyze One Time Pad (OTP) (Highland 1992) is taken as infinity (∞) and all other parameters are normalized against the maximum values in their corresponding range. The numerical values are tabulated.
From Table 1, it is evident that “3-d Pythocrypt” fares well against standard algorithms with 2 byte block size. However, it can outperform most algorithms as the cipher text will be too large in size and any sphere has infinite surface points with increase in block size. Further it also has infinite divergence for backtracking. A new radical approach of cryptanalysis titled “Multi agent pattern recognition” (William et al. 2013) is able to obtain parts of possible plain text after multiple iterations on a single file. This approach uses small pieces of codes called agents to try and obtain similar patterns in a packet in transit. They work independent of the source and obtain repeated patterns in the files. Since “3-d Pythocrypt” uses 16 bit blocks for this experiment, in English text, if there are 3 similar 2 letter blocks appearing consecutively, they would generate same cipher text. Once the source program obtains all the repeated patterns and their locations in the cipher text, it can then run a dictionary attack (William et al. 2013, Rabin, 1976) on the patterns to generate possible sets of plain text. However this works only on unformatted English text and since “3-d Pythocrypt” encrypts the entire file including the header block, even this form of attack can only partially succeed after multiple iterations of dictionary attack. This is because each file has parts of its own data as the key similar to OTP (Highland 1992).
The File-type, size and Platform independent nature makes it a unique cryptosystem
It provides better security against most of the existing cryptanalysis methods
The only susceptibility to Cryptanalysis is partial in nature (only pieces of numerical values can be obtained and not the actual file data) using a multi agent approach for pattern recognition
It surpasses most of the cryptosystems that are in use presently as shown in Table 1 using the proposed Weighted Space-Time-Complexity index.
Open AccessThis article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.
- Andrew S. Tenenbaum, “Computer Communication Networks”, McGraw Hill, Revised 4th edition. 2006.Google Scholar
- Ashtiyani, M. Electr. Eng. Dept., IHU, Tehran, Birgani, P.M. ; Hosseini, H.M, Chaos-Based Medical Image Encryption Using Symmetric Cryptography.Google Scholar
- Bauer FL. “Decrypted Secrets Methods and Maxims of Cryptology”. Springer; 2002. 978-3-540-48121-8 ISBN.Google Scholar
- Biham E, Shamir A. “Differential Cryptanalysis of the Data Encryption Standard”. Newyork:Springer Verlag; 1993.Google Scholar
- Bruce Schneier, Applied Cryptography, 2nd edition, Wiley, 1995Google Scholar
- Coppersmith D. “The Data Encryption Standard (DES) and its strength against attacks”. IBM. 1992; 38(3):243–50.View ArticleGoogle Scholar
- Diffie W, Hellman M. New directions in cryptography. IEEE transaction. 1976;22(1):644–54.Google Scholar
- Feynman RP. Lectures in Applied Mathematics and Theoretical Physics, Princeton University Press, 8th reprint. 1989.Google Scholar
- Geological Survey Professional Paper, Volumes 1375–1984, Survey marking, Cornell University, Fall 1981Google Scholar
- Gujarati D. Basic Econometrics, 4th edition. McGraw-Hill Publications. 2003. 0072335424, 9780072335422 ISBN.Google Scholar
- Harsha S, Bhaskar N, Chandan CM. “PythoCrypt-A cryptosystem for Medical Images”. IJESM. 2013;3(2):48–51.Google Scholar
- Highland HJ. “Perspectives in Information Technology Security”, Proceedings of the 1992 IFIP Congress, Education and Society. 1992.Google Scholar
- Kahn D. The Code breakers - The Story of Secret Writing. 1967.Google Scholar
- Meyer CH, Matyas SM. “Cryptography: A New Dimension in Computer Data Security”, John Wiley and Sons. 1982.Google Scholar
- Niven I, Zuckerman H.S. An Introduction to the Theory of Numbers. Newyork U.S.A:Wiley; 1972.Google Scholar
- Pythagoras, Pythagorean Theorem, 570–495 BC.Google Scholar
- Rabin MO. “Probabilistic algorithms: Algorithms and Complexity”, J. F. Traub Education, New York:Academic Press; 1976.Google Scholar
- Rivest RL, Shamir A, Adleman L. “A Method for Obtaining Digital Signatures and Public-Key Cryptosystems”. Communications of the ACM. 1978;21(2):120–126.View ArticleGoogle Scholar
- Schneier B. Self-Study Course in Block Cipher Cryptanalysis. Cryptologia. 2000;24(1):18–34.View ArticleGoogle Scholar
- Sinkov A. “Elementary Cryptanalysis: A Mathematical Approach”, Mathematical Association of America. 1966. e-book.Google Scholar
- William S. Cryptography and Network Security. 5th Edition. USA:Pearson Publications; 2013.Google Scholar
- Yang Ou, Department of Information Security, Chul Sur, Kyung Hyune Rhee, Division of EC and TE, Pukyong National University, Region-based selective encryption for medical imaging, Busan, Republic of Korea.Google Scholar