[asterisk-users] Password to be ecrypted?

Robles Román, José Miguel jmrroman at indra.es
Tue May 3 03:09:58 CDT 2011


> On Tuesday 26 Apr 2011, bilal ghayyad wrote:
>> Hi All;
>>
>> I am using Asterisk 1.8, how I can protect my self from hackers in
>> case they was able to see my sip.conf file? I need the password to be
>> encrypted, how?
>
> Short answer:  You can't.  Asterisk itself needs to be able
> to read the stored passwords.  The Source Code to Asterisk is
> readily available.  Therefore, anyone who can read sip.conf,
> even if it is encrypted, will necessarily be able to decrypt it.
>
Perhaps using one-way hash functions (http://en.wikipedia.org/wiki/Cryptographic_hash_function) like MD5 or SHA-x, even if you get the file with passwords and the code that checks them, it would be difficult to find a collision (a password that matches the hash). This is the way in which apache, for example, stores passwords (see htpasswd).

In order to maintain compatibility, the configurarion could be

[...}
secret_sha2 = ...

Regards,
José Miguel

Este correo electrónico y, en su caso, cualquier fichero anexo al mismo, contiene información de carácter confidencial exclusivamente dirigida a su destinatario o destinatarios. Si no es vd. el destinatario indicado, queda notificado que la lectura, utilización, divulgación y/o copia sin autorización está prohibida en virtud de la legislación vigente. En el caso de haber recibido este correo electrónico por error, se ruega notificar inmediatamente esta circunstancia mediante reenvío a la dirección electrónica del remitente.
Evite imprimir este mensaje si no es estrictamente necesario.

This email and any file attached to it (when applicable) contain(s) confidential information that is exclusively addressed to its recipient(s). If you are not the indicated recipient, you are informed that reading, using, disseminating and/or copying it without authorisation is forbidden in accordance with the legislation in effect. If you have received this email by mistake, please immediately notify the sender of the situation by resending it to their email address.
Avoid printing this message if it is not absolutely necessary.



More information about the asterisk-users mailing list