Palestinian faction Hamas denounced as "shocking" an Egyptian court decision to designate the movement a "terrorist organization".