Re: encrypt not working in Leopard - temporary solution suggestion

2007-12-14 Thread Josh Mellicker
For encryption/decryption on Leopard, until things are fixed, I've  
been using this simple substitution cypher plus a Base64encode/decode:


 


function lbencrypt pIn
put empty into tOut
repeat for each char c in pIn
put chartonum(c)+2  tab before tOut
end repeat
return base64encode(tOut)
end lbencrypt
 


function lbdecrypt pIn
put base64decode(pIn) into pIn
set the itemdel to tab
put empty into tOut
repeat for each item c in pIn
put numtochar(c-2) before tOut
end repeat
return tOut
end lbdecrypt
 



Once encryption is fixed you can just put your regular encryption  
handlers back.


If anyone has something better, post it if ya got it!




On Dec 6, 2007, at 5:22 PM, Josh Mellicker wrote:

Has anyone else run into a problem with encrypt or decrypt in  
OS X 10.5 (Leopard)?


We have tried using blowfish and bf-ecb, but on Leopard systems  
(dev environment and standalone), it just doesn't execute the command.


For example:

function lbencrypt tData
encrypt tData using blowfish with password jeepers
answer it
end lbencrypt

the result is simply the original parameter.


(On WinXP, Vista, and OS X 10.4 the result is the encrypted data.)
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your  
subscription preferences:

http://lists.runrev.com/mailman/listinfo/use-revolution


___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: encrypt not working in Leopard - temporary solution suggestion

2007-12-14 Thread Mark Smith
Josh, this came up during the summer, and here is an RC4  
implementation. It's 'symetrical' - (you use the same function in and  
out). You'll need to base64encode the output if you're sending over  
the internet, and base64Decode back again before decrypting.


put base64Encode(rc4(somePlainData, someSecretKey)) into  
someEncryptedData


put rc4(base64Decode(someEncrypedData), someSecretKey) into  
somePlainData





function rc4 pText, pKey
  -- initialize
  repeat with i = 0 to 255
put i into S1[i]
  end repeat

  put 0 into i
  repeat with n = 0 to 255
add 1 to i
if i  length(pkey) then put 1 into i
put charToNum(char i of pKey) into S2[n]
  end repeat

  put 0 into j
  repeat with i = 0 to 255
put (j + S1[i] + S2[i]) mod 256 into j
put S1[i] into temp
put S1[j] into S1[i]
put temp into S1[j]
  end repeat

  -- encrypt/decrypt
  put 0 into i ; put 0 into j
  repeat for each char c in pText
put charToNum(c) into tChar

put (i + 1) mod 256 into i
put (j + S1[i]) mod 256 into j
put S1[i] into temp
put S1[j] into S1[i]
put temp into S1[j]
put (S1[i] + S1[j]) mod 256 into t
put S1[t] into K

put numToChar(tChar bitXor K) after tOutput
  end repeat

  return tOutput
end rc4


Best,

Mark

On 15 Dec 2007, at 02:59, Josh Mellicker wrote:



If anyone has something better, post it if ya got it!





___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: encrypt not working in Leopard - temporary solution suggestion

2007-12-14 Thread Josh Mellicker

Thanks Mark, that is far superior.


On Dec 14, 2007, at 7:31 PM, Mark Smith wrote:

Josh, this came up during the summer, and here is an RC4  
implementation. It's 'symetrical' - (you use the same function in  
and out). You'll need to base64encode the output if you're sending  
over the internet, and base64Decode back again before decrypting.


put base64Encode(rc4(somePlainData, someSecretKey)) into  
someEncryptedData


put rc4(base64Decode(someEncrypedData), someSecretKey) into  
somePlainData





function rc4 pText, pKey
  -- initialize
  repeat with i = 0 to 255
put i into S1[i]
  end repeat

  put 0 into i
  repeat with n = 0 to 255
add 1 to i
if i  length(pkey) then put 1 into i
put charToNum(char i of pKey) into S2[n]
  end repeat

  put 0 into j
  repeat with i = 0 to 255
put (j + S1[i] + S2[i]) mod 256 into j
put S1[i] into temp
put S1[j] into S1[i]
put temp into S1[j]
  end repeat

  -- encrypt/decrypt
  put 0 into i ; put 0 into j
  repeat for each char c in pText
put charToNum(c) into tChar

put (i + 1) mod 256 into i
put (j + S1[i]) mod 256 into j
put S1[i] into temp
put S1[j] into S1[i]
put temp into S1[j]
put (S1[i] + S1[j]) mod 256 into t
put S1[t] into K

put numToChar(tChar bitXor K) after tOutput
  end repeat

  return tOutput
end rc4


Best,

Mark

On 15 Dec 2007, at 02:59, Josh Mellicker wrote:



If anyone has something better, post it if ya got it!





___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your  
subscription preferences:

http://lists.runrev.com/mailman/listinfo/use-revolution


___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: encrypt not working in Leopard?

2007-12-07 Thread Josh Mellicker

Thanks for checking, will try it.

On Dec 6, 2007, at 9:29 PM, Jim Sims wrote:



On Dec 7, 2007, at 2:22 AM, Josh Mellicker wrote:

Has anyone else run into a problem with encrypt or decrypt in  
OS X 10.5 (Leopard)?


We have tried using blowfish and bf-ecb, but on Leopard  
systems (dev environment and standalone), it just doesn't execute  
the command.



I just fired up Leopard (I'm only using it from an external HD for  
testing until 10.5.2 comes out)
and then used Rev 2.8.1 and the Encryption Made Easy stack from  
Bill Vlahos.


Worked as advertised.

sims
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your  
subscription preferences:

http://lists.runrev.com/mailman/listinfo/use-revolution


___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


encrypt not working in Leopard?

2007-12-06 Thread Josh Mellicker
Has anyone else run into a problem with encrypt or decrypt in OS  
X 10.5 (Leopard)?


We have tried using blowfish and bf-ecb, but on Leopard systems  
(dev environment and standalone), it just doesn't execute the command.


For example:

function lbencrypt tData
encrypt tData using blowfish with password jeepers
answer it
end lbencrypt

the result is simply the original parameter.


(On WinXP, Vista, and OS X 10.4 the result is the encrypted data.)
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: encrypt not working in Leopard?

2007-12-06 Thread Jim Sims


On Dec 7, 2007, at 2:22 AM, Josh Mellicker wrote:

Has anyone else run into a problem with encrypt or decrypt in  
OS X 10.5 (Leopard)?


We have tried using blowfish and bf-ecb, but on Leopard systems  
(dev environment and standalone), it just doesn't execute the command.



I just fired up Leopard (I'm only using it from an external HD for  
testing until 10.5.2 comes out)
and then used Rev 2.8.1 and the Encryption Made Easy stack from Bill  
Vlahos.


Worked as advertised.

sims
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution