Tcl Library Source Code

Ticket Change Details
Login
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to [email protected]
or submit via the online form by Sep 9.
Overview

Artifact ID: bf7318005d50d804148dcfb400bbe6a4a20edf20b32414475ec8e212c1221039
Ticket: d56da1abcaa028bed473ff5ffbd814f41909c5f5
Incorrect padding of data when using input channel
User & Date: anonymous 2019-06-06 08:43:14
Changes

  1. Change assignee to "nobody"
  2. Change closer to "nobody"
  3. Change cmimetype to "text/plain"
  4. Change comment to:

    Blowfish pads an incoming stream improperly. This was seen and reported by Jim in this thread on comp.lang.tcl: https://groups.google.com/forum/#!topic/comp.lang.tcl/XhDe5-yLzw0

    The improper padding happens in the procedure blowfish::Chunk which already contains a FIXME comment. The procedure needs to care about 2 things:

    1. Data must always be processed in multiples of 8 bytes. However, it's not guaranteed that a multiple of 8 bytes is read even in the middle of a stream. Reasons can be an odd user provided chunk size or a nonblocking channel. My patch introduces a new variable state(remainder) to hold the modulo data.

    2. Apply padding at the end of the stream, and only there. Don't pad an empty string. Unfortunately, blowfish::Pad is doing exactly this. I think an empty string should not be padded. Likewise an empty data set encrpyts to an empty data set. If this is not correct then extra care has to be taken with the remainig data at EOF. Also, blowfish::Chunk didn't call pad with the user provided pad character.

    The attached patch takes care of both points.

    Missing: A test for the input channel API.

    -- Stephan Effelsberg

  5. Change foundin to "1.0.4"
  6. Change is_private to "0"
  7. Change login to "anonymous"
  8. Change priority to "5 Medium"
  9. Change private_contact to "87a8af3af6267b859f2893f3f1d57a347c5b095a"
  10. Change resolution to "None"
  11. Change severity to "Minor"
  12. Change status to "Open"
  13. Change submitter to "anonymous"
  14. Change subsystem to "blowfish"
  15. Change title to "Incorrect padding of data when using input channel"
  16. Change type to "Bug"