anchor.diff:      sign(Alg, Type, {digest, hash(Type, Data)}, Key);
   sign(rsa, Type, {digest, Digest}, Key) ->
       case rsa_sign_nif(Type, Digest, map_ensure_int_as_bin(Key)) of
  -	error -> erlang:error(badkey, [Type,Digest,Key]);
  +	error -> erlang:error(badkey, [rsa, Type, {digest, Digest}, Key]);
   	Sign -> Sign
       end;
   sign(dss, Type, {digest, Digest}, Key) ->
       case dss_sign_nif(Type, Digest, map_ensure_int_as_bin(Key)) of
  -	error -> erlang:error(badkey, [Digest, Key]);
  +	error -> erlang:error(badkey, [dss, Type, {digest, Digest}, Key]);
   	Sign -> Sign
       end;
   sign(ecdsa, Type, {digest, Digest}, [Key, Curve]) ->
       case ecdsa_sign_nif(Type, Digest, nif_curve_params(Curve), ensure_int_as_bin(Key)) of
  -	error -> erlang:error(badkey, [Type,Digest,Key]);
  +	error -> erlang:error(badkey, [ecdsa, Type, {digest, Digest}, [Key, Curve]]);
   	Sign -> Sign
       end.
   
  
positive.code: private_decrypt(rsa, BinMesg, Key, Padding) ->
      case rsa_private_crypt(BinMesg, map_ensure_int_as_bin(Key), Padding, false) of
  	error ->
  	    erlang:error(decrypt_failed, [BinMesg,Key, Padding]);
  	Sign -> Sign
      end.
  
  
negative.code: private_encrypt(rsa, BinMesg, Key, Padding) ->
      case rsa_private_crypt(BinMesg, map_ensure_int_as_bin(Key), Padding, true) of
  	error ->
  	    erlang:error(encrypt_failed, [rsa, BinMesg,Key, Padding]);
  	Sign -> Sign
      end.
  
  