Implemented key_expansion() method