The paper investigates many problems in quantum systems by using the
modeling of optical components using Jones matrices. These methods give high
flexibility to choose perfect model and ideal measurements base of Alice and Bob. The
simulated source uses polarization entangled photons from spontaneous parametric
down-conversion. The proposed model of Ekert's quantum cryptography protocol, is
also simulated based on modeling the optical components by Jones matrices. Bell's
inequality is computed to detect the eavesdropper. The results show the effect of the
eavesdropper on the Bit Error Rate (BER) and S factor of Bell's inequality. The
eavesdropper affects more on the results of S and BER when he doesn't know the base
measurements of Alice and Bob.