[PATCH 1/3] Add helper functions for a5/3.