make code pubkey-length-agnostic