Text this: A robust security framework with bit-flipping attack and timing attack for key derivation functions