Blowfish encryption issue - key too long

Blowfish encryption issue - key too long

Postby Roger Seiler » Thu Dec 05, 2013 2:24 pm

When encrypting a dbf field, hb_blowfishkey() creates an encryption key that is 4168 bytes long. This causes the encryption and decryption processes to be extremely time consuming. For example, I have 23 fields in a dbf that take about 5 minutes to encrypt/decrypt per 1000 records. I see that RSA and other encryption systems generally use encryption keys that are only 128 BITS (not bytes) long, and so are much faster to process.

Is there a way to set the size of the encryption key in Blowfish to make it a much shorter length so it will process faster?

- Roger
User avatar
Roger Seiler
 
Posts: 223
Joined: Thu Dec 01, 2005 3:34 pm
Location: Nyack, New York, USA

Re: Blowfish encryption issue - key too long

Postby Roger Seiler » Thu Dec 05, 2013 6:38 pm

Here is some test code that shows the problem:

Code: Select all  Expand view

Function BlowfishTest()

    local cBfKey := hb_blowfishKey( "fivewin" )

    MsgInfo(cBfKey,"cBfKey")

    Msginfo(LEN(cBfKey),"LEN(cBfKey)")    // I get len of 4168 bytes. Much too big!

return nil
 


I'm using FWH 13.08 and xHarbour.com 13.08 .
User avatar
Roger Seiler
 
Posts: 223
Joined: Thu Dec 01, 2005 3:34 pm
Location: Nyack, New York, USA

Re: Blowfish encryption issue - key too long

Postby Roger Seiler » Fri Dec 06, 2013 12:57 pm

I sent a private email to Przemek about this. He is the expert on Blowfish encryption for Harbour, and If he offers a solution, I'll post it here.
User avatar
Roger Seiler
 
Posts: 223
Joined: Thu Dec 01, 2005 3:34 pm
Location: Nyack, New York, USA


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 40 guests