import secrets


def random(b: int) -> bytes:
    """ Helper function to create a sequence of `b` random bytes using a cryptographically secure source of randomness.
    """
    return secrets.token_bytes(b)