Abstract— used hash function has been the Secure

Abstract— This paper givesa brief overview of applying SHA (Secure Hashing Algorithm) on Video files. In recentyears, the most widely used hash function has been the Secure Hash Algorithm, becausevirtually every other widely used hash function have been found to have substantialcryptanalytic weakne . SHA was more or less the last remaining standardizedhash algorithm by 2005 . SHA (Secure Hashing Algorithm) originally developed byNational Security Agency (NSA) and later handed over to National Institute ofStandard and Technology (NIST) are a way to ensure information security.

They are typically used in digital signatureand in connections with secure websites.  Data that is run through a hash algorithm  produces shorter string of bits; this stringacts as a kind of digest of the data. Any changes to thedata changes the bit string resulting string therefore acts as a fingerprint of the data, guaranteeing that no one has tempered with it.  However having algorithm like SHA for onlytext and images is a waste it’s potential.Keywords—Messagedigest; Hash function; Video security                                                                                                                                                                 I.          Introduction Secure Hashing Algorithm is a method orprocess through which a message is converted into smaller size that is it iscompressed it uses message digest algorithm for converting the variable lengthdata into fixed length data and then it creates a hash value of the data of 16bit length thus when the data file is opened it will require the hash value orfigure print to open the data file. Image hash function have become an important field of research for pastfew years earlier hash functions was used to provide security for text in SSLcertificates, Image hash functions map images to short binary strings in orderto facilitate comparisons and researches this functions have property that twoimages which look same will have same hash value with small bit-leveldifferences 4.

Best services for writing your paper according to Trustpilot

Premium Partner
From $18.00 per page
4,8 / 5
4,80
Writers Experience
4,80
Delivery
4,90
Support
4,70
Price
Recommended Service
From $13.90 per page
4,6 / 5
4,70
Writers Experience
4,70
Delivery
4,60
Support
4,60
Price
From $20.00 per page
4,5 / 5
4,80
Writers Experience
4,50
Delivery
4,40
Support
4,10
Price
* All Partners were chosen among 50+ writing services by our Customer Satisfaction Team

Video file in regard to this paperfor the receiver to view the video file. Video is a collection of data orinformation in itself for compressing it and then creating a hash value orfigure print of it and maintain its quality at the same time is a difficulttask which is what this algorithm is trying to achieve.                                                                                                                                                       II.        Literature SurveyA cryptographic hash function takes a message ofarbitrary length and creates a message digest of fixed length 1. A hash function needs to create a fixed size digest outof a variable-size message.

Multi-collisions in Iterated Hash Functions paperis written by Antoine Joux in DCSSI Crypto Lab(France), This paper helped us to study the existence ofmulti-collisions in iterated hash functions 5. It helps us to know that finding the multi-collisionsare tougher to find than the ordinary collisions, it also tell us about thecomplexities of the attacks on the system 5. It also mentions that the system has to satisfyvarious security properties and in case of an attack to the system ,the systemwill be immune to the attack and not let data get stolen from the system,It suggests that the building of a multi-collision systemwill be very difficult with an input of variable size 5. The system has to use a compression function whose input sizes are fixedwhich is SHA-1 5.

A combination of cryptography using AES andsteganography are used for security 6. To increase the security level, the key arehashed using SHA-1.In this method an advanced concept of combiningcryptography and steganography in image and audio 6.

SHA-1 algorithm is usedfor encryption and compression for data using 512 bit block size sequentially7. The new attack on SHA Algorithm has reduced probability and complexity 3.It has also been presented a chosen-message pre-image attack on MD4 withcomplexity below 28 3. By literature survey the question of how SHA isperformed is clear but it has not been proposed for video.                                                                                                                                          III.       Secure Hashing AlgorithmMessage Digest or Fingerprint is the best method to providesecurity as it is the condensed representationof the data so its size is less as comparedto the original data and it is easy to generate for a given file.

It is computationally infeasible to produce two messageswith same message digest. It is also impossibleto recreate a message given a message digest. It provides data integrityand comparison checking as well asmessage integrity validation. Ituses one-way hash functions for generating the hash value of the data. In Public Key Algorithms it is used for password logins, encryption key management, digital signatures, integrity checking, virus and malware scanning, authentication, secure web connections i.

e. PGP, SSL.                                                                                                                                                             IV.

       MethodologyA.    Video to image conversionUsing the algorithm directly on thevideo files will be a very complex computation so to achieve this task veryeasily and simply the video files should be first converted into frames and thenafter converting it into frames after an interval of just suppose 0.2 sec theimage will be formed by using a for loop and ‘imwrite’ commandfrom o to 255 i.e.

in both direction (rows and columns) as the video is a 2Drepresentation of 3D object and image is also 2D representation. B.    Colour image to gray Colour image contains a large number ofpixel value as compared to grayscale image so it would be easier to operate orperform hash functions on grayscale image so convert the image into gray imageby using a for loop as used above. The colouredimage is the converted into greyscale image this is because the luminance of apixel value of a grayscale image ranges from 0 to 255 8.

The conversion of acolour image into grayscale image is converting the rgb values(24bit) intograyscale value (8bit) for simplycity 8. By converting the colour image orRgb into gray we enter into a domain which is much easy for processing andcomputation complexity reduces as there are less information present. C.

    Append PaddingBits First calculate the length of themessage but here the message is a video file which is converted into imageframes or to be precise grayscale image’s which is of 8 bit so first convert itinto 8 parts from MSB to LSB 2. After that message is padded with a 1 andas many 0’s as necessary to bring the message length to 64 bits fewer than aneven multiple of 512 2. To makethe length congruent to 448 modulo 512.

 D.   Append LengthThe data is then a fixed length of 448bits which is 64 less than 512. Then 64 bits are appended to the end of thepadded message.

These bits hold the binary format of 64 bits indicating thelength of the original message 2. The output of the first two steps is a message that is an integermultiple of 512 bits in length in this case image of 512 bits block 2. E.   Prepare Processing Functions SHA requires 80 processing functions that are defined below which are usedfor various processing to be computed on the raw image for the protection orsecurity of the data by the eves-dropper or from any unauthorized access byusing these various defined processing Secure hashing Functions 2: F (t;B,C,D) = (B AND C) OR ((NOT B) AND D)       ( 0<= t <= 19)                                                                (1)F (t;B,C,D) = B XOR C XOR D                   (20 <= t <=39)                                                                 (2)F (t;B,C,D) = (B AND C) OR (B AND D) OR (C AND D)      (40 <= t <=59)                                                                      (3)F (t;B,C,D) = B XOR C XOR D                        (60 <= t <= 79)                                                                  (4)   F.

   Prepare Processing ConstantsSHA requires 80 processing constant words defined as 2:  K(t)= 0x5A827999                      ( 0<= t <= 19)  K(t)= 0x6ED9EBA1                     (20 <=t <= 39)  K(t)= 0x8F1BBCDC                    (40 <=t <= 59)  K(t)= 0xCA62C1D6                    (60 <=t <= 79)  G.    Initialize Buffers SHA requires 160 bits or 5 buffers of words (32 bits) for holding theintermediate data and the final hash value the following are the registerswhich are initialized to 32 bits (hexadecimal values) 2. In 1024 bit SHAalgorithm the bit requirement doubles and so does the buffers capacity forstoring data.

Some of the buffers are given below 2:H0 =0x67452301 H1 =0xEFCDAB89H2 =0x98BADCFEH3 =0x10325476H4 =0xC3D2E1F0 H.    ProcessingMessage in 512-bit blocksThis is the main task of SHA algorithmwhich loops through the padded and appended message in 512-bit blocks 2. After all the above steps theimages are ready in 512 bit block size for processing in the round function andgeneration of the hash value.Input and predefined functions: ·        M1, 2, …

, L are Blocks ofthe padded and appended message                 ·        F (0;B,C,D), F (1,B,C,D), …,F (79,B,C,D) are 80 processing functions       ·        K(0), K(1), ..

., K(79) are 80Processing Constant Words ·        H0, H1, H2, H3, H4, H5 are wordbuffers with initial values The pictureshown below shows process of Message digest generation using SHA-512 1. Fig 1: Messsage digest generation   I.      Steps for Round Function          Various logical operatorslike and, or, xor and various bit wise operators are used like rotationoperator for the processing in the round function 2. As the image is dividedinto blocks of 512 bit size so when the first hash value is generated it isxored with the next data in these round function for further processing andthus so on the lastly the last output which is generated is the final hashvalue which is stored in the intial buffer 2.

The below given are some stepsto be followed in the round function 2:For loop on k =1 to L§ (W(0),W(1),…,W(15)) = Mk thendivide Mk into 16 words.         For t = 16 to 79 §  W(t) = (W(t-3) XOR W(t-8) XOR W(t-14)XOR W(t-16)) <<< 1  §  A = H0, B = H1, C = H2, D = H3, E =H4                For t = 0 to79  §  TEMP = A<<<5 + F (t;B,C,D)+ E + W(t) + K(t) E = D, D = C,  §  C = B<<<30,B = A,A = TEMP  §  End of for loop  §  H0 = H0 + A, H1 = H1 + B, H2 = H2 +C, H3 = H3 + D, H4 = H4 + E  §  End of for loop                                                                                                                                                                     V.        DiscussionBy performing this algorithm on thevideo file we are expecting the following result that is the video file will becompressed and it will ask for a hash key or finger print for opening the datafile.The belowgiven flow chart shows a simplistic step by step procedure for the SecureHashing Algorithm for video.

As discussed above first we have to convert thevideo into frames of image for simplistic operation and that to into the graydomain which has only 0 to 255 pixel values for simplicity of operation. Theconversion of a colour image into grayscale image is converting the RGB values (24bit)into grayscale value (8bit) for simplicity 8. But the image still is a 8 bitimage so we have to convert the image into 1 bit 8 image using bit planeslicing and then start the further processing on that one bit image by paddingfirst one’s and then zero’s until a block size of 448 bits is been formed andin remaining 64 bits the length of each image is padded  separately. The hash value generated afterprocessing of these 1bit individual images will be XOR with the pre-processingfunctions and pre-processing constant in-order to get a final Hash value whichwill be transferred as mentioned above to the destination address.   Fig 2: Flow chart for SHA for Video       The video is first convertedinto 25 frames per second by using  codesin the matlab.

The size of the coloured image is shown in fig 2 and 3 which isan unsigned integer 8 image. Fig 3: Colour image frames  Fig 4: colour image framespecification            Thecoloured image is the converted into greyscale image this is because theluminance of a pixel value of a grayscale image ranges from 0 to 255. Theconversion of a colour image into grayscale image is converting the RGBvalues(24bit) into grayscale value (8bit) for simplycity 8, which is shown infig 4 below.

  Fig 5: Grayscale image  The matlab codeoutput of the first two steps is obtained which is shown in fig 5 below  Fig 6: Matlab output window forfirst 2 steps         The matlab output obtained after padding first1 and then with however amount of zero’s required inoder to make the messagelength 64bits less than 512 bits which is 448 bits so that in last 64 bits lengthof message can be appended , it is as shown below in fig 6 .                                                                                                                                                                  VI.   ConclusionThus we conclude forhaving a SHA securing algorithm for video by generating a message digest of avideo by first converting it to images and then applying algorithm on eachimage separately and combining them to get a compressed output along with a hashvalue which is unique and is impossible for a intruder to get the originalmessage even if he has a unauthorized access to the message digest or the compressedmessage.  AcknowledgmentWe are foremostthankful to the Principal of our college Dr. B. K. Mishra who has takenstrenuous efforts in providing us with excellent lab facilities.

We are greatlyindebted to our internal project guide Prof. RashmitakumariMohapatra for her ableguidance and enlightened comments, which has helped us in better understandingour project work. We would like to thank Mrs. Dr. SangeetaMishra for her helpful suggestionsand numerous discussions with which she has guided us. We are also thankful to our Head of Department Prof. Vineet Dongre and Project Co-coordinator Prof.

Manoj Chavanwho has given us constant motivation, guidance and encouragement for theproject. We are also grateful to our classmates and friends who have given usfeedback and encouragement. Finally we would wish to thank our college ThakurCollege of Engineering and Technology for providing us with a platform and thenecessary facilities to make this project. References 1     BehrouzA Forouzan, Debdeep Mukhopadhyay, “Cryptography And Network Security”, 2nd ed.McGraw Hill Education, India, 2013, ch. 12, sec. 3, pp.

327–354.2     2WilliamStallings, “Cryptography And Network Security”, 3rd ed. Pearson Education,India: PLC, 2004, ch. 11, sec. 2, pp. 328–334.

3     3XiaoyunWang et al., “Cryptanalysis of the Hash Functions MD4 and RIPEMD”, Advances inCryptology-Eurocrypt, 2005.4     M. Johnson, KannanRamchandran, “Dither-based secure image hashing using distributedcoding”International Conference on Image Processing,2003.5     AntonieJoux,”Multicollision in iterated hash function A to cascaded constructions”,DCSSI Crypto Lab, France, 2004.

6     Ashams Mathew, “AdvancedCryptographic Steganography Using     MultimediaFiles”, Researchgate, India, 2012.7   D. Eastlake, P.

Jones, “US Secure HashAlgorithm”,Cisco Systems, 20018   C. Saravanan, “Color Image toGrayscale Image Conversion”, IEEE Xplore Digital Library, 12 April2010.