import binascii


def pubkey_to_redeem(pubkey):
    """
    Convert the public key to the redeemscript format.

    Args:
        pubkey (bytes): public key.

    Returns:
        bytes: redeemscript.
    """
    return binascii.unhexlify(b'21' + pubkey + b'ac')