Reference implementations of PQC
Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.
 
 
 
 

74 Zeilen
3.2 KiB

  1. # This Makefile can be used with Microsoft Visual Studio's nmake using the command:
  2. # nmake /f Makefile.Microsoft_nmake
  3. # override as desired, use /E
  4. # vim: set ts=4 sw=4 et:
  5. TYPE=kem
  6. SCHEME=kyber768
  7. SCHEME_UPPERCASE=KYBER768
  8. IMPLEMENTATION=clean
  9. IMPLEMENTATION_UPPERCASE=CLEAN
  10. SCHEME_DIR=..\crypto_$(TYPE)\$(SCHEME)\$(IMPLEMENTATION)
  11. TEST_COMMON_DIR=..\test\common
  12. COMMON_DIR=..\common
  13. COMMON_OBJECTS=$(COMMON_DIR)\aes.obj $(COMMON_DIR)\fips202.obj $(COMMON_DIR)\sha2.obj $(COMMON_DIR)\sp800-185.obj
  14. COMMON_OBJECTS_NOPATH=aes.obj fips202.obj sha2.obj sp800-185.obj
  15. DEST_DIR=..\bin
  16. CFLAGS=/nologo /I $(COMMON_DIR) /W4 /WX
  17. all: $(DEST_DIR)\functest_$(SCHEME)_$(IMPLEMENTATION).EXE $(DEST_DIR)\testvectors_$(SCHEME)_$(IMPLEMENTATION).EXE
  18. build-scheme:
  19. cd $(SCHEME_DIR)
  20. nmake /f Makefile.Microsoft_nmake
  21. cd ..\..\..\test
  22. clean-scheme:
  23. cd $(SCHEME_DIR)
  24. nmake /f Makefile.Microsoft_nmake clean
  25. cd ..\..\..\test
  26. functest: $(DEST_DIR)\functest_$(SCHEME)_$(IMPLEMENTATION).exe
  27. testvectors: $(DEST_DIR)\testvectors_$(SCHEME)_$(IMPLEMENTATION).exe
  28. printparams: $(DEST_DIR)\printparams_$(SCHEME)_$(IMPLEMENTATION).exe
  29. nistkat: $(DEST_DIR)\nistkat_$(SCHEME)_$(IMPLEMENTATION).exe
  30. $(DEST_DIR)\functest_$(SCHEME)_$(IMPLEMENTATION).exe: build-scheme $(COMMON_OBJECTS) $(COMMON_DIR)\randombytes.obj
  31. -MKDIR $(DEST_DIR)
  32. -DEL functest.obj
  33. $(CC) /c crypto_$(TYPE)\functest.c $(CFLAGS) /I $(SCHEME_DIR) /DPQCLEAN_NAMESPACE=PQCLEAN_$(SCHEME_UPPERCASE)_$(IMPLEMENTATION_UPPERCASE)
  34. LINK.EXE /STACK:8192000 /OUT:$@ functest.obj $(COMMON_OBJECTS_NOPATH) randombytes.obj $(SCHEME_DIR)\lib$(SCHEME)_$(IMPLEMENTATION).lib Advapi32.lib
  35. $(DEST_DIR)\testvectors_$(SCHEME)_$(IMPLEMENTATION).exe: build-scheme $(COMMON_OBJECTS) $(TEST_COMMON_DIR)\notrandombytes.obj
  36. -MKDIR $(DEST_DIR)
  37. -DEL testvectors.obj
  38. $(CC) /c crypto_$(TYPE)\testvectors.c $(CFLAGS) /I $(SCHEME_DIR) /DPQCLEAN_NAMESPACE=PQCLEAN_$(SCHEME_UPPERCASE)_$(IMPLEMENTATION_UPPERCASE)
  39. LINK.EXE /STACK:8192000 /OUT:$@ testvectors.obj $(COMMON_OBJECTS_NOPATH) notrandombytes.obj $(SCHEME_DIR)\lib$(SCHEME)_$(IMPLEMENTATION).lib
  40. $(DEST_DIR)\printparams_$(SCHEME)_$(IMPLEMENTATION).exe: crypto_$(TYPE)\printparams.c $(SCHEME_DIR)\api.h
  41. -MKDIR $(DEST_DIR)
  42. -DEL printparams.obj
  43. $(CC) /c crypto_$(TYPE)\printparams.c $(CFLAGS) /I $(SCHEME_DIR) /DPQCLEAN_NAMESPACE=PQCLEAN_$(SCHEME_UPPERCASE)_$(IMPLEMENTATION_UPPERCASE)
  44. LINK.EXE /OUT:$@ printparams.obj
  45. $(DEST_DIR)\nistkat_$(SCHEME)_$(IMPLEMENTATION).exe: build-scheme $(COMMON_OBJECTS) $(TEST_COMMON_DIR)\nistkatrng.obj
  46. -MKDIR $(DEST_DIR)
  47. -DEL nistkat.obj
  48. $(CC) /c crypto_$(TYPE)\nistkat.c $(CFLAGS) /I $(SCHEME_DIR) /DPQCLEAN_NAMESPACE=PQCLEAN_$(SCHEME_UPPERCASE)_$(IMPLEMENTATION_UPPERCASE)
  49. LINK.EXE /STACK:8192000 /OUT:$@ nistkat.obj $(COMMON_OBJECTS_NOPATH) nistkatrng.obj $(SCHEME_DIR)\lib$(SCHEME)_$(IMPLEMENTATION).lib
  50. clean:
  51. -DEL functest.obj testvectors.obj printparams.obj nistkat.obj
  52. -DEL $(COMMON_OBJECTS_NOPATH) randombytes.obj notrandombytes.obj
  53. -DEL $(DEST_DIR)\functest_$(SCHEME)_$(IMPLEMENTATION).exe
  54. -DEL $(DEST_DIR)\testvectors_$(SCHEME)_$(IMPLEMENTATION).exe
  55. -DEL $(DEST_DIR)\printparams_$(SCHEME)_$(IMPLEMENTATION).exe
  56. -DEL $(DEST_DIR)\nistkat_$(SCHEME)_$(IMPLEMENTATION).exe