Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 
 
 
 
 

90 lignes
1.4 KiB

  1. include_directories(../../include)
  2. if (${ARCH} STREQUAL "x86_64")
  3. set(
  4. BN_ARCH_SOURCES
  5. x86_64-mont.${ASM_EXT}
  6. x86_64-mont5.${ASM_EXT}
  7. rsaz-x86_64.${ASM_EXT}
  8. rsaz-avx2.${ASM_EXT}
  9. rsaz_exp.c
  10. )
  11. endif()
  12. if (${ARCH} STREQUAL "x86")
  13. set(
  14. BN_ARCH_SOURCES
  15. bn-586.${ASM_EXT}
  16. co-586.${ASM_EXT}
  17. x86-mont.${ASM_EXT}
  18. )
  19. endif()
  20. if (${ARCH} STREQUAL "arm")
  21. set(
  22. BN_ARCH_SOURCES
  23. armv4-mont.${ASM_EXT}
  24. )
  25. endif()
  26. if (${ARCH} STREQUAL "aarch64")
  27. set(
  28. BN_ARCH_SOURCES
  29. armv8-mont.${ASM_EXT}
  30. )
  31. endif()
  32. add_library(
  33. bn
  34. OBJECT
  35. add.c
  36. asm/x86_64-gcc.c
  37. bn.c
  38. bn_asn1.c
  39. cmp.c
  40. convert.c
  41. ctx.c
  42. div.c
  43. exponentiation.c
  44. generic.c
  45. gcd.c
  46. kronecker.c
  47. montgomery.c
  48. montgomery_inv.c
  49. mul.c
  50. prime.c
  51. random.c
  52. shift.c
  53. sqrt.c
  54. ${BN_ARCH_SOURCES}
  55. )
  56. perlasm(x86_64-mont.${ASM_EXT} asm/x86_64-mont.pl)
  57. perlasm(x86_64-mont5.${ASM_EXT} asm/x86_64-mont5.pl)
  58. perlasm(rsaz-x86_64.${ASM_EXT} asm/rsaz-x86_64.pl)
  59. perlasm(rsaz-avx2.${ASM_EXT} asm/rsaz-avx2.pl)
  60. perlasm(bn-586.${ASM_EXT} asm/bn-586.pl)
  61. perlasm(co-586.${ASM_EXT} asm/co-586.pl)
  62. perlasm(x86-mont.${ASM_EXT} asm/x86-mont.pl)
  63. perlasm(armv4-mont.${ASM_EXT} asm/armv4-mont.pl)
  64. perlasm(armv8-mont.${ASM_EXT} asm/armv8-mont.pl)
  65. add_executable(
  66. bn_test
  67. bn_test.cc
  68. $<TARGET_OBJECTS:test_support>
  69. )
  70. target_link_libraries(bn_test crypto)
  71. add_dependencies(all_tests bn_test)