Board index » delphi » Encrypting a password string.
Tom Reiertse
![]() Delphi Developer |
Tue, 15 Feb 2005 14:31:44 GMT
|
Tom Reiertse
![]() Delphi Developer |
Tue, 15 Feb 2005 14:31:44 GMT
Encrypting a password string.
Hi.
I'm storing a username/password combination in a .INI file, and I need some I will obviously also need some sort of reverse function. It doesn't need to be advanced, just something to avoid having the password I've looked through the JCL library but couldn't find anything there. I also Regards, |
Thomas Stut
![]() Delphi Developer |
Tue, 15 Feb 2005 14:39:01 GMT
Re:Encrypting a password string.Quote> I'm storing a username/password combination in a .INI file, and I need Here you'll find some code by Steve Schafer: http://www.swissdelphicenter.com/en/showcode.php?id=1243 tom |
Ingvar Nilse
![]() Delphi Developer |
Tue, 15 Feb 2005 14:53:15 GMT
Re:Encrypting a password string.QuoteTom Reiertsen wrote: The absolute simplest solution would be to XOR each char for i := 1 to Length(Password) do Works both ways. And you can use your imagination to Ingvar Nilsen |
Tom Reiertse
![]() Delphi Developer |
Tue, 15 Feb 2005 15:02:18 GMT
Re:Encrypting a password string.Quote"Thomas Stutz" <t...@swissdelphicenter.ch> wrote in message Quote
Quote> Here you'll find some code by Steve Schafer: for. Thanks to Ingvar too for his solution. Tom. |
Jason Peter
![]() Delphi Developer |
Tue, 15 Feb 2005 17:08:40 GMT
Re:Encrypting a password string.Quote"Tom Reiertsen" <t...@reiertsen.com> wrote in message Quote> I'm storing a username/password combination in a .INI file, and I need http://www.torry.net/vcl/security/strong/chipher.zip |
Johannes Ber
![]() Delphi Developer |
Tue, 15 Feb 2005 20:26:59 GMT
Re:Encrypting a password string.On Fri, 30 Aug 2002 14:04:10 +0200, Henrick Hellstr?m found a keyboard Quoteand wrote: linux only I think) see http://crank.sf.net/ ;-) johannes |
Thomas Stut
![]() Delphi Developer |
Tue, 15 Feb 2005 20:42:52 GMT
Re:Encrypting a password string.Quote> Steve Schafers encryption scheme can be broken with a close to 100% tom |
Christian Charett
![]() Delphi Developer |
Tue, 15 Feb 2005 23:29:16 GMT
Re:Encrypting a password string.Quote> not less code. It will only give you what is commonly known as having the password in cleartext. Why do all people come pickie when it comes to encryption? Christian |
Johannes Ber
![]() Delphi Developer |
Tue, 15 Feb 2005 23:52:36 GMT
Re:Encrypting a password string.On Fri, 30 Aug 2002 12:29:16 +0000, Christian Charette found a keyboard and wrote: Quote> Why do all people come pickie when it comes to encryption? to having it in clear-text, you only *feel* safer, and IMHO that is the problem, because people start relying on things like that, when they in reality cannot. johannes |
Henrick Hellstr?
![]() Delphi Developer |
Wed, 16 Feb 2005 02:37:23 GMT
Re:Encrypting a password string.QuoteChristian Charette wrote: >>"protection from your kid sister" (that's actually a semi-technical term >>frequently used at sci.crypt <g>), just like Ingvar Nilsen's code. > > > And what's whrong with that??? All he wanted was just something to avoid > having the password > in cleartext. > > Why do all people come pickie when it comes to encryption? Johannes is right. I would like add add another observation: Steve How is that? To give an analogous example, it would be like replacing a simple Pascal x := y + 5; with 50 lines of code giving the same final output. No sane programmer -- |
JQP
![]() Delphi Developer |
Wed, 16 Feb 2005 04:30:36 GMT
Re:Encrypting a password string."John Herbster (TeamB)" <Jo...@petronworld.com> wrote in message news:3d6f9a7f$1@newsgroups.borland.com... Quote> It was rejected (ostensibly because all encryption design had to be get in the way of the bureaucracy. |
Stephane Grobet
![]() Delphi Developer |
Fri, 18 Feb 2005 23:16:32 GMT
Re:Encrypting a password string.Quote> Ah, yes, I know. It all falls back to the user having a "passphrase" -- Quote> I'm now storing the keys required to but I haven't found one that didn't give uneasy feeling about how secure they are (I tend to be quite badly impressed when a product claims "absolute security" but doesn't give any details on how it acheive that goal). Quote> I had hoped not many people still use cleartext passwords, until my ISP that the most commonly used mail client on the planet doesn't even properly support secure POP3 login :( Quote> > BTW, since there seems to be several people here knowing something about Good luck, |
Stephane Grobet
![]() Delphi Developer |
Sat, 19 Feb 2005 00:24:52 GMT
Re:Encrypting a password string.QuoteJohannes Berg wrote: Actually, I could do the same using NTFS disk encryption and a hardware key but I don't want to encrypt the whole drive (for two reasons: one is performance, the second is that it would make backup problematic). But more specifically I was asking which PHYSICAL device you used ;) Quote> > The sad truth is that most users do that. And not only that, but you'll certificate or giving in to the Verisign blackmail) but I was actually thinking of a less secure but still secure enough handshake system: CRAM-MD5. (If I need security beyond this point, I'd much rather trust a document encryption system like PGP than a simple connection encryption system). Good luck, |
Stephane Grobet
![]() Delphi Developer |
Sat, 19 Feb 2005 15:47:31 GMT
Re:Encrypting a password string.Quote> Stephane Grobety wrote: wrong: 1/ I've never seen ANYONE react to a "this SSL certificate is invalid" or 2/ The number of flaws that is present in your average default 3/ YOUR box might be safe, but how safe is the box of your co-worker, wife No, I don't think that is is possible to secure a network that is to be Quote> If you have reasonable security policy it might be far from "trivially I'm very touchy about patching it. Same holds for my servers and the servers I've been asked to "fix" or "check". But I don't expect any of this to be invulnerable. I know that I'm not the only one with admin rights on my network. I know that most of the staff here has physical access to the domains controller and therefore could possibly get a copy of the SAM database and run it though a decryption tool. I also know that many machines here haven't been patched for a wile and that, while my anti-virii are good, they won't prevent one of the bosses from getting a tailored attack program on his personal laptop and getting rooted. These are the limits of my security. It would be possible to improve the security, but the cost wouldn't be realistic with what we have to loose. In practice, I KOW that someone determined could hack my network and, Quote> > - Most software that does file encryption either relies on the user password. And if you ask a user for a password, the strength of the resulting key can only possibly be as long as the number of byte in the password itself. Everything else (from salt to multiple hash) is doomed to be defeated in a short while. Quote> Properly implemented it will require less than a second of by the H(password) function and impossible to guess by an attacker that has access to the binary code of your program (in wose case) ? Quote> or on hard-coded keys here. Crypto hardware is bot much too {*word*118} and much too rare to be expected in the mass market today. And even these have several fundamental flaw like: you still need to store their access keys in the host system. Good luck, |
Stephane Grobet
![]() Delphi Developer |
Sat, 19 Feb 2005 22:27:27 GMT
Re:Encrypting a password string.Quote> No, you can't add information to the key material, but you may add a system but common to all users of that system to the password in order to defeate pre-computed hash lists, are you ? Or are you talking about adding lengthy string/bit manipulation to the Quote> >>You forgot about cryptographic hardware. box in order to receive the uncyphered stuff. And the only way that the hardware can KNOW you have the right to get that information is that if you, somehow, authenticate with it. And in that case, you're back with your chicken and egg problem: you need to store that authentication information safely. Now, if you considere that the machine acessing the CSP is "clean", then But the bottom line is, IMNSHO, that you can protect a server, maybe your Quote> From what I've been told you may find such a box for ~$1000. about the same price as a multi-usage printer/scanner/fax/copier or a good quality flat screen display, this price is WAY too high to be considered consumer product. Good luck, |
1. Password program...Encrypting .pwd files
2. RC4 encrypted data and headers for password validation
3. Using ADO with Encrypted/Password Protected Access databases
5. Found out how to encrypt interbase password (with source)
6. Found out how to encrypt interbase passwords
7. Encrypt/decrypt password to file in Delphi 1.0
8. accessing password encrypted .DB files over a win95 network
9. Creating a password encrypted Paradox table in 16-bit Delphi