Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2006-08

encryption

9 messages · 4 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Fabrício F. Kammer

Hi all,

Does anyone have a routine with example to encrypt/decrypt text files?

Thanks in avance

Fabrício F. Kammer

Alexandre Leclerc
to Fabrício F. Kammer

There are two hash in: fpcsrc/packages/base/hash

There is, for example, Blowfish (a ciphers for actual encryption/decryption) in: fpcsrc/fcl/incblowfish.pp

Blowfish is very good by the way (as is fast). There are many others; I also saw a a kit of many ciphers in Delphi which could certainly work on FPC. See
http://www.efg2.com/Lab/Library/Delphi/MathFunctions/Cryptography.htm for many of them.

I used that one http://www.cityinthesky.co.uk/cryptography.html in a project once, but it was under Delphi. It should work under FPC I think... It's up to you to try.

Regards.

Alexandre Leclerc
Vincent Snijders
to Alexandre Leclerc
Alexandre Leclerc wrote 15 lines
There are two hash in: fpcsrc/packages/base/hash There is, for example, Blowfish (a ciphers for actual encryption/decryption) in: fpcsrc/fcl/incblowfish.pp Blowfish is very good by the way (as is fast). There are many others; I also saw a a kit of many ciphers in Delphi which could certainly work on FPC. See http://www.efg2.com/Lab/Library/Delphi/MathFunctions/Cryptography.htm for many of them. I used that one http://www.cityinthesky.co.uk/cryptography.html in a project once, but it was under Delphi. It should work under FPC I think... It's up to you to try.

It has been ported to fpc/lazarus:
http://wiki.lazarus.freepascal.org/index.php/DCPcrypt

Vincent

Fabrício F. Kammer
to Vincent Snijders

Thanks Alexandre and Vincent but I need of a bit more help with this.

I'm working in a software to protect my main software. Look how I want to make:

- This software will be a TCP Server (I'm calling it of Authentication software).
- This software must run in the console, then I can't have graphical application for it. I want to make this software runs az daemon on the future.
- I'll have some informations of the server (hardware information that I get on /proc) and the number of stations that can use my main software together storaged in a crypted file.
- I need to read this crypted file, decrypt it and compare with the informations of /proc again. Then I need of a form to encrypt/decrypt the file to compare with the actual information.

If I use md5 I can't decrypt the text. In yours opnion what's the indicate algorithm do make this?

Thanks again

Fabrício F. Kammer
Conchal/SP/Brazil

Vincent Snijders wrote 24 lines
Alexandre Leclerc wrote: > There are two hash in: fpcsrc/packages/base/hash > > There is, for example, Blowfish (a ciphers for actual > encryption/decryption) in: fpcsrc/fcl/incblowfish.pp > > Blowfish is very good by the way (as is fast). There are many others; > I also saw a a kit of many ciphers in Delphi which could certainly > work on FPC. See > http://www.efg2.com/Lab/Library/Delphi/MathFunctions/Cryptography.htm > for many of them. > > I used that one http://www.cityinthesky.co.uk/cryptography.html in a > project once, but it was under Delphi. It should work under FPC I > think... It's up to you to try. > It has been ported to fpc/lazarus: http://wiki.lazarus.freepascal.org/index.php/DCPcrypt Vincent _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Alexandre Leclerc
to Fabrício F. Kammer

2006/8/25, "Fabrício F. Kammer" :

If I use md5 I can't decrypt the text. In yours opnion what's the indicate algorithm do make this?

Hi Fabrício,

Exact, (as stated in my first email) all "hash" algo like md5 can't be decoded. These are... hash! All "cipher" algo like blowfish/twofish, etc. can be encoded, stored, and later decoded provided you have the key.

Any cipher algo will serve your needs. Since DCPCrypt has been ported (thank you Vincent, I did not know), all cipher (in DCPciphers tab) will do what you need. Pick the one(s) that fit your needs.

See http://wiki.lazarus.freepascal.org/index.php/DCPcrypt as given by Vincent.

Best regards.

Alexandre Leclerc
Fabrício F. Kammer
to Alexandre Leclerc

Thanks Alexandre,

I'll see it.

Regards

Fabrício

Alexandre Leclerc wrote 20 lines
2006/8/25, "Fabrício F. Kammer" : > If I use md5 I can't decrypt the text. In yours opnion what's the > indicate algorithm do make this? Hi Fabrício, Exact, (as stated in my first email) all "hash" algo like md5 can't be decoded. These are... hash! All "cipher" algo like blowfish/twofish, etc. can be encoded, stored, and later decoded provided you have the key. Any cipher algo will serve your needs. Since DCPCrypt has been ported (thank you Vincent, I did not know), all cipher (in DCPciphers tab) will do what you need. Pick the one(s) that fit your needs. See http://wiki.lazarus.freepascal.org/index.php/DCPcrypt as given by Vincent. Best regards.
Fabrício F. Kammer
to Fabrício F. Kammer

Alexandre,

Do you know how can I use the DCP just in freepascal for prompt compilation?

I'm not using Lazarus.

Thanks again

Fabrício F. Kammer wrote 32 lines
Thanks Alexandre, I'll see it. Regards Fabrício Alexandre Leclerc escreveu: > 2006/8/25, "Fabrício F. Kammer" : >> If I use md5 I can't decrypt the text. In yours opnion what's the >> indicate algorithm do make this? > > Hi Fabrício, > > Exact, (as stated in my first email) all "hash" algo like md5 can't be > decoded. These are... hash! All "cipher" algo like blowfish/twofish, > etc. can be encoded, stored, and later decoded provided you have the > key. > > Any cipher algo will serve your needs. Since DCPCrypt has been ported > (thank you Vincent, I did not know), all cipher (in DCPciphers tab) > will do what you need. Pick the one(s) that fit your needs. > > See http://wiki.lazarus.freepascal.org/index.php/DCPcrypt as given by > Vincent. > > Best regards. > _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Fabrício F. Kammer
to Fabrício F. Kammer

Alexandre,

I could use the DCP on fpc... I compiled all units.

Thanks

Fabrício

Fabrício F. Kammer wrote 45 lines
Alexandre, Do you know how can I use the DCP just in freepascal for prompt compilation? I'm not using Lazarus. Thanks again Fabrício F. Kammer escreveu: > Thanks Alexandre, > > I'll see it. > > Regards > > Fabrício > > Alexandre Leclerc escreveu: >> 2006/8/25, "Fabrício F. Kammer" : >>> If I use md5 I can't decrypt the text. In yours opnion what's the >>> indicate algorithm do make this? >> >> Hi Fabrício, >> >> Exact, (as stated in my first email) all "hash" algo like md5 can't be >> decoded. These are... hash! All "cipher" algo like blowfish/twofish, >> etc. can be encoded, stored, and later decoded provided you have the >> key. >> >> Any cipher algo will serve your needs. Since DCPCrypt has been ported >> (thank you Vincent, I did not know), all cipher (in DCPciphers tab) >> will do what you need. Pick the one(s) that fit your needs. >> >> See http://wiki.lazarus.freepascal.org/index.php/DCPcrypt as given by >> Vincent. >> >> Best regards. >> > _______________________________________________ > fpc-pascal maillist - > http://lists.freepascal.org/mailman/listinfo/fpc-pascal _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal