speed improvements to Key_bytes