testcrypt-enum.h 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  1. BEGIN_ENUM_TYPE(hashalg)
  2. ENUM_VALUE("md5", &ssh_md5)
  3. ENUM_VALUE("sha1", &ssh_sha1)
  4. ENUM_VALUE("sha1_sw", &ssh_sha1_sw)
  5. ENUM_VALUE("sha256", &ssh_sha256)
  6. ENUM_VALUE("sha384", &ssh_sha384)
  7. ENUM_VALUE("sha512", &ssh_sha512)
  8. ENUM_VALUE("sha256_sw", &ssh_sha256_sw)
  9. ENUM_VALUE("sha384_sw", &ssh_sha384_sw)
  10. ENUM_VALUE("sha512_sw", &ssh_sha512_sw)
  11. #if HAVE_SHA_NI
  12. ENUM_VALUE("sha1_ni", &ssh_sha1_ni)
  13. ENUM_VALUE("sha256_ni", &ssh_sha256_ni)
  14. #endif
  15. #if HAVE_NEON_CRYPTO
  16. ENUM_VALUE("sha1_neon", &ssh_sha1_neon)
  17. ENUM_VALUE("sha256_neon", &ssh_sha256_neon)
  18. #endif
  19. #if HAVE_NEON_SHA512
  20. ENUM_VALUE("sha384_neon", &ssh_sha384_neon)
  21. ENUM_VALUE("sha512_neon", &ssh_sha512_neon)
  22. #endif
  23. ENUM_VALUE("sha3_224", &ssh_sha3_224)
  24. ENUM_VALUE("sha3_256", &ssh_sha3_256)
  25. ENUM_VALUE("sha3_384", &ssh_sha3_384)
  26. ENUM_VALUE("sha3_512", &ssh_sha3_512)
  27. ENUM_VALUE("shake256_114bytes", &ssh_shake256_114bytes)
  28. ENUM_VALUE("blake2b", &ssh_blake2b)
  29. END_ENUM_TYPE(hashalg)
  30. BEGIN_ENUM_TYPE(macalg)
  31. ENUM_VALUE("hmac_md5", &ssh_hmac_md5)
  32. ENUM_VALUE("hmac_sha1", &ssh_hmac_sha1)
  33. ENUM_VALUE("hmac_sha1_buggy", &ssh_hmac_sha1_buggy)
  34. ENUM_VALUE("hmac_sha1_96", &ssh_hmac_sha1_96)
  35. ENUM_VALUE("hmac_sha1_96_buggy", &ssh_hmac_sha1_96_buggy)
  36. ENUM_VALUE("hmac_sha256", &ssh_hmac_sha256)
  37. ENUM_VALUE("hmac_sha512", &ssh_hmac_sha512)
  38. ENUM_VALUE("poly1305", &ssh2_poly1305)
  39. ENUM_VALUE("aesgcm", &ssh2_aesgcm_mac)
  40. ENUM_VALUE("aesgcm", &ssh2_aesgcm_mac)
  41. ENUM_VALUE("aesgcm_sw", &ssh2_aesgcm_mac_sw)
  42. ENUM_VALUE("aesgcm_ref_poly", &ssh2_aesgcm_mac_ref_poly)
  43. #if HAVE_CLMUL
  44. ENUM_VALUE("aesgcm_clmul", &ssh2_aesgcm_mac_clmul)
  45. #endif
  46. #if HAVE_NEON_PMULL
  47. ENUM_VALUE("aesgcm_neon", &ssh2_aesgcm_mac_neon)
  48. #endif
  49. END_ENUM_TYPE(macalg)
  50. BEGIN_ENUM_TYPE(keyalg)
  51. ENUM_VALUE("dsa", &ssh_dsa)
  52. ENUM_VALUE("rsa", &ssh_rsa)
  53. ENUM_VALUE("ed25519", &ssh_ecdsa_ed25519)
  54. ENUM_VALUE("ed448", &ssh_ecdsa_ed448)
  55. ENUM_VALUE("p256", &ssh_ecdsa_nistp256)
  56. ENUM_VALUE("p384", &ssh_ecdsa_nistp384)
  57. ENUM_VALUE("p521", &ssh_ecdsa_nistp521)
  58. ENUM_VALUE("dsa-cert", &opensshcert_ssh_dsa)
  59. ENUM_VALUE("rsa-cert", &opensshcert_ssh_rsa)
  60. ENUM_VALUE("ed25519-cert", &opensshcert_ssh_ecdsa_ed25519)
  61. ENUM_VALUE("p256-cert", &opensshcert_ssh_ecdsa_nistp256)
  62. ENUM_VALUE("p384-cert", &opensshcert_ssh_ecdsa_nistp384)
  63. ENUM_VALUE("p521-cert", &opensshcert_ssh_ecdsa_nistp521)
  64. END_ENUM_TYPE(keyalg)
  65. BEGIN_ENUM_TYPE(cipheralg)
  66. ENUM_VALUE("3des_ctr", &ssh_3des_ssh2_ctr)
  67. ENUM_VALUE("3des_ssh2", &ssh_3des_ssh2)
  68. ENUM_VALUE("3des_ssh1", &ssh_3des_ssh1)
  69. ENUM_VALUE("des_cbc", &ssh_des)
  70. ENUM_VALUE("aes256_ctr", &ssh_aes256_sdctr)
  71. ENUM_VALUE("aes256_gcm", &ssh_aes256_gcm)
  72. ENUM_VALUE("aes256_cbc", &ssh_aes256_cbc)
  73. ENUM_VALUE("aes192_ctr", &ssh_aes192_sdctr)
  74. ENUM_VALUE("aes192_gcm", &ssh_aes192_gcm)
  75. ENUM_VALUE("aes192_cbc", &ssh_aes192_cbc)
  76. ENUM_VALUE("aes128_ctr", &ssh_aes128_sdctr)
  77. ENUM_VALUE("aes128_gcm", &ssh_aes128_gcm)
  78. ENUM_VALUE("aes128_cbc", &ssh_aes128_cbc)
  79. ENUM_VALUE("aes256_ctr_sw", &ssh_aes256_sdctr_sw)
  80. ENUM_VALUE("aes256_gcm_sw", &ssh_aes256_gcm_sw)
  81. ENUM_VALUE("aes256_cbc_sw", &ssh_aes256_cbc_sw)
  82. ENUM_VALUE("aes192_ctr_sw", &ssh_aes192_sdctr_sw)
  83. ENUM_VALUE("aes192_gcm_sw", &ssh_aes192_gcm_sw)
  84. ENUM_VALUE("aes192_cbc_sw", &ssh_aes192_cbc_sw)
  85. ENUM_VALUE("aes128_ctr_sw", &ssh_aes128_sdctr_sw)
  86. ENUM_VALUE("aes128_gcm_sw", &ssh_aes128_gcm_sw)
  87. ENUM_VALUE("aes128_cbc_sw", &ssh_aes128_cbc_sw)
  88. #if HAVE_AES_NI
  89. ENUM_VALUE("aes256_ctr_ni", &ssh_aes256_sdctr_ni)
  90. ENUM_VALUE("aes256_gcm_ni", &ssh_aes256_gcm_ni)
  91. ENUM_VALUE("aes256_cbc_ni", &ssh_aes256_cbc_ni)
  92. ENUM_VALUE("aes192_ctr_ni", &ssh_aes192_sdctr_ni)
  93. ENUM_VALUE("aes192_gcm_ni", &ssh_aes192_gcm_ni)
  94. ENUM_VALUE("aes192_cbc_ni", &ssh_aes192_cbc_ni)
  95. ENUM_VALUE("aes128_ctr_ni", &ssh_aes128_sdctr_ni)
  96. ENUM_VALUE("aes128_gcm_ni", &ssh_aes128_gcm_ni)
  97. ENUM_VALUE("aes128_cbc_ni", &ssh_aes128_cbc_ni)
  98. #endif
  99. #if HAVE_NEON_CRYPTO
  100. ENUM_VALUE("aes256_ctr_neon", &ssh_aes256_sdctr_neon)
  101. ENUM_VALUE("aes256_gcm_neon", &ssh_aes256_gcm_neon)
  102. ENUM_VALUE("aes256_cbc_neon", &ssh_aes256_cbc_neon)
  103. ENUM_VALUE("aes192_ctr_neon", &ssh_aes192_sdctr_neon)
  104. ENUM_VALUE("aes192_gcm_neon", &ssh_aes192_gcm_neon)
  105. ENUM_VALUE("aes192_cbc_neon", &ssh_aes192_cbc_neon)
  106. ENUM_VALUE("aes128_ctr_neon", &ssh_aes128_sdctr_neon)
  107. ENUM_VALUE("aes128_gcm_neon", &ssh_aes128_gcm_neon)
  108. ENUM_VALUE("aes128_cbc_neon", &ssh_aes128_cbc_neon)
  109. #endif
  110. ENUM_VALUE("blowfish_ctr", &ssh_blowfish_ssh2_ctr)
  111. ENUM_VALUE("blowfish_ssh2", &ssh_blowfish_ssh2)
  112. ENUM_VALUE("blowfish_ssh1", &ssh_blowfish_ssh1)
  113. ENUM_VALUE("arcfour256", &ssh_arcfour256_ssh2)
  114. ENUM_VALUE("arcfour128", &ssh_arcfour128_ssh2)
  115. ENUM_VALUE("chacha20_poly1305", &ssh2_chacha20_poly1305)
  116. END_ENUM_TYPE(cipheralg)
  117. BEGIN_ENUM_TYPE(dh_group)
  118. ENUM_VALUE("group1", &ssh_diffiehellman_group1_sha1)
  119. ENUM_VALUE("group14", &ssh_diffiehellman_group14_sha256)
  120. ENUM_VALUE("group15", &ssh_diffiehellman_group15_sha512)
  121. ENUM_VALUE("group16", &ssh_diffiehellman_group16_sha512)
  122. ENUM_VALUE("group17", &ssh_diffiehellman_group17_sha512)
  123. ENUM_VALUE("group18", &ssh_diffiehellman_group18_sha512)
  124. END_ENUM_TYPE(dh_group)
  125. BEGIN_ENUM_TYPE(ecdh_alg)
  126. ENUM_VALUE("curve25519", &ssh_ec_kex_curve25519)
  127. ENUM_VALUE("curve448", &ssh_ec_kex_curve448)
  128. ENUM_VALUE("nistp256", &ssh_ec_kex_nistp256)
  129. ENUM_VALUE("nistp384", &ssh_ec_kex_nistp384)
  130. ENUM_VALUE("nistp521", &ssh_ec_kex_nistp521)
  131. END_ENUM_TYPE(ecdh_alg)
  132. BEGIN_ENUM_TYPE(rsaorder)
  133. ENUM_VALUE("exponent_first", RSA_SSH1_EXPONENT_FIRST)
  134. ENUM_VALUE("modulus_first", RSA_SSH1_MODULUS_FIRST)
  135. END_ENUM_TYPE(rsaorder)
  136. BEGIN_ENUM_TYPE(primegenpolicy)
  137. ENUM_VALUE("probabilistic", &primegen_probabilistic)
  138. ENUM_VALUE("provable_fast", &primegen_provable_fast)
  139. ENUM_VALUE("provable_maurer_simple", &primegen_provable_maurer_simple)
  140. ENUM_VALUE("provable_maurer_complex", &primegen_provable_maurer_complex)
  141. END_ENUM_TYPE(primegenpolicy)
  142. BEGIN_ENUM_TYPE(argon2flavour)
  143. ENUM_VALUE("d", Argon2d)
  144. ENUM_VALUE("i", Argon2i)
  145. ENUM_VALUE("id", Argon2id)
  146. /* I expect to forget which spelling I chose, so let's support many */
  147. ENUM_VALUE("argon2d", Argon2d)
  148. ENUM_VALUE("argon2i", Argon2i)
  149. ENUM_VALUE("argon2id", Argon2id)
  150. ENUM_VALUE("Argon2d", Argon2d)
  151. ENUM_VALUE("Argon2i", Argon2i)
  152. ENUM_VALUE("Argon2id", Argon2id)
  153. END_ENUM_TYPE(argon2flavour)
  154. BEGIN_ENUM_TYPE(fptype)
  155. ENUM_VALUE("md5", SSH_FPTYPE_MD5)
  156. ENUM_VALUE("sha256", SSH_FPTYPE_SHA256)
  157. ENUM_VALUE("md5-cert", SSH_FPTYPE_MD5_CERT)
  158. ENUM_VALUE("sha256-cert", SSH_FPTYPE_SHA256_CERT)
  159. END_ENUM_TYPE(fptype)
  160. /*
  161. * cproxy.h already has a list macro mapping protocol-specified
  162. * strings to the list of HTTP Digest hash functions. Rather than
  163. * invent a separate one for testcrypt, reuse the existing names.
  164. */
  165. BEGIN_ENUM_TYPE(httpdigesthash)
  166. #define DECL_ARRAY(id, str, alg, bits, accepted) ENUM_VALUE(str, id)
  167. HTTP_DIGEST_HASHES(DECL_ARRAY)
  168. #undef DECL_ARRAY
  169. END_ENUM_TYPE(httpdigesthash)