Sundar Rajan. R Total No of Pages: 13 Referred: www.google.com www.wikipedia.org
[This document is prepared only for read only purpose and this document should not be copied or recycled with prior permission. This document is created while preparing for paper presentation and National Conference – Theni.]
9790680719 [17.09.2008]
All Copyrights are reserved © 2008
An Efficient Operator based Unicode cryptography Algorithm for Text, Audio and Video Files R.Sumathi *, R.Sundarrajan **
ABSTRACT There are many aspects to security and
The same plaintext will encrypt to different
many applications, ranging from secure
cipher text in a stream cipher .This
commerce
private
algorithm increases the complexity of
communications and protecting passwords.
solving the cipher text when handled by
One
intruders. Thereby it provides extremely
and
essential
payments
aspect
to
for
secure
communications is that of secret key cryptography, which the focus of this paper.
better security for all type of files. INTRODUCTION
With secret key cryptography, a Cryptography is the practice and
single key is used for both encryption and decryption. The key selection mechanism and the encoding methodology express the efficiency of the cipher text generated. In this paper, a new method of encoding technique using the mathematical operators
study of hiding information. In modern times, cryptography is considered a branch of both mathematics and computer science, and is affiliated closely with information theory, computer security, and engineering.
over Unicode character set facilitates better encoding algorithm.
Cryptography is used in applications present
in
technologically
advanced
societies; examples include the security of ATM cards, computer passwords, and * Assistant Professor,Dept of CSE, J.J.College of Engg.& Tech.,Trichy-09. Email ID:
[email protected]
electronic commerce, which all depend on cryptography.
** Pre Final Year Student, Dept of CSE, J.J College of Engg & Tech., Trichy-09
Cryptography refers to encryption, the
process
of
converting
ordinary
information (plaintext) into unintelligible
Integrity: Assuring the receiver that the
cipher text Decryption is the reverse,
received message has not been altered in any
moving from unintelligible cipher text to
way from the original.
plaintext. A cipher is a pair of algorithms which creates the encryption and the reversing decryption. The detailed operation of a cipher is controlled both by the
This is a secret parameter for a specific message exchange context. Keys are important, as ciphers without variable keys are trivially breakable and therefore less than useful for most purposes. Historically, were
often
used
directly
for
encryption or decryption, without additional procedures
such
as
authentication
that the sender really sent this message. Any new design of Cryptographic technique must
algorithm and, in each instance, by a key.
ciphers
Non-repudiation: A mechanism to prove
accomplish
the above
requisites. Cryptography not only protects data from theft or alteration, but can also be used for user authentication. CRYPTOGRAPHIC SCHEMES In
general,
three
types
of
cryptographic schemes typically used to accomplish these goals:
or
integrity checks. PRE REQUISITES
1. Secret Key Cryptography (SKC): Uses a single key for both encryption and decryption
There are various security requirements for a Cryptographic technique including: Authentication: The process of proving one's identity. (The primary forms of hostto-host authentication on the Internet today
2. Public Key Cryptography (PKC): Uses one key for encryption and another for decryption
are name-based or address-based, both of which are notoriously weak.)
3. Hash Functions:
Privacy/confidentiality: Ensuring that no
Uses a mathematical transformation to
one can read the message except the
irreversibly "encrypt" information
intended receiver.
are the various cryptographic schemes
whereas the same plaintext will encrypt to
available
different cipher text in a stream cipher.
depending
upon
their
application and ease of use. SECRET KEY CRYPTOGRAPHY: With secret key cryptography, a
Block ciphers can operate in one of several modes; the following four are the most important:
single key is used for both encryption and
Electronic Codebook (ECB) mode is the
decryption. As shown in Figure 1A, the
simplest, most obvious application: the
sender uses the key (or some set of rules) to
secret key is used to encrypt the plaintext
encrypt the plaintext and sends the cipher
block to form a cipher text block. Two
text to the receiver. The receiver applies the
identical plaintext blocks, then, will always
same key (or rule set) to decrypt the
generate the same cipher text block.
message and recover the plaintext. Because
Although this is the most common mode of
a single key is used for both functions,
block ciphers, it is susceptible to a variety of
secret key cryptography is also called
brute-force attacks.
symmetric encryption. Secret key cryptography schemes are
Cipher Block Chaining (CBC) mode adds a feedback mechanism to the encryption
generally categorized as being either stream
scheme.
In
CBC,
ciphers or block ciphers. Stream ciphers
exclusively-O
operate on a single bit (byte or computer
previous
word) at a time and implement some form of
encryption. In this mode, two identical
feedback mechanism so that the key is
blocks of plaintext never encrypt to the same
constantly changing. A block cipher is so-
cipher text.
Red
cipher
the
plaintext
(XORed)
text
block
is
with
the
prior
to
called because the scheme encrypts one block of data at a time using the same key on each block. In general, the same plaintext block will always encrypt to the same cipher text when using the same key in a block cipher
Cipher Feedback (CFB) mode is a block cipher
implementation
as
a
self-
synchronizing stream cipher. CFB mode allows data to be encrypted in units smaller than the block size, which might be useful in some
applications
such
as
encrypting
interactive terminal input. If we were using
block; 3DES is also described in FIPS 46-3
1-byte CFB mode, for example, each
and is the recommended replacement to
incoming character is placed into a shift
DES.
register the same size as the block, encrypted, and the block transmitted. At the receiving side, the cipher text is decrypted and the extra bits in the block (i.e., everything above and beyond the one byte)
DESX: A variant devised by Ron Rivets. By combining 64 additional key bits to the plaintext prior to encryption, effectively increases the key length to 120 bits.
are discarded.
Advanced Encryption Standard (AES):-
Output Feedback (OFB) mode is a block
This algorithm use a variable block length
cipher implementation conceptually similar
and key length; the latest specification
to a synchronous stream cipher. OFB
allowed any combination of keys lengths of
prevents the same plaintext block from
128, 192, or 256 bits and blocks of length
generating the same cipher text block by
128, 192, or 256 bits.
using an internal feedback mechanism that is independent of both the plaintext and cipher text bit streams.
Similarly, there are Several Algorithms like Blowfish, International Data Encryption Algorithm (IDEA),Two fish,
Secret key cryptography algorithms that are
Camellia, Secure and Fast Encryption
in use today include
Routine (SAFER),SEED, Skipjack. These are algorithms are designed
Data Encryption Standard (DES): DES is a block-cipher employing a 56-bit
extending the ideas already available.
key that operates on 64-bit blocks. DES has a complex set of rules and transformations
PUBLIC-KEY CRYPTOGRAPHY
that were designed specifically to yield fast hardware
implementations
and
Public-key cryptography has been
slow
software implementations
said to be the most significant new development in secure communication over
Triple-DES (3DES): A variant of DES that employs up to three 56-bit keys and makes three encryption/decryption passes over the
a
non-secure
communications
without having to share a secret key.
channel
Public Key Cryptography or Asymmetric
PKC depends upon the existence of so-
cryptography provides the same message
called one-way functions, or mathematical
security
symmetric
functions that are easy to computer whereas
cryptography, but additionally provides the
their inverse function is relatively difficult to
non-repudiation guarantee. ‘Asymmetric’
compute. Let me give you two simple
refers to the fact that different keys are used
examples: In public-key cryptosystems, the
for encryption and decryption.
public key may be freely distributed, while
guarantees
as
One key is kept secret (‘secret key’) and the other is made public (‘public key’), and are both unique. The recipient’s public key should be used during the encryption process to ensure message confidentiality as only the recipient has the necessary secret key to decrypt the message. If, however, the
its paired private key must remain secret. The public key is typically used for encryption, while the private or secret key is used for decryption. Diffie and Hellman showed that public-key cryptography was possible by presenting the Diffie-Hellman key exchange protocol
message is encrypted using the sender’s
In addition to encryption, public-key
private key the sender cannot deny sending
cryptography can be used to implement
the message as his private key is unique and
digital
is only known to him.
signature is reminiscent of an ordinary
Typical include
asymmetric
RSA,
Asymmetric
ElGamal
cryptography
algorithms and
is
DSA.
extremely
powerful, but this comes at a cost. Especially for longer messages and keys, it is
much
slower
than
its
symmetric
cryptography counterparts. This is due in part to the fact that, in order to achieve
signature
schemes.
A
digital
signature; they both have the characteristic that they are easy for a user to produce, but difficult for anyone else to forge. Digital signatures can also be permanently tied to the content of the message being signed; they cannot then be 'moved' from one document to another, for any attempt will be detectable.
comparable security, asymmetric keys are
In digital signature schemes, there
generally around an order of magnitude
are two algorithms: one for signing, in
longer than symmetric keys.
which a secret key is used to process the message (or a hash of the message, or both),
and one for verification, in which the
message, but encrypted using a public-key
matching public key is used with the
algorithm.
message to check the validity of the
schemes are often used, in which a
signature. RSA and DSA are two of the
cryptographic hash function is computed,
most popular digital signature schemes.
and only the resulting hash is digitally
Digital
signed.
signatures
are
central
to
the
operation of public key infrastructures and many network security schemes (e.g.,
Public-key algorithms are most often based on the computational complexity of "hard" problems, often from number theory. For example, the hardness of RSA is related to the integer factorization problem. recently,
cryptography has
elliptic
developed
curve
in
which
problems involving elliptic curves. Because of the difficulty of the underlying problems, public-key
algorithms
involve
operations such as modular multiplication and exponentiation, which are much more computationally
signature
HASH FUNCTIONS
expensive
and one-way encryption, and are algorithms that, in some sense, use no key. Instead, a fixed-length hash value is computed based upon the plaintext that makes it impossible for either the contents or length of the plaintext to be recovered.
security is based on number theoretic
most
hybrid
Hash functions, also called message digests
SSL/TLS, many VPNs, etc).
More
Similarly,
than
the
techniques used in most block ciphers,
Hash algorithms are typically used to provide a digital fingerprint of a file's contents often used to ensure that the file has not been altered by an intruder or virus. Hash
functions
are
also
commonly
employed by many operating systems to encrypt passwords. Hash functions, then, provide a measure of the integrity of a file. Hash
functions
are
sometimes
especially with typical key sizes. As a result,
misunderstood and some sources claim that
public-key cryptosystems are commonly
no two files can have the same hash value.
hybrid cryptosystems, in which a fast high-
This is, in fact, not correct. Consider a hash
quality symmetric-key encryption algorithm
function that provides a 128-bit hash value.
is used for the message itself, while the
There are, obviously, 2128 possible hash
relevant symmetric key is sent with the
values. But there are a lot more than 2128
possible files. Therefore, there have to be
considered. This similarity can be depicted
multiple files in fact; there have to be an
pictorial as follows.
infinite number of files. By the above
basics about the
Cryptography and the study is about the
VALUE 1
*
Cryptographic Schemes available and their methodology of handling keys and way of Encoding
generated
each
class
VALUE X
VALUE 2
of
Techniques.
The value x is definitely different from the value of value 1 and value 2
PROPOSED ALGORITHM:
depending upon the * operation and the After discussed elaborately about the
values.
various cryptographic schemes available and the structure about the algorithms for the
Similarly in the Cryptography the
schemes, the paper is concerned towards the
plain Text must be encoded into Cipher text
new design of “Operator based Encoding
which must different from the original text
Technique with Unicode Character Set
to ensure the security of the data transacted.
Support”. PLAIN TEXT
OPERATORS IN ENCODING:
ENCODING
This
algorithm
is
designed
considering the fact that “Every input plain
CIPHER TEXT
text can be converted into numeric value whatever may be its magnitude”. When Numeric values are resulted
In the above for the encoding
they can be used for mathematical operators
operation performed, the plain text must be
resulting in a different solution than that of
converted into cipher text which cannot be
the origin.
recognized or more precisely the text which is different from the original text.
This concept seems too analogous to the
Cryptography
operation
that
we
Therefore from this we can define
It is 16 bit based character set which
the cipher text in cryptography as the text
encompasses every character available in all
that is different from the original text where
the formats of files available.
the difference needs elongated complex procedures to be followed.
Therefore we came across two basic steps in this design which includes,
Hence we have proved that an operator based algorithm can be used as Encoding technique to generate the required cipher text.
1. Converting any given plain text into numeric values based on Unicode mapping. 2. After numeric mapping the Text
UNICODE SUPPORT: Now
we
established
input is in operable form which is that
the
operated
through
different
mathematical operators can be used for
operators and the required result
encoding. Such encoding is possible if and
once
only if the given plain text (any text) must
Unicode character set.
be converted into operable manner. Operable manner means that the plain text must be converted into numbers
again
mapped
using
Hence the algorithm basic design is completed using Unicode support over operators.
for operation over them. PLAIN TEXT
CIPHER TEXT
Such a mapping for every character into a numeric value is possible only in Unicode character set. In order to convert
UNICODE FORM
OPERATOR F(x)
any text into number Unicode character set support is needed. In Unicode character set, there are 65536 characters available and is a common standard worldwide independent of the languages used.
SECURITY BY FEED-BACK: One of the major properties of the cryptography is the key providing concept
which
provides
security
as
well
of
as
Feedback based Security the
algorithm is designed as,
authorization. Unicode
1. The First character alone is
mapping and operator based encoding favors
added directly with the security
the generation of cipher text but the security
key.
From
the
above,
the
is not discussed.
2. The
following
operated
In order to provide security we shall
by
character
above
is
designed
bind a numeric key as security with the
method over the first and then the
cipher text generated in the above method.
result is made operated towards the next and soon.
Here we have multiple ways for key
3. This kind of Feedback based
binding with the cipher text to be generated.
security illustrates that the same
1. Entire Text Binding:
character is mapped into different
Due to usage of numeric
cipher text depending on the
values to generate the cipher text the
presence of the character at
usage of key in numbers is possible.
various positions in Plain Text.
It is possible to add each character
4. It is called Feed Back based
with key. But it yields a worst
security because the key for the
method of security since the key will
current character under process
be spread over the text uniformly
of encoding depends on the
which cannot be efficient which is
previous input character.
similar to X-shifting the numeric value bonded with the cipher text. Hence this method of key binding can be mostly avoided. 2. Feed Back based Security: Analyzing the failure of the Entire Text Binding, in the method
Indirectly in this kind of Security, we have built the security for whole cipher text This algorithm since provides a key it comes under the mechanism of Secret Key Cryptography discussed in the basics of this paper.
FIRST INPUT FROM FILE TO BE ENCODED
SECRET
OPERATOR BASED ALGORITH M FOR GENERATI NG CIPHER TEXT
CURRENT INPUT FROM FILE
NEXT INPUT FROM FILE TO BE ENCODED
UNICODE CHARACTER SET
FILE TO BE Mapped to respective Cipher Text
OUTPUT FILE – CIPHER
ALGORITHM FOR ENCODING: No Repetition: In
Operatebasedencode () this
algorithm,
no
{
repetition of cipher text for the same character throughout the plain text occurs,
Read currentin from input file
which is considered to be a demerit of the secret key cryptography which we have cleared in this algorithm. The algorithm is designed as follows
Add secretkey with currentin // any other operator can be employed Start loop until endof inputfile
based on the statements concluded above.
Pastcharin=currentin
Hence it is working
Read currentin from input file
fine for all the set of files since it uses
Precipherchar=pastcharin * currentin
Unicode support for character mapping.
Place Mapoverunicode( precipherchar) in Outputfile
Now the secret key applied by applied in this algorithm is feedback based which undergo following criteria
End loop 1. The key applied will be a numeric
}
value
which
must
be
unique
considered upon user.
Mapoverunicode(precipherchar)
2. Since it uses Unicode character set
{
support the no of unique values will be from 0-65536.
Search given precipherchar in Unicode Character Set
3. The number of keys used in the algorithm range is small and is
Return the appropriate character
possible to exceed over 65536 but it recycles within the range.(without
}
using modulus operator) This algorithm uses feedback based secret key in which the key is bonded with
SERIAL DIGIT SECRET KEY:
the cipher text indirectly and so no repetition
Now in order to clear these criteria the key
is allowed.
can be applied to cipher text in blocks by
VALIDITY OF SECRET KEY: The above algorithm is tested so many times and it is working fine for the input files of various types like text files, documents, and even mp3 files (Audio Files) and video files.
blocks. The operation needs a range of numbers where every figure in the key provided will be added in blocks to the entire cipher text. Suppose
that
for
a
text
“COMPUTER” for certain encoding it may
result in “2we45r6/” and the key provided
in the scheme is the key can be
while encoding is “1532”.then the operation
any range larger.
of encoding can simply depicted as,
3. Since simple users of encoding in this method have to memorize a
2
w
e
4
5
r
6 /
series of digits without fail to obtain the document clearly.
1
5
3
2
1
5
3
2
STRING STRUCTURE KEY BIND: In order to increase the
CIPHER TEXT
difference of key bonded with the cipher text which is only 0-9 arrived a solution as Depending on the * operator used, the key is added with the cipher text in blocks and hence the range of Unicode is
follows in this method namely “STRING STRUCTURE KEY BIND”. 1. The key here handled may be a
different which is better than feedback
series
system.
of
characters
instead
of
numbers.
Here we can note that the key size
2. The string binded can have Unicode
can range from 0 – size of the file. Hence by
equivalent values that are larger than
this method the user can add key to the
the range 0-9.
cipher text up to a larger range when 3. The characters each in the key string
compared to feed back based system.
can range from 0-65536 each. Limitations in this method: 4. The length of the key can be large 1. Even though the key is a series of
enough equivalent to the size of the
digits, the numeric value added
input file which is the maximum
with each character range from
value.
0-9. 5. 2. This
mild
difference
again
checks the security and needs further study and the advantage
Even though the key can be severely large, the optimal performance can
be maintained by the user’s decision over the peak value to be handled. 6. Since it is a series of characters i.e. string,
a
meaningful
string
for
average users can help them to remember enough to recover their documents. Hence upon the various schemes of key binding discussed the string structure secret key again using Unicode support is better and even best of the key binding techniques discussed. Here using various schemes for secret key does not mean the congestion of ideas in illustrating the secret key but it is a real time derivation for deciding the best secret key technique. Once again we can notice that the string structure secret key holding the property “no repetition”.