CAST algorithm implemented

CAST algorithm implemented