Analysis and Design of Stream Ciphers