use binary key file instead c code