Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Encryption

From: mattsmac:hotm:ail at: 8-Sep-2003 9:13

Hi all, I'm trying to implement a secure message transferring system using blowfish ecryption in rebol/command using view/pro. Non-encrypted messages transfer perfectly, and very short (like < 10 character) messages that are encrypted work as well. Anytime I use a slightly longer message, expecially if it includes puctuation, the transfer gets all screwed up. I'm using a standard tcp port with the direct, lines, and no-wait refinements. The no-wait is for another portion of the program, not the encryption. Here is my encryption/decryption algorithm. encrypt: func [data] [ crypt-key: #{5C2486ADFD7F36765A7A163E86C6FB9A} crypt-port: make port! [ scheme: 'crypt algorithm: 'blowfish direction: 'encrypt strength: 128 key: crypt-key padding: true ] open crypt-port insert crypt-port data update crypt-port crypt-data: copy crypt-port close crypt-port return crypt-data ] decrypt: func [data] [ crypt-key: #{5C2486ADFD7F36765A7A163E86C6FB9A} decrypt-port: make port! [ scheme: 'crypt algorithm: 'blowfish direction: 'decrypt strength: 128 key: crypt-key padding: true ] open decrypt-port insert decrypt-port data update decrypt-port result: copy decrypt-port close decrypt-port return to-string result ] _________________________________________________________________ Fast, faster, fastest: Upgrade to Cable or DSL today!