This is what I want.
Get password from UI, encrypt string, store to file.
Next time UI started, load string from file, decrypt it into original string (for using against DBMS login, for example).
My question is. What would be the best way implement string encryption/decryption on Linux.
I can do that with OpenSSL, but what if OpenSSL not installed (could it be case ?)
thanx
how to enctypt password on Linux
Правила форума
Пожалуйста, ознакомьтесь с правилами данного форума
Пожалуйста, ознакомьтесь с правилами данного форума
- dima
- Житель
- Сообщения: 690
- Зарегистрирован: 19 фев 2003, 19:26
- Откуда: Хабаровск->Toronto
- akela
- Графоман
- Сообщения: 13066
- Зарегистрирован: 21 авг 2007, 10:25
- Откуда: ru->de->bc.ca
Re: how to enctypt password on Linux
может статически прилинковать её?dima писал(а):I can do that with OpenSSL, but what if OpenSSL not installed (could it be case ?)
-
- Графоман
- Сообщения: 5103
- Зарегистрирован: 18 авг 2008, 14:51
Re: how to enctypt password on Linux
In your approach basically everybody who will start UI will have access to DB (in your example).dima писал(а):This is what I want.
Get password from UI, encrypt string, store to file.
Next time UI started, load string from file, decrypt it into original string (for using against DBMS login, for example).
My question is. What would be the best way implement string encryption/decryption on Linux.
I can do that with OpenSSL, but what if OpenSSL not installed (could it be case ?)
thanx
Password decryption is not good idea either, because in most case you have "one-way" encryption, and it will not be possible to revert it, unless it's something simple in terms of encryption algorithm. Typically system works in the following way - it stores password in the encrypted form, from UI it's getting plain text password, encrypt it using the same algorithm, than compare hashes.
- папа Карло
- Шарманщик
- Сообщения: 8565
- Зарегистрирован: 17 фев 2003, 15:04
- Откуда: НН -> BC -> WA -> UT -> CA
Re: how to enctypt password on Linux
если пароль, то ты НЕ хочешь чтобы его можно было расшифровать. обычно пароли просто хешируют. смотри на md5.dima писал(а):This is what I want.
Get password from UI, encrypt string, store to file.
Next time UI started, load string from file, decrypt it into original string (for using against DBMS login, for example).
My question is. What would be the best way implement string encryption/decryption on Linux.
I can do that with OpenSSL, but what if OpenSSL not installed (could it be case ?)
thanx
- dima
- Житель
- Сообщения: 690
- Зарегистрирован: 19 фев 2003, 19:26
- Откуда: Хабаровск->Toronto
Re: how to enctypt password on Linux
I have to use plane password in some API's, like connect. It's not enough to confirm that password entered last time is the same as entered now. MD5 will work for that.borei писал(а):In your approach basically everybody who will start UI will have access to DB (in your example).dima писал(а):This is what I want.
Get password from UI, encrypt string, store to file.
Next time UI started, load string from file, decrypt it into original string (for using against DBMS login, for example).
My question is. What would be the best way implement string encryption/decryption on Linux.
I can do that with OpenSSL, but what if OpenSSL not installed (could it be case ?)
thanx
Password decryption is not good idea either, because in most case you have "one-way" encryption, and it will not be possible to revert it, unless it's something simple in terms of encryption algorithm. Typically system works in the following way - it stores password in the encrypted form, from UI it's getting plain text password, encrypt it using the same algorithm, than compare hashes.
-
- Пользователь
- Сообщения: 66
- Зарегистрирован: 25 авг 2008, 21:15
-
- Пользователь
- Сообщения: 66
- Зарегистрирован: 25 авг 2008, 21:15
Re: how to enctypt password on Linux
А, не заметил, что надо расшифровывать. Ответ снимается.
- dima
- Житель
- Сообщения: 690
- Зарегистрирован: 19 фев 2003, 19:26
- Откуда: Хабаровск->Toronto
Re: how to enctypt password on Linux
this is how it end up.
If open ssl installed, I will encrypt/decrypt my string using predefined password (blowfish - what a name !)
if not whole storing/retrieving functionality will be disabled.
thanks to all
If open ssl installed, I will encrypt/decrypt my string using predefined password (blowfish - what a name !)
if not whole storing/retrieving functionality will be disabled.
thanks to all
- Stanislav
- Mr. Minority Report
- Сообщения: 45504
- Зарегистрирован: 19 окт 2005, 16:33
- Откуда: Moscow - Richmond - New Wesт - Burnaby - PoCo
Re: how to enctypt password on Linux
Даже затрудняюсь придумать причину по которой OpenSSL может быть не инсталлирован на Линуксе...
Any security reasons?
Any security reasons?
- dima
- Житель
- Сообщения: 690
- Зарегистрирован: 19 фев 2003, 19:26
- Откуда: Хабаровск->Toronto
Re: how to enctypt password on Linux
could it be uninstalled ?Stanislav писал(а):Даже затрудняюсь придумать причину по которой OpenSSL может быть не инсталлирован на Линуксе...
Any security reasons?
- Stanislav
- Mr. Minority Report
- Сообщения: 45504
- Зарегистрирован: 19 окт 2005, 16:33
- Откуда: Moscow - Richmond - New Wesт - Burnaby - PoCo
Re: how to enctypt password on Linux
SSL устанавливается по умолчанию на любой Линуксdima писал(а):could it be uninstalled ?Stanislav писал(а):Даже затрудняюсь придумать причину по которой OpenSSL может быть не инсталлирован на Линуксе...
Any security reasons?
Юзер даже не подозревает об этом. Для админа - нет причин деинсталлировать.
HTTPS не будет работать, мыло секьюрное.
Вы к своему софту требования укажите - опенССЛ и все.