Randomness Testing of Cryptographic Algorithim I am new to algorithim randomness and confused at I guess a basic level question. Is it common for any cryptographic algorithim to have repetitions in its output i.e.let say 34 and D8 are two consective bytes which are repeting at random intervals. 

I have got an encrypted file and it has 34 D8 at line 5 and then same sequence at line 903 and then again at 1002. File has total 1500 lines.

This also goes for other byte sequences. Is there any safe threshold in which there shouldn't be any repetition? I am asking it generally for any good encryption algorithim (AES 256, AES 128, Triple DES etc.)
One of the features of a good encryption is that the cipher text should be indistinguishable from pseudo random. That means that it'll look like output from a good random number generator. Since there are only 256 possible values for any byte, of course they will repeat if you've got 300 million of them.

Repeats tend to occur at the rate of $1 \over 256^n$ where $n$ is the number of bytes within the tuple you're looking for. So you'd expect $L \over 256^n$ number of $n$ length tuples in a randomish file of length $L$.  For example, {6, 6, 6} should occur ~18 times.  


  Is there any safe threshold in which there shouldn't be any repetition?


From the above, you must have repetitions otherwise the cipher text wouldn't be very good and it would in no way resemble random.  {6, 6, 6} may not have occurred 18 times (check for yourself with a hex editor).  It may have occurred 20 times. That's random again, and it can vary within expected (but squidgy) bounds. 

We can obtain the probability $P$ of a certain sequence occurrence randomly via a chi-squared test. We would view the cipher text as suspicious if $P &lt; 0.01$.  There's a more grown up example of looking for repeat sequences in section 2.7 of NIST's A Statistical Test Suite for Random and Pseudorandom Number Generators for Cryptographic Applications. The example there looks for "000000001", resulting in $P$ = 0.344154, which is a pass.

Consider though that this only tests the computational indistinguishability of the cipher text.  We've expect that to be virtually perfect if you've used the correct algorithms/library.  It can't test the inherent security aspects of say, constantly reusing an IV.