<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Oct 6, 2014 at 6:23 PM, Bill Cox <span dir="ltr"><<a href="mailto:waywardgeek@gmail.com" target="_blank">waywardgeek@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span class=""></span>Simply compute:<br><br><div>Digest = H(N || H(H(1 || B1) * H(2 || B2) * ... * H(n || Bn) mod p))<br><br></div></div></div></div></blockquote><div><br></div><div>In case it's not obvious to Tom or anyone not familiar with modulo arithmetic, this hash function can be updated in constant time by keeping track of the Digest, as well as the mod p result.  Just multiply the old mod p result by the multiplicative inverse of the H value that changed, and then multiply by the new H value mod p, and recompute the digest.<br><br>Bill<br></div></div></div></div>