Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: crypt algorithm in shell or C

10 views
Skip to first unread message

Kasper Dupont

unread,
Jun 22, 2005, 2:03:42 PM6/22/05
to
Cyril Vi?ville wrote:
>
> Hello everybody i just need a link for code or code itself in shell or
> in C to make an app used to crypt password in some files. But i need
> crypt/decrypt process.

Your question is very unclear, so I really don't
know what it is, you want to do.

If you want to verify passwords, take a look here:
http://www.daimi.au.dk/~kasperd/comp.os.linux.development.faq.html#crypt

If you want to encrypt/decrypt files, then take a
look on gpg.

--
Kasper Dupont -- der bruger for meget tid på usenet.
Note to self: Don't try to allocate 256000 pages
with GFP_KERNEL on x86.

Cyril Vi?ville

unread,
Jun 22, 2005, 10:32:06 AM6/22/05
to
Hello everybody i just need a link for code or code itself in shell or
in C to make an app used to crypt password in some files. But i need
crypt/decrypt process.

Thx

Chris McDonald

unread,
Jun 22, 2005, 7:42:57 PM6/22/05
to

cyril_v...@hotmail.com

unread,
Jun 29, 2005, 12:06:37 PM6/29/05
to

Really simple. I wanna use my ftp.sh which is better than a simple ftp
and wanna use a simple file where there're login and password. But i
wanna have crypted passwords in those login/password files and wanna
decrypt that password when i need to give password to the ftp command.
Do you understand? so an app which crypt and decrypt a word

Thx

Kasper Dupont

unread,
Jun 29, 2005, 6:35:19 PM6/29/05
to
cyril_v...@hotmail.com wrote:
>
> Really simple. I wanna use my ftp.sh which is better than a simple ftp
> and wanna use a simple file where there're login and password. But i
> wanna have crypted passwords in those login/password files and wanna
> decrypt that password when i need to give password to the ftp command.
> Do you understand?

Not really. Are you writing client or server side code?

Lawrence DąOliveiro

unread,
Jun 30, 2005, 4:06:36 AM6/30/05
to
In article <1120061197....@g43g2000cwa.googlegroups.com>,
cyril_v...@hotmail.com wrote:

>I wanna use my ftp.sh which is better than a simple ftp
>and wanna use a simple file where there're login and password. But i
>wanna have crypted passwords in those login/password files and wanna
>decrypt that password when i need to give password to the ftp command.

Why do you want to do this?

Cyril Vi?ville

unread,
Jun 30, 2005, 6:09:50 AM6/30/05
to
Kasper Dupont <kas...@daimi.au.dk> wrote in message news:<42C32227...@daimi.au.dk>...

> cyril_v...@hotmail.com wrote:
> >
> > Really simple. I wanna use my ftp.sh which is better than a simple ftp
> > and wanna use a simple file where there're login and password. But i
> > wanna have crypted passwords in those login/password files and wanna
> > decrypt that password when i need to give password to the ftp command.
> > Do you understand?
>
> Not really. Are you writing client or server side code?

No it's not a ftp client or server. Just use ftp in a ftp.sh to verify
return code ...
I have to decrypt. I can't use the crypt function because i have to
decrypt the password from the file login/password which i need to have
a crypted version.

Kasper Dupont

unread,
Jun 30, 2005, 8:30:35 AM6/30/05
to

I still don't understand what it is you are trying to do.

cyril_v...@hotmail.com

unread,
Jun 30, 2005, 10:04:13 AM6/30/05
to
it's simple i search a function or program to crypt decrypt a word (not
gpg please) it's so complicated to understand

Tauno Voipio

unread,
Jun 30, 2005, 4:20:41 PM6/30/05
to
cyril_v...@hotmail.com wrote:
> it's simple i search a function or program to crypt decrypt a word (not
> gpg please) it's so complicated to understand

Please note that usually the passwords are never decrypted,
the authentication is done by encrypting the supplied
password. The encryption is selected so that decryption
is tedious if not nearly impossible to prevent password
theft from the encrypted file.

--

Tauno Voipio
tauno voipio (at) iki fi


Villy Kruse

unread,
Jul 1, 2005, 3:40:07 AM7/1/05
to
On 30 Jun 2005 07:04:13 -0700,
cyril_v...@hotmail.com <cyril_v...@hotmail.com> wrote:


> it's simple i search a function or program to crypt decrypt a word (not
> gpg please) it's so complicated to understand
>

And yet gpg is probably the simplest thing for this purpose.
Use with -symetric you don't need any public and private keys

This can help you keep the ftp password secret, but now the problem
is shiftet to keep the encryption key secret, and if the whole thing
is going to run unattended the encryption key need to be somewhere in
the program which is essential the same as storing the ftp passwords
in clear text in the program.

Notice that the C library function crypt() is not an encryption function
as the result cannot be decrypted.

Villy

Kasper Dupont

unread,
Jul 1, 2005, 6:41:06 AM7/1/05
to
Tauno Voipio wrote:
>
> cyril_v...@hotmail.com wrote:
> > it's simple i search a function or program to crypt decrypt a word (not
> > gpg please) it's so complicated to understand
>
> Please note that usually the passwords are never decrypted,

They are not encrypted either, so obviously decrypting
it is not something you just do.

The principle in how DES based passwords works is that
you encrypt a fixed string using the password as key.
(Reality is a litle more complicated than this and
involves a salt and AFAIK multiple encryptions).

And MD5 based passwords are a litle different as MD5
is not even an encryption algorithm. MD5 is a hash,
which means the simplest implementation would just
concatenate the salt and the password and then hash
the resulting string. AFAIK in reallity it is more
complicated.

0 new messages