<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def signature_unsafe(m, sk, pk, hash_func=H):
 """ Not safe to use with secret keys or secret data. See module docstring. This function should be used for testing only. """

    h = hash_func(sk)
    a = 2 ** (b - 2) + sum(2 ** i * bit(h, i) for i in range(3, b - 2))
    r = Hint(bytearray([h[j] for j in range(b // 8, b // 4)]) + m)
    R = scalarmult_B(r)
    S = (r + Hint(encodepoint(R) + pk + m) * a) % l
    return bytes(encodepoint(R) + encodeint(S))