> Do you decide what length of the S2K session key to use (in your program),
> then when the secret key needs to be extracted from the secret key-ring,
> just keep trying multiple session key lengths in block size multiples (as
> generated from the S2K specifier) until the checksum checks out OK?
>
> It seems it would be a lot easier (maybe less secure?) if a session key
> length was specified somewhere.
The session key length is always known. It is part of the algorithm
identifier. See section 9.2.