Correction: an older version of medium-mcrypt >>9 slipped through. Just as truncate-padding >>8 uses binary mode, the same needs to be used in medium-mcrypt, of course.
http://web.mit.edu/scheme_v9.2/doc/mit-scheme-ref/File-Ports.html
Any file can be opened in one of two modes, normal or binary. Normal mode is for accessing text files, and binary mode is for accessing other files. Unix does not distinguish these modes, but Windows do: in normal mode, their file ports perform newline translation, mapping between the carriage-return/linefeed sequence that terminates text lines in files, and the #\newline that terminates lines in Scheme. In binary mode, such ports do not perform newline translation. Unless otherwise mentioned, the procedures in this section open files in normal mode.
(doout (case outwhat
((file) (lambda () (call-with-binary-output-file (cadr outspec) mep)))
((string) (lambda () (call-with-output-string mep)))
(else 'error-outwhat)))
(doin (case inwhat
((file) (lambda () (with-input-from-binary-file indata doout)))
((string) (lambda () (with-input-from-string indata doout)))
(else 'error-inwhat)))
(ret (doin)))