summaryrefslogtreecommitdiffstats
path: root/src/crypto/md5.c
Commit message (Collapse)AuthorAgeFilesLines
* [build] Mark core files as permitted for UEFI Secure BootMichael Brown2026-01-141-0/+1
| | | | | | | | | | | | Mark all files used in a standard build of bin-x86_64-efi/snponly.efi as permitted for UEFI Secure Boot. These files represent the core functionality of iPXE that is guaranteed to have been included in every binary that was previously subject to a security review and signed by Microsoft. It is therefore legitimate to assume that at least these files have already been reviewed to the required standard multiple times. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [libc] Replace linker_assert() with build_assert()Michael Brown2024-01-161-5/+5
| | | | | | | | | | | | | | | | | | | | | | | We currently implement build-time assertions via a mechanism that generates a call to an undefined external function that will cause the link to fail unless the compiler can prove that the asserted condition is true (and thereby eliminate the undefined function call). This assertion mechanism can be used for conditions that are not amenable to the use of static_assert(), since static_assert() will not allow for proofs via dead code elimination. Add __attribute__((error(...))) to the undefined external function, so that the error is raised at compile time rather than at link time. This allows us to provide a more meaningful error message (which will include the file name and line number, as with any other compile-time error), and avoids the need for the caller to specify a unique symbol name for the external function. Change the name from linker_assert() to build_assert(), since the assertion now takes place at compile time rather than at link time. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [crypto] Allow algorithms to be included without being OID-identifiableMichael Brown2020-06-161-11/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | There are many ways in which the object for a cryptographic algorithm may be included, even if not explicitly enabled in config/crypto.h. For example: the MD5 algorithm is required by TLSv1.1 or earlier, by iSCSI CHAP authentication, by HTTP digest authentication, and by NTLM authentication. In the current implementation, inclusion of an algorithm for any reason will result in the algorithm's ASN.1 object identifier being included in the "asn1_algorithms" table, which consequently allows the algorithm to be used for any ASN1-identified purpose. For example: if the MD5 algorithm is included in order to support HTTP digest authentication, then iPXE would accept a (validly signed) TLS certificate using an MD5 digest. Split the ASN.1 object identifiers into separate files that are required only if explicitly enabled in config/crypto.h. This allows an algorithm to be omitted from the "asn1_algorithms" table even if the algorithm implementation is dragged in for some other purpose. The end result is that only the algorithms that are explicitly enabled in config/crypto.h can be used for ASN1-identified purposes such as signature verification. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [crypto] Eliminate repetitions in MD5 round constant tableMichael Brown2017-11-121-7/+10
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [crypto] Fix endianness typo in commentMichael Brown2017-11-121-1/+1
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [legal] Relicense files under GPL2_OR_LATER_OR_UBDLMichael Brown2015-03-021-1/+5
| | | | | | | Relicense files for which I am the sole author (as identified by util/relicense.pl). Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [legal] Update FSF mailing address in GPL licence textsMichael Brown2012-07-201-1/+2
| | | | | Suggested-by: Daniel P. Berrange <berrange@redhat.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [crypto] Define ASN.1 OID-identified algorithms for all supported digestsMichael Brown2012-03-221-0/+11
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [crypto] Use standard bit-rotation functionsMichael Brown2012-03-211-11/+1Star
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [crypto] Replace MD5 implementationMichael Brown2012-03-051-180/+242
| | | | | | | Replace MD5 implementation with one which is around 20% smaller. This implementation has been verified using the existing MD5 self-tests. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Rename gPXE to iPXEMichael Brown2010-04-201-2/+2
| | | | | | | | | | | Access to the gpxe.org and etherboot.org domains and associated resources has been revoked by the registrant of the domain. Work around this problem by renaming project from gPXE to iPXE, and updating URLs to match. Also update README, LOG and COPYRIGHTS to remove obsolete information. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [legal] Add a selection of FILE_LICENCE declarationsMichael Brown2009-05-181-0/+2
| | | | | Add FILE_LICENCE declarations to almost all files that make up the various standard builds of gPXE.
* [build] Enable building with the Intel C compiler (icc)Michael Brown2009-03-261-7/+5Star
|
* [crypto] Split crypto_algorithm into {digest,cipher,pubkey}_algorithmMichael Brown2009-02-181-4/+3Star
| | | | | | | | The various types of cryptographic algorithm are fundamentally different, and it was probably a mistake to try to handle them via a single common type. pubkey_algorithm is a placeholder type for now.
* make md5_steps staticHolger Lubitz2007-07-271-1/+1
|
* Make context sizes available for statically-allocated structuresMichael Brown2007-02-011-11/+1Star
|
* Added blocksize for the benefit of HMAC codeMichael Brown2007-01-301-1/+1
|
* Generalise digest_algorithm to crypto_algorithm.Michael Brown2007-01-301-7/+9
|
* Added "name" field to digest algorithmsMichael Brown2006-11-211-0/+1
|
* Added generic CHAP layer, independent of iSCSIMichael Brown2006-11-211-10/+19
|
* Made it temporarily possible to call MD5 routines directly from externalMichael Brown2006-11-151-21/+12Star
| | | | | | code, rather than going through the digest layer. Removed a spurious line of constants.
* Restored the le32_to_cpus() and cpu_to_le32s() callsMichael Brown2006-09-111-2/+6
|
* Tidied up.Michael Brown2006-09-111-105/+25Star
|
* Reduced size from 2087 bytes to 1056 bytesMichael Brown2006-09-111-4/+100
|
* Taken from Linux's md5.c. This implementation is not veryMichael Brown2006-09-111-0/+222
size-efficient, and will probably be rewritten. The md5.c from MatrixSSL is too ugly to consider importing.