chord: utility function to calculate shard addresses