Search code examples
calgorithmsha1verificationmedical

Verifying SHA-1 Algorithm (function)


I have downloaded a SHA-1 function, by Paul E. Jones, from the web.

This code is going into a medical device as SOUP (Software Of Unknown Provenance) and needs to be verified.

Is there an official website that can be used to verify a C implementation of the SHA-1 algorithm?

Here's a link to the SHA-1 implementation: SHA-1 Implementation in C

When I search the web, all I get are listings of sites to download the algorithm, or explanations of how the algorithm works.


Solution

  • Thanks to Nickolay Olshevsky for the Test Vector guidance and to Daniel Kamil Kozar for the link.

    The method to validate the algorithm is to feed it known test vectors and compare the digest to known digests from the NIST library: NIST Library

    The best process for testing would be to send the algorithm on the platform that the code is running. Next best is to develop a C program the uses the source code file (without modifications).