RC4 is a symmetric key stream cipher algorithm invented in 1987. It operates by combining a pseudo-random keystream with plaintext using XOR operations. The keystream is generated from an initial random permutation of bytes. RC4 has been used to encrypt network traffic but weaknesses have been found, including biases in the early output bytes that allow recovery of keys. RC5 is a block cipher with a Feistel network structure that uses simple operations like addition, XOR and data-dependent bit rotation. It has variable parameters for word size, number of rounds and key length that allow tuning security versus performance. Common attacks on RC4 and RC5 include exhaustive key search, differential cryptanalysis, linear cryptanalysis and timing analysis.