anchor.diff:  -spec check_key_pair() -> boolean().
   check_key_pair() ->
       gen_server:call(?MODULE, check_key_pair).
  -
  --spec open(password()) -> {ok, password()} | {error, keys_not_loaded}.
  -open(Password) ->
  -    gen_server:call(?MODULE, {open, Password}).
   
   -spec new(password()) -> {Priv :: binary(), Pub :: binary()} | error.
   new(Password) ->
  
positive.code:             {reply, error, State}
      end;
  
  handle_call({open, Password}, _From, #state{pub_file=PubFile, priv_file=PrivFile} = State) when is_binary(Password) ->
      try
          {ok, Pub} = from_local_dir(PubFile),
          {ok, Priv} = from_local_dir(PrivFile),
          Pub0 = decrypt_pubkey(Password, Pub),
          Priv0 = decrypt_privkey(Password, Priv),
          #state{crypto = C} = State,
          case check_keys_pair(Pub0, Priv0, C) of
              true ->
                  {reply, ok, State#state{priv=Priv0, pub=Pub0, pass=Password}};
              false ->
                  {reply, {error, wrong_password}, State}
          end
      catch
          Err:R ->
              lager:error("Can't open keys files ~p ~p", [Err, R]),
              {reply, {error, keys_not_loaded}, State}
      end;
  
  handle_call({set, Password, Priv, Pub}, _From, #state{pub_file=PubFile, priv_file=PrivFile} = State) when is_binary(Password) ->
      try
          EncPub = encrypt_pubkey(Password, Pub),
  
negative.code: %%% @doc
  %%%     Key manager for AE node
  %%%     * it will open keys that it finds using sys.config
  %%%     * generating new/1 or setting set/3 keys will fail when another keys are present
  %%%     * delete/0 removes files from the filesystem and from the state (DANGER!)
  %%% @end
  