ensure that pubKey length is greater than m
use Array.isArray over instanceof