In [H. Oguro et al., (2003)], the authors proposed efficient algorithms for the $\tau$-adic sliding window method and applied the algorithms to Koblitz elliptic curve cryptosystem. In this paper, we extend their ideas to hyperelliptic curve cryptosystem. We give respectively explicit formulae of simultaneous divisor class addition-subtraction algorithm for genus 2 hyperelliptic curves in affine and projective coordinate system and analyse the case of genus 3 hyperelliptic curves. Using this idea and Montgomery trick, we can reduce the number of inversions, multiplications and squares. In addition, we apply the idea to speed up the precomputation part of two scalar multiplication algorithms for hyperelliptic curve cryptosystem and discuss the efficiency of improved algorithms in detail.