def genKw(w,msk,z):
<EOL>b = hmac(msk, z + w, tag="<STR_LIT>")<EOL>return BigInt(longFromString(b) % long(orderGt()))<EOL>
Generates key Kw using key-selector @w, master secret key @msk, and
table value @z.
@returns Kw as a BigInt.