We review the new type of Deutsch-Jozsa algorithm proposed in [K. Nagata and T. Nakamura, Int. J. Theor. Phys. 49, 162 (2010)]. We suggest that the Deutsch-Jozsa algorithm can be used for quantum key distribution. Alice sends input N 1 partite uncorrelated state to a black box. Bob measures output state. Now, Alice and Bob have promised to use a function f which is one of two kinds: either the value of f is constant or balanced. To Eve, it is secret. Alice’s and Bob’s goal is to determine with certainty whether they have chosen a constant or a balanced function. Alice and Bob get one bit if they determine the function f. The speed to get one bit improves by a factor of 2N. This may improve the speed to establish quantum key distribution by a factor of 2N.