anchor.diff:                               Curves :: [ec_named_curve() | edwards_curve_dh() | edwards_curve_ed()],
                                RSAopts :: [rsa_sign_verify_opt() | rsa_opt()] .
   
  +-define(CURVES, '$curves$').
  +
   supports(hashs)       -> hash_algorithms();
   supports(public_keys) -> pubkey_algorithms();
   supports(ciphers)     -> cipher_algorithms();
   supports(macs)        -> mac_algorithms();
  -supports(curves)      -> curve_algorithms();
  +supports(curves)      -> cached_curve_algorithms();
   supports(rsa_opts)    -> rsa_opts_algorithms().
   
   
  
positive.code: -spec enable_fips_mode(Enable) -> Result when Enable :: boolean(),
                                                Result :: boolean().
  enable_fips_mode(Enable) ->
      enable_fips_mode_nif(Enable).
  
  enable_fips_mode_nif(Enable) -> ?nif_stub.
  
  %%%================================================================
  %%%
  
negative.code: 
  do_exor(_A, _B) -> ?nif_stub.
  
  cached_curve_algorithms() ->
      case application:get_env(?MODULE, ?CURVES) of
          undefined ->
              Cs = remove_unavailable_curves(curve_algorithms()),
              application:set_env(?MODULE, ?CURVES, Cs),
              Cs;
          {ok,Cs} ->
              Cs
      end.
  
  remove_unavailable_curves(Cs) ->
      [C || C <- Cs,
            lists:member(C,[ed25519,ed448,x25519,x448])
                orelse try
                           crypto:generate_key(ecdh,C)
                       of _-> true
                       catch _:_-> false
                       end
      ].
  
  hash_algorithms() -> ?nif_stub.
  pubkey_algorithms() -> ?nif_stub.
  cipher_algorithms() -> ?nif_stub.
  