I am trying to wrap my head around HOTP values, and I believe the essential building block is understanding the SHA-1 hashing function. I am coding in C, and I have seen many examples of people implementing the SHA1 function using libraries, such as OpenSSL. My question is, if I am attempting to implement my code on hardware that will not have internet access, is it viable to implement SHA1 using a library, or is it possible to create the function from scratch in the code?
I have tried implementing the sha1 algorithm by using libraries from openSSL, however I am not sure if this is the right approach.