I am new to ciphers and for my assignment i have to implement a stream cipher algorithm without libraries (on my own). So my question is: Does anyone know about any GOOD books which have examples and explanation of implementation?
The coverage in books is lighter than that for block ciphers, but there are a few excellent books out there.
Two classics: Analysis and Design of Stream Ciphers by R. Rueppel and Stability Theory of Stream Ciphers, Ding, Xiao and Shan.
Very theoretical, wonderful: Stream Ciphers and Number Theory, Cusick, Dai and Renvall.
There are newer books by Klein, Maitra, Robshaw as well. These consider more modern designs.
Probably all you need to know about RC4 (at your level) is on the Wikipedia page. There's even code. And then there are all the links to follow for more detail. And two books in Further Reading:-
Paul, Goutam; Subhamoy Maitra (2011). RC4 Stream Cipher and Its Variants. CRC Press. ISBN 9781439831359.
Schneier, Bruce (1995). "Chapter 17 – Other Stream Ciphers and Real Random-Sequence Generators". Applied Cryptography: Protocols, Algorithms, and Source Code in C (2nd ed.). Wiley. ISBN 978-0471117094.
Make sure you acknowledge the Security section on that page.