IMPORTANT:
The functions within this FLL have changed. Please refer to the latest
documention for the VFP Encryption FLL that can be found at the
following link:

Major VFP Encryption Update



Kenneth Reproduces another RC4 Bug

Using the previous update to the VFP Encryption FLL, Kenneth Tamayo reproduces another bug in the RC4 code of the vfpencryption71.fll (also exists in vfpencryption.fll) and posts some repro code in the comments section of my previous blog entry.

Another great catch Kenneth! I have made the appropriate fixes in the vfpencryption.fll and vfpencryption71.fll code. These bug reports and fixes are very important since RC4 is perhaps one of the more useful ciphers in the FLLs when working with table data as it provides for ciphertext that is the same length as the plaintext. My thanks to Kenneth for his help. Here are the downloads for the newest versions of both FLLs and also the repro code for this latest bug and the previous bug that Kenneth reported that are now fixed.

Download the Latest Version of the VFP Encryption FLL (58 KB approx.)
(compiled with Visual Studio 2005 and requires the C++ 8.0 runtimes)

Download the Latest Version of the VFP Encryption 71 FLL (59 KB approx.)
(compiled with Visual Studio 2003 and requires the C++ 7.1 runtimes)

Code to Reproduce Bugs in previous versions of the FLLs using the RC4 stream cipher:

SET LIBRARY TO (LOCFILE(“vfpencryption.fll”)) && or vfpencryption71.fll

CREATE cursor myTable (myField C(28))

*!* Shows new bugs that Kenneth reported are fixed
INSERT INTO myTable (myField) VALUES (“CALLE RAFAEL GIMENEZ”)
INSERT INTO myTable (myField) VALUES (“CALLE GONZALO BERCEO”)
INSERT INTO myTable (myField) VALUES (“COND COOP EL ALCAZAR”)
INSERT INTO myTable (myField) VALUES (“CALLE MANUEL F ROSSY”)
INSERT INTO myTable (myField) VALUES (“CALLE EFIGENIO COCO FERRER”)
INSERT INTO myTable (myField) VALUES (“CALLE MANUEL JIMENEZ”)
INSERT INTO myTable (myField) VALUES (“COND EST DEL BLVD”)
INSERT INTO myTable (myField) VALUES (“URB PRADO ALTO”)
INSERT INTO myTable (myField) VALUES (“HACIENDA LOMAS”)
*!* Shows bug from before that Kenneth reported is fixed
INSERT INTO myTable (myField) VALUES (“QTAS DE CANOVANAS”)

BROWSE TITLE “Data is Inserted… (No problem)”
REPLACE ALL MyField WITH ENCRYPT(mytable.MyField,“RUSHLIFE”,1024)

BROWSE TITLE “Data is Encrypted… (No problem)”
REPLACE ALL MyField WITH DECRYPT(mytable.MyField,“RUSHLIFE”,1024)

BROWSE TITLE “Data is Decrypted… (Bugs are now fixed)”

SET LIBRARY TO