anchor.diff:      frequency([
           {5, ?SUCHTHAT(B, binary(), byte_size(B) /= Sz)},
           {1, elements([a, b])},
  -        {1, int()}
  +        {1, int()},
  +        {1, g_iodata()}
       ]).
       
   v_binary(Sz, N) when is_binary(N) ->
       byte_size(N) == Sz;
   v_binary(_, _) -> false.
   
  +                  
   %% Typical generators based on the binaries
   nonce() -> g_binary(enacl:box_nonce_size()).
   nonce_valid(N) -> v_binary(enacl:box_nonce_size(), N).
  
positive.code: signed_message_valid(_, _) -> false.
  
  prop_sign_open() ->
      ?FORALL(Msg, binary(),
        ?FORALL({SignMsg, PK}, signed_message(Msg),
            case signed_message_valid(SignMsg, PK) of
                true ->
                    case SignMsg of
                      {valid, SM} ->
                          equals({ok, Msg}, enacl:sign_open(SM, PK));
                      {invalid, SM} ->
                          equals({error, failed_verification}, enacl:sign_open(SM, PK))
                    end;
  
negative.code: 
  prop_box_correct() ->
      ?FORALL({Msg, Nonce, {PK1, SK1}, {PK2, SK2}},
              {g_iodata(),
               fault_rate(1, 40, nonce()),
               fault_rate(1, 40, keypair()),
               fault_rate(1, 40, keypair())},
          begin
              case v_iodata(Msg) andalso nonce_valid(Nonce) andalso keypair_valid(PK1, SK1) andalso keypair_valid(PK2, SK2) of
                  true ->
                      CipherText = enacl:box(Msg, Nonce, PK2, SK1),
                      {ok, DecodedMsg} = enacl:box_open(CipherText, Nonce, PK1, SK2),
                      equals(iolist_to_binary(Msg), DecodedMsg);
                  false ->
                      case box(Msg, Nonce, PK2, SK1) of
                          badarg -> true;
  