The ever-increasing and ever-demanding growth of the field of cryptanalysis imposesa continuous requirement foralgorithm modifications. This paperintroduces modifications in widely-used RC5 block cipher to cater to the increasing security demands, i.e. dynamic S-box generation and magic square-based key expansion. The main purpose is to improve the complexity and linearity of the algorithm as a result making it resistantto newly-devised attacks. A small (3 × 3) magic square is taken for generating dynamic S-boxes and constants to add unpredictable randomness during the key expansion phase. SHA-256 hash function is used for S-boxes generation meanwhile properties of magic square are exploited for constants derivation purpose. Proposed changes resulted in improved security against differential, linear,and algebraic attacks respectively meanwhile efficiency is still sustained so that this modified version can be well-suited for recentapplications that necessitate strong encryption services.