For sure, it is. Both are creating the malicious code, spreading it, and collecting the ransom payments that fall under the cybercrime legislation in numerous countries. Even touching the process or the ransom money may be accounted as participation in this crime.