anchor.diff:  %% information about the curves see
   %%       http://csrc.nist.gov/encryption/dss/ecdsa/NISTReCur.pdf
   %%
  -    Curves = crypto:ec_curves(),
  -    TestCases =
  +    Curves = crypto:supports(curves),
  +    lists:filter(
  +      fun ({_Type, Curve, _Priv, _Pub}) ->
  +              lists:member(Curve, Curves)
  +      end,
           [{ecdh,secp192r1,1,
             hexstr2point("188DA80EB03090F67CBF20EB43A18800F4FF0AFD82FF1012",
                          "07192B95FFC8DA78631011ED6B24CDD573F977A11E794811")},
  
positive.code:      end.
  
  do_generate({Type, Curve, Priv, Pub}) when Type == ecdh ; Type == eddsa ->
      case crypto:generate_key(Type, Curve, Priv) of
  	{Pub, _} ->
  	    ok;
  
negative.code:           hexstr2bin("8520f0098930a754748b7ddcb43ef75a0dbf3a0d26381af4eba4a98eaa9b4e6a")},
           {ecdh, x25519,
            hexstr2bin("5dab087e624a8a4b79e17f8b83800ee66f3bb1292618b6fd1c2f8b27ff88e0eb"),
            hexstr2bin("de9edb7d7b7dc1b4d35b61c2ece435373f8343c85b78674dadfc7e146f882b4f")}
          ]
       ).
  
  int_to_bin(X) when X < 0 -> int_to_bin_neg(X, []);
  int_to_bin(X) -> int_to_bin_pos(X, []).
  