added key calculations for Bob, fixed error in block calculation