aGksIA0KZG9lcyBhbnlib2R5IGtub3cgYW55IHNpbXBsZSBhbmQgRkFTVCBhbGdvcnl0aG0gdG8g
ZW5jcnlwdCBkYXRhIGluIHRoZSBkYmYgZmllbGRzPw0KKGV4Y2VwdCBfY3J5cHQudmN4KQ==

Re: simple data encryption algorythm? by Andrew

Andrew
Thu Jun 30 03:33:14 CDT 2005

"Miria" <mukas@soka.com> wrote in message
news:e94O20TfFHA.2840@tk2msftngp13.phx.gbl...
> hi,
> does anybody know any simple and FAST algorythm to encrypt data in the dbf
> fields?
> (except _crypt.vcx)

ROT13
simple? check.
fast? check.
secure? hmmm.

How secure should it be?



Re: simple data encryption algorythm? by christophe

christophe
Thu Jun 30 03:45:31 CDT 2005

simple: yes

Function ROT13
Lparameters p_cStrIn
return chrtran(p_cStrIn,
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwyz0123456789",
"NOPQRSTUVWXYZABCDEFGHIJKLMnopqrstuvzxyzabcdefghijklm5678901234")

how to use it:
pass a string to encrypt it.
pass the encrypted to get the original value

regards
christophe
--
\|||/
(o o)
----ooO-(_)-Ooo-------------


"Andrew Howell" <ajh@work> schreef in bericht
news:%23dnht5UfFHA.1284@TK2MSFTNGP14.phx.gbl...
> "Miria" <mukas@soka.com> wrote in message
> news:e94O20TfFHA.2840@tk2msftngp13.phx.gbl...
>> hi,
>> does anybody know any simple and FAST algorythm to encrypt data in the
>> dbf fields?
>> (except _crypt.vcx)
>
> ROT13
> simple? check.
> fast? check.
> secure? hmmm.
>
> How secure should it be?
>



Re: simple data encryption algorythm? by Andrew

Andrew
Thu Jun 30 04:27:51 CDT 2005

"christophe" <irs.znospamforme@skynet.be> wrote in message
news:uYkBYAVfFHA.2156@TK2MSFTNGP14.phx.gbl...
> simple: yes
>
> Function ROT13
> Lparameters p_cStrIn
> return chrtran(p_cStrIn,
> "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwyz0123456789",
> "NOPQRSTUVWXYZABCDEFGHIJKLMnopqrstuvzxyzabcdefghijklm5678901234")

That's not rot13, it shouldn't affect numbers ;)



Re: simple data encryption algorythm? by Andrew

Andrew
Thu Jun 30 05:57:04 CDT 2005

Anyone who is going to Copy and Paste this needs to be aware that in the
thrid argument of the ChrTran function there is a z where there should be a
w.

Andrew R.


"christophe" <irs.znospamforme@skynet.be> wrote in message
news:uYkBYAVfFHA.2156@TK2MSFTNGP14.phx.gbl...
: simple: yes
:
: Function ROT13
: Lparameters p_cStrIn
: return chrtran(p_cStrIn,
: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwyz0123456789",
: "NOPQRSTUVWXYZABCDEFGHIJKLMnopqrstuvzxyzabcdefghijklm5678901234")
:
: how to use it:
: pass a string to encrypt it.
: pass the encrypted to get the original value
:
: regards
: christophe
: --
: \|||/
: (o o)
: ----ooO-(_)-Ooo-------------
:
:
: "Andrew Howell" <ajh@work> schreef in bericht
: news:%23dnht5UfFHA.1284@TK2MSFTNGP14.phx.gbl...
: > "Miria" <mukas@soka.com> wrote in message
: > news:e94O20TfFHA.2840@tk2msftngp13.phx.gbl...
: >> hi,
: >> does anybody know any simple and FAST algorythm to encrypt data in the
: >> dbf fields?
: >> (except _crypt.vcx)
: >
: > ROT13
: > simple? check.
: > fast? check.
: > secure? hmmm.
: >
: > How secure should it be?
: >
:
:



Re: simple data encryption algorythm? by Andrew

Andrew
Thu Jun 30 06:03:26 CDT 2005

Sorry.

Also the second argument has the x missing.

Andrew R.


"Andrew R" <adr @ rossers. net> wrote in message
news:3ii1g4FlfoqpU1@individual.net...
: Anyone who is going to Copy and Paste this needs to be aware that in the
: thrid argument of the ChrTran function there is a z where there should be
a
: w.
:
: Andrew R.
:
:
: "christophe" <irs.znospamforme@skynet.be> wrote in message
: news:uYkBYAVfFHA.2156@TK2MSFTNGP14.phx.gbl...
: : simple: yes
: :
: : Function ROT13
: : Lparameters p_cStrIn
: : return chrtran(p_cStrIn,
: : "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwyz0123456789",
: : "NOPQRSTUVWXYZABCDEFGHIJKLMnopqrstuvzxyzabcdefghijklm5678901234")
: :
: : how to use it:
: : pass a string to encrypt it.
: : pass the encrypted to get the original value
: :
: : regards
: : christophe
: : --
: : \|||/
: : (o o)
: : ----ooO-(_)-Ooo-------------
: :
: :
: : "Andrew Howell" <ajh@work> schreef in bericht
: : news:%23dnht5UfFHA.1284@TK2MSFTNGP14.phx.gbl...
: : > "Miria" <mukas@soka.com> wrote in message
: : > news:e94O20TfFHA.2840@tk2msftngp13.phx.gbl...
: : >> hi,
: : >> does anybody know any simple and FAST algorythm to encrypt data in
the
: : >> dbf fields?
: : >> (except _crypt.vcx)
: : >
: : > ROT13
: : > simple? check.
: : > fast? check.
: : > secure? hmmm.
: : >
: : > How secure should it be?
: : >
: :
: :
:
:



Re: simple data encryption algorythm? by Andrew

Andrew
Thu Jun 30 06:05:36 CDT 2005

"Andrew R" <adr @ rossers. net> wrote in message
news:3ii1g4FlfoqpU1@individual.net...
> Anyone who is going to Copy and Paste this needs to be aware that in the
> thrid argument of the ChrTran function there is a z where there should be
> a
> w.

And the second parameter is missing a lower case x.



Re: simple data encryption algorythm? by SergeyBer

SergeyBer
Thu Jun 30 07:11:50 CDT 2005

Miria wrote:
> hi,
> does anybody know any simple and FAST algorythm to encrypt data in the dbf fields?
> (except _crypt.vcx)

Go to UT Frequently Asked Questions section at
http://www.universalthread.com/wconnect/wc.dll?LevelExtreme~2,84,13,5
and search for my FAQ ID 27613 'VFP implementation of the Chipher
encryption'

--
--sb--

VFP MVP

Re: simple data encryption algorythm? by christophe

christophe
Thu Jun 30 07:35:47 CDT 2005

Sorry guys,

and indeed I have altered it a bit so numbers are "converted" to.
if you don't want it, just delete them.
(btw the more you add characters to it the more it become Rot47
if I remember it well... don't shoot me ;-)

this is the right one (with numbers) :

Function ROT13
Lparameters p_cStrIn
return chrtran(p_cStrIn,
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",
"NOPQRSTUVWXYZABCDEFGHIJKLMnopqrstuvwxyzabcdefghijklm5678901234")

test sample :
? rot13(rot13("abcdefghijklmnopqrstuvwxyz0123456789"))

regards
christophe
--

"christophe" <irs.znospamforme@skynet.be> schreef in bericht
news:uYkBYAVfFHA.2156@TK2MSFTNGP14.phx.gbl...
> simple: yes
>
> Function ROT13
> Lparameters p_cStrIn
> return chrtran(p_cStrIn,
> "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwyz0123456789",
> "NOPQRSTUVWXYZABCDEFGHIJKLMnopqrstuvzxyzabcdefghijklm5678901234")
>
> how to use it:
> pass a string to encrypt it.
> pass the encrypted to get the original value
>
> regards
> christophe
> --
> \|||/
> (o o)
> ----ooO-(_)-Ooo-------------
>
>
> "Andrew Howell" <ajh@work> schreef in bericht
> news:%23dnht5UfFHA.1284@TK2MSFTNGP14.phx.gbl...
>> "Miria" <mukas@soka.com> wrote in message
>> news:e94O20TfFHA.2840@tk2msftngp13.phx.gbl...
>>> hi,
>>> does anybody know any simple and FAST algorythm to encrypt data in the
>>> dbf fields?
>>> (except _crypt.vcx)
>>
>> ROT13
>> simple? check.
>> fast? check.
>> secure? hmmm.
>>
>> How secure should it be?
>>
>
>




Re: simple data encryption algorythm? by Ook

Ook
Thu Jun 30 10:09:19 CDT 2005

If you need more security then that, you should consider using MySQL or
MSSQL. VFP tables were not designed to be secure. Also, be very carefull not
to encrypt a field that is already encrypted. I once worked on a system that
used a popular commercial encryption product. Somehow, the tables had become
multiply encrypted. We spent hours and hours trying to figure out how to
decrypt them and in the end we were not sucessfully. They had not backed up
their system for months and the end result of all of this was that they lost
3 months worth of data. We scrapped the encryption product, but of course by
then it was too late.

Encryption is risky, make sure you understand and are willing to assume the
risks.

On my current project, we used dot net to build an encryption module that
uses some sort of standard encryption. While it is fast and works well, we
have still had problems with fields being encrypted multiple times and the
resulting loss of data. Using encryption requires a carefull design, and
carefull coding to ensure your data is protected, but not lost.



"Miria" <mukas@soka.com> wrote in message
news:%23HK20MVfFHA.3612@TK2MSFTNGP12.phx.gbl...
> or maybe not... hmmm no, its not enough, too unsecure
>
> "Miria" <mukas@soka.com> wrote in message
> news:eycRxJVfFHA.2392@TK2MSFTNGP10.phx.gbl...
>> thnks, i think its enough for me;)
>>
>> "christophe" <irs.znospamforme@skynet.be> wrote in message
>> news:uYkBYAVfFHA.2156@TK2MSFTNGP14.phx.gbl...
>> > simple: yes
>> >
>> > Function ROT13
>> > Lparameters p_cStrIn
>> > return chrtran(p_cStrIn,
>> > "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwyz0123456789",
>> > "NOPQRSTUVWXYZABCDEFGHIJKLMnopqrstuvzxyzabcdefghijklm5678901234")
>> >
>> > how to use it:
>> > pass a string to encrypt it.
>> > pass the encrypted to get the original value
>> >
>> > regards
>> > christophe
>> > --
>> > \|||/
>> > (o o)
>> > ----ooO-(_)-Ooo-------------
>> >
>> >
>> > "Andrew Howell" <ajh@work> schreef in bericht
>> > news:%23dnht5UfFHA.1284@TK2MSFTNGP14.phx.gbl...
>> > > "Miria" <mukas@soka.com> wrote in message
>> > > news:e94O20TfFHA.2840@tk2msftngp13.phx.gbl...
>> > >> hi,
>> > >> does anybody know any simple and FAST algorythm to encrypt data in
>> > >> the
>> > >> dbf fields?
>> > >> (except _crypt.vcx)
>> > >
>> > > ROT13
>> > > simple? check.
>> > > fast? check.
>> > > secure? hmmm.
>> > >
>> > > How secure should it be?
>> > >
>> >
>> >



Re: simple data encryption algorythm? by John

John
Thu Jun 30 12:02:45 CDT 2005

Hey Miria,

Can you give us a little more idea as to what acceptable security is? If
you're looking to keep honest people honest, Andrew's suggestion might fit.
If you're looking to keep honest but curious people honest anyway, maybe a
variation on that theme is all you need. If you're looking to keep those
with advanced training in cryptography from eventually cracking your code,
then as Ook mentioned, VFP probably is not your best choice.

For keeping the curious honest, you could add in something that uses the
same basic idea but varies the offset point based on some seed like a
customer ID value or the number of characters in the string. Every
calculation you add can further obfuscate the formula, but will conversely
effect performance.

FUNCTION EncryptWithSeed
LPARAMETERS InString, Seed

AlphaNum = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
!@#$%^&*()-_=+;:'" + '"' + "[{]}\|,<.>/?"
Offset = Seed % 40 + 13
RETURN CHRTRAN( InString, AlphaNum, SUBSTR( AlphaNum, Offset ) + LEFT(
AlphaNum, Offset - 1 ) )


Another idea might be to switch the encryption method per every X
characters. This would give the added benifit of keeping from deciphering
"clue" charatcters in a large block of text (like spaces).

FUNCTION EncryptWithSeedAndBreaks
LPARAMETERS InString, Seed

ReturnString = ""
FOR Cntr = 0 TO INT( LEN( InString ) /10)
ReturnString = ReturnString + EncryptWithSeed( SUBSTR( InString, 10 *
Cntr +1, 10 ), Seed + Cntr )
ENDFOR

RETURN ReturnString

AlphaNum = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
!@#$%^&*()-_=+;:'" + '"' + "[{]}\|,<.>/?"
Offset = Seed % 40 + 13
RETURN CHRTRAN( InString, AlphaNum, SUBSTR( AlphaNum, Offset ) + LEFT(
AlphaNum, Offset - 1 ) )


HTH,

John

"Miria" <mukas@soka.com> wrote in message
news:%23HK20MVfFHA.3612@TK2MSFTNGP12.phx.gbl...
> or maybe not... hmmm no, its not enough, too unsecure
>
> "Miria" <mukas@soka.com> wrote in message
> news:eycRxJVfFHA.2392@TK2MSFTNGP10.phx.gbl...
>> thnks, i think its enough for me;)
>>
>> "christophe" <irs.znospamforme@skynet.be> wrote in message
>> news:uYkBYAVfFHA.2156@TK2MSFTNGP14.phx.gbl...
>> > simple: yes
>> >
>> > Function ROT13
>> > Lparameters p_cStrIn
>> > return chrtran(p_cStrIn,
>> > "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwyz0123456789",
>> > "NOPQRSTUVWXYZABCDEFGHIJKLMnopqrstuvzxyzabcdefghijklm5678901234")
>> >
>> > how to use it:
>> > pass a string to encrypt it.
>> > pass the encrypted to get the original value
>> >
>> > regards
>> > christophe
>> > --
>> > \|||/
>> > (o o)
>> > ----ooO-(_)-Ooo-------------
>> >
>> >
>> > "Andrew Howell" <ajh@work> schreef in bericht
>> > news:%23dnht5UfFHA.1284@TK2MSFTNGP14.phx.gbl...
>> > > "Miria" <mukas@soka.com> wrote in message
>> > > news:e94O20TfFHA.2840@tk2msftngp13.phx.gbl...
>> > >> hi,
>> > >> does anybody know any simple and FAST algorythm to encrypt data in
>> > >> the
>> > >> dbf fields?
>> > >> (except _crypt.vcx)
>> > >
>> > > ROT13
>> > > simple? check.
>> > > fast? check.
>> > > secure? hmmm.
>> > >
>> > > How secure should it be?
>> > >
>> >
>> >