Re: Blowfish.e versus decimal points

new topic     » goto parent     » topic index » view thread      » older message » newer message

> On to bigger and better...
> 
> Have you had any problem with consistency?  I've been able to encrypt a
> relatively
> simple sequence and then I change a few bytes of the sequence being encrypted
> and I get a "slice ends past end of sequence (xxx) yyy" error at
> blowfish.e:308,
> which is: sel = bytes[a..a+7] when decrypting it.
> 
> I don't know whether this issue is related to the prior one (I don't think
> so).
> 
> Here is a sample of the type of sequence that will work (with a given key):
> 
> {{"Oct, 2005",877,888,817,802,838,829,886,840},{"Oct,
> 2006",900,888,817,802,838,829,886,840}}
> 
> Then, if I change the 900 to 432, I get the error:
> 
> {{"Oct, 2005",877,888,817,802,838,829,886,840},{"Oct,
> 2006",432,888,817,802,838,829,886,840}}
> 
> There is no pattern I can discern (although I'm sure there is one).  I can
> have
> a perfectly acceptable sequence and then I change the init key or change  a
> few bytes and it won't decrypt.  I never seem to have problems encrypting. 
> It is always coming back the other direction that creates the problem.

I ran into the same issue, too. I think it was because I was reading/writing
files in text mode. You have to open your files as "rb" or "wb" because the
encrypted data is binary, not text. That should fix your issue. Though I had that
issue quite a while ago, and never made note of how to fix it. So I could be
wrong...

-Greg


P.S. I found a couple other bugs in blowfish.e, in the wrappers for the file
routines:

-- line 523, change this:
  else
      call_proc(oldprint, {fn, st, x})
  end if
-- to this:
  else
      call_proc(oldprintf, {fn, st, x})
  end if

-- at line 535, change this:
  integer found
  sequence line, st
      found = find(fn, filefns)
-- to this:
  integer found
  sequence line
  object st
      found = find(fn, filefns)


new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu