Thus spake John Viega: > > Additionally, with respect to counter mode, it might be best to > implement external to the EVP proper interface, just like HMAC. There > are a few issues I see that make counter mode a bit different from > other modes: > > 1) You should be able to insert your own function for choosing a > stream of counters. They don't have to be simple incrementing > counters.
The CTR mode proposal to NIST specifies starting a 1 and doing a simple increment. Unless other counter types are provably more secure, I prefer not to foster incompatible implementations. > 2) Counter mode can be used in a random-access manner. For example, > if you encrypt a file with counter mode, you can then access the > blocks of that file independently, as long as you know the counter > value. Good point. If you set the counter manually (instead of starting at 0), this should work properly. Were you looking for a more elegant way of doing this, or is my API broken? S -- Stephen Sprunk "So long as they don't get violent, I want to CCIE #3723 let everyone say what they wish, for I myself have K5SSS always said exactly what pleased me." --Albert Einstein ______________________________________________________________________ OpenSSL Project http://www.openssl.org Development Mailing List [EMAIL PROTECTED] Automated List Manager [EMAIL PROTECTED]