Firstly, you should provide a mechanism to update the difficulty bit by bit, +8 bit step is too hard.

Do not think it is even possible at 5-6 bytes, because there is no room for a salt to randomize transaction id.

So for example you can verify per byte by your 256 predefined key values to get zero bits in id, there key is byte in base58 and value is number of zero bits in byte, json:

```
{
"1": 8,
"2": 7,
"3": 6,
"4": 6,
"5": 5,
"6": 5,
"7": 5,
"8": 5,
"9": 4,
"A": 4,
"B": 4,
"C": 4,
"D": 4,
"E": 4,
"F": 4,
"G": 4,
"H": 3,
"J": 3,
"K": 3,
"L": 3,
"M": 3,
"N": 3,
"P": 3,
"Q": 3,
"R": 3,
"S": 3,
"T": 3,
"U": 3,
"V": 3,
"W": 3,
"X": 3,
"Y": 3,
"Z": 2,
"a": 2,
"b": 2,
"c": 2,
"d": 2,
"e": 2,
"f": 2,
"g": 2,
"h": 2,
"i": 2,
"j": 2,
"k": 2,
"m": 2,
"n": 2,
"o": 2,
"p": 2,
"q": 2,
"r": 2,
"s": 2,
"t": 2,
"u": 2,
"v": 2,
"w": 2,
"x": 2,
"y": 2,
"z": 2,
"21": 2,
"22": 2,
"23": 2,
"24": 2,
"25": 2,
"26": 2,
"27": 1,
"28": 1,
"29": 1,
"2A": 1,
"2B": 1,
"2C": 1,
"2D": 1,
"2E": 1,
"2F": 1,
"2G": 1,
"2H": 1,
"2J": 1,
"2K": 1,
"2L": 1,
"2M": 1,
"2N": 1,
"2P": 1,
"2Q": 1,
"2R": 1,
"2S": 1,
"2T": 1,
"2U": 1,
"2V": 1,
"2W": 1,
"2X": 1,
"2Y": 1,
"2Z": 1,
"2a": 1,
"2b": 1,
"2c": 1,
"2d": 1,
"2e": 1,
"2f": 1,
"2g": 1,
"2h": 1,
"2i": 1,
"2j": 1,
"2k": 1,
"2m": 1,
"2n": 1,
"2o": 1,
"2p": 1,
"2q": 1,
"2r": 1,
"2s": 1,
"2t": 1,
"2u": 1,
"2v": 1,
"2w": 1,
"2x": 1,
"2y": 1,
"2z": 1,
"31": 1,
"32": 1,
"33": 1,
"34": 1,
"35": 1,
"36": 1,
"37": 1,
"38": 1,
"39": 1,
"3A": 1,
"3B": 1,
"3C": 1,
"3D": 0,
"3E": 0,
"3F": 0,
"3G": 0,
"3H": 0,
"3J": 0,
"3K": 0,
"3L": 0,
"3M": 0,
"3N": 0,
"3P": 0,
"3Q": 0,
"3R": 0,
"3S": 0,
"3T": 0,
"3U": 0,
"3V": 0,
"3W": 0,
"3X": 0,
"3Y": 0,
"3Z": 0,
"3a": 0,
"3b": 0,
"3c": 0,
"3d": 0,
"3e": 0,
"3f": 0,
"3g": 0,
"3h": 0,
"3i": 0,
"3j": 0,
"3k": 0,
"3m": 0,
"3n": 0,
"3o": 0,
"3p": 0,
"3q": 0,
"3r": 0,
"3s": 0,
"3t": 0,
"3u": 0,
"3v": 0,
"3w": 0,
"3x": 0,
"3y": 0,
"3z": 0,
"41": 0,
"42": 0,
"43": 0,
"44": 0,
"45": 0,
"46": 0,
"47": 0,
"48": 0,
"49": 0,
"4A": 0,
"4B": 0,
"4C": 0,
"4D": 0,
"4E": 0,
"4F": 0,
"4G": 0,
"4H": 0,
"4J": 0,
"4K": 0,
"4L": 0,
"4M": 0,
"4N": 0,
"4P": 0,
"4Q": 0,
"4R": 0,
"4S": 0,
"4T": 0,
"4U": 0,
"4V": 0,
"4W": 0,
"4X": 0,
"4Y": 0,
"4Z": 0,
"4a": 0,
"4b": 0,
"4c": 0,
"4d": 0,
"4e": 0,
"4f": 0,
"4g": 0,
"4h": 0,
"4i": 0,
"4j": 0,
"4k": 0,
"4m": 0,
"4n": 0,
"4o": 0,
"4p": 0,
"4q": 0,
"4r": 0,
"4s": 0,
"4t": 0,
"4u": 0,
"4v": 0,
"4w": 0,
"4x": 0,
"4y": 0,
"4z": 0,
"51": 0,
"52": 0,
"53": 0,
"54": 0,
"55": 0,
"56": 0,
"57": 0,
"58": 0,
"59": 0,
"5A": 0,
"5B": 0,
"5C": 0,
"5D": 0,
"5E": 0,
"5F": 0,
"5G": 0,
"5H": 0,
"5J": 0,
"5K": 0,
"5L": 0,
"5M": 0,
"5N": 0,
"5P": 0
}
```