Check private key length in getPublic