This needs to verify that signatureSize is sufficiently large.  I would say 32 bits is about as low as we should go.