testcrypt.h 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327
  1. /*
  2. * mpint.h functions.
  3. */
  4. FUNC1(val_mpint, mp_new, uint)
  5. FUNC1(void, mp_clear, val_mpint)
  6. FUNC1(val_mpint, mp_from_bytes_le, val_string_ptrlen)
  7. FUNC1(val_mpint, mp_from_bytes_be, val_string_ptrlen)
  8. FUNC1(val_mpint, mp_from_integer, uint)
  9. FUNC1(val_mpint, mp_from_decimal_pl, val_string_ptrlen)
  10. FUNC1(val_mpint, mp_from_decimal, val_string_asciz)
  11. FUNC1(val_mpint, mp_from_hex_pl, val_string_ptrlen)
  12. FUNC1(val_mpint, mp_from_hex, val_string_asciz)
  13. FUNC1(val_mpint, mp_copy, val_mpint)
  14. FUNC1(val_mpint, mp_power_2, uint)
  15. FUNC2(uint, mp_get_byte, val_mpint, uint)
  16. FUNC2(uint, mp_get_bit, val_mpint, uint)
  17. FUNC3(void, mp_set_bit, val_mpint, uint, uint)
  18. FUNC1(uint, mp_max_bytes, val_mpint)
  19. FUNC1(uint, mp_max_bits, val_mpint)
  20. FUNC1(uint, mp_get_nbits, val_mpint)
  21. FUNC1(val_string_asciz, mp_get_decimal, val_mpint)
  22. FUNC1(val_string_asciz, mp_get_hex, val_mpint)
  23. FUNC1(val_string_asciz, mp_get_hex_uppercase, val_mpint)
  24. FUNC2(uint, mp_cmp_hs, val_mpint, val_mpint)
  25. FUNC2(uint, mp_cmp_eq, val_mpint, val_mpint)
  26. FUNC2(uint, mp_hs_integer, val_mpint, uint)
  27. FUNC2(uint, mp_eq_integer, val_mpint, uint)
  28. FUNC3(void, mp_min_into, val_mpint, val_mpint, val_mpint)
  29. FUNC3(void, mp_max_into, val_mpint, val_mpint, val_mpint)
  30. FUNC2(val_mpint, mp_min, val_mpint, val_mpint)
  31. FUNC2(val_mpint, mp_max, val_mpint, val_mpint)
  32. FUNC2(void, mp_copy_into, val_mpint, val_mpint)
  33. FUNC4(void, mp_select_into, val_mpint, val_mpint, val_mpint, uint)
  34. FUNC3(void, mp_add_into, val_mpint, val_mpint, val_mpint)
  35. FUNC3(void, mp_sub_into, val_mpint, val_mpint, val_mpint)
  36. FUNC3(void, mp_mul_into, val_mpint, val_mpint, val_mpint)
  37. FUNC2(val_mpint, mp_add, val_mpint, val_mpint)
  38. FUNC2(val_mpint, mp_sub, val_mpint, val_mpint)
  39. FUNC2(val_mpint, mp_mul, val_mpint, val_mpint)
  40. FUNC3(void, mp_and_into, val_mpint, val_mpint, val_mpint)
  41. FUNC3(void, mp_or_into, val_mpint, val_mpint, val_mpint)
  42. FUNC3(void, mp_xor_into, val_mpint, val_mpint, val_mpint)
  43. FUNC3(void, mp_bic_into, val_mpint, val_mpint, val_mpint)
  44. FUNC2(void, mp_copy_integer_into, val_mpint, uint)
  45. FUNC3(void, mp_add_integer_into, val_mpint, val_mpint, uint)
  46. FUNC3(void, mp_sub_integer_into, val_mpint, val_mpint, uint)
  47. FUNC3(void, mp_mul_integer_into, val_mpint, val_mpint, uint)
  48. FUNC4(void, mp_cond_add_into, val_mpint, val_mpint, val_mpint, uint)
  49. FUNC4(void, mp_cond_sub_into, val_mpint, val_mpint, val_mpint, uint)
  50. FUNC3(void, mp_cond_swap, val_mpint, val_mpint, uint)
  51. FUNC2(void, mp_cond_clear, val_mpint, uint)
  52. FUNC4(void, mp_divmod_into, val_mpint, val_mpint, opt_val_mpint, opt_val_mpint)
  53. FUNC2(val_mpint, mp_div, val_mpint, val_mpint)
  54. FUNC2(val_mpint, mp_mod, val_mpint, val_mpint)
  55. FUNC3(val_mpint, mp_nthroot, val_mpint, uint, opt_val_mpint)
  56. FUNC2(void, mp_reduce_mod_2to, val_mpint, uint)
  57. FUNC2(val_mpint, mp_invert_mod_2to, val_mpint, uint)
  58. FUNC2(val_mpint, mp_invert, val_mpint, val_mpint)
  59. FUNC5(void, mp_gcd_into, val_mpint, val_mpint, opt_val_mpint, opt_val_mpint, opt_val_mpint)
  60. FUNC2(val_mpint, mp_gcd, val_mpint, val_mpint)
  61. FUNC2(uint, mp_coprime, val_mpint, val_mpint)
  62. FUNC2(val_modsqrt, modsqrt_new, val_mpint, val_mpint)
  63. /* The modsqrt functions' 'success' pointer becomes a second return value */
  64. FUNC3(val_mpint, mp_modsqrt, val_modsqrt, val_mpint, out_uint)
  65. FUNC1(val_monty, monty_new, val_mpint)
  66. FUNC1(val_mpint, monty_modulus, val_monty)
  67. FUNC1(val_mpint, monty_identity, val_monty)
  68. FUNC3(void, monty_import_into, val_monty, val_mpint, val_mpint)
  69. FUNC2(val_mpint, monty_import, val_monty, val_mpint)
  70. FUNC3(void, monty_export_into, val_monty, val_mpint, val_mpint)
  71. FUNC2(val_mpint, monty_export, val_monty, val_mpint)
  72. FUNC4(void, monty_mul_into, val_monty, val_mpint, val_mpint, val_mpint)
  73. FUNC3(val_mpint, monty_add, val_monty, val_mpint, val_mpint)
  74. FUNC3(val_mpint, monty_sub, val_monty, val_mpint, val_mpint)
  75. FUNC3(val_mpint, monty_mul, val_monty, val_mpint, val_mpint)
  76. FUNC3(val_mpint, monty_pow, val_monty, val_mpint, val_mpint)
  77. FUNC2(val_mpint, monty_invert, val_monty, val_mpint)
  78. FUNC3(val_mpint, monty_modsqrt, val_modsqrt, val_mpint, out_uint)
  79. FUNC3(val_mpint, mp_modpow, val_mpint, val_mpint, val_mpint)
  80. FUNC3(val_mpint, mp_modmul, val_mpint, val_mpint, val_mpint)
  81. FUNC3(val_mpint, mp_modadd, val_mpint, val_mpint, val_mpint)
  82. FUNC3(val_mpint, mp_modsub, val_mpint, val_mpint, val_mpint)
  83. FUNC3(void, mp_lshift_safe_into, val_mpint, val_mpint, uint)
  84. FUNC3(void, mp_rshift_safe_into, val_mpint, val_mpint, uint)
  85. FUNC2(val_mpint, mp_rshift_safe, val_mpint, uint)
  86. FUNC3(void, mp_lshift_fixed_into, val_mpint, val_mpint, uint)
  87. FUNC3(void, mp_rshift_fixed_into, val_mpint, val_mpint, uint)
  88. FUNC2(val_mpint, mp_rshift_fixed, val_mpint, uint)
  89. FUNC1(val_mpint, mp_random_bits, uint)
  90. FUNC2(val_mpint, mp_random_in_range, val_mpint, val_mpint)
  91. /*
  92. * ecc.h functions.
  93. */
  94. FUNC4(val_wcurve, ecc_weierstrass_curve, val_mpint, val_mpint, val_mpint, opt_val_mpint)
  95. FUNC1(val_wpoint, ecc_weierstrass_point_new_identity, val_wcurve)
  96. FUNC3(val_wpoint, ecc_weierstrass_point_new, val_wcurve, val_mpint, val_mpint)
  97. FUNC3(val_wpoint, ecc_weierstrass_point_new_from_x, val_wcurve, val_mpint, uint)
  98. FUNC1(val_wpoint, ecc_weierstrass_point_copy, val_wpoint)
  99. FUNC1(uint, ecc_weierstrass_point_valid, val_wpoint)
  100. FUNC2(val_wpoint, ecc_weierstrass_add_general, val_wpoint, val_wpoint)
  101. FUNC2(val_wpoint, ecc_weierstrass_add, val_wpoint, val_wpoint)
  102. FUNC1(val_wpoint, ecc_weierstrass_double, val_wpoint)
  103. FUNC2(val_wpoint, ecc_weierstrass_multiply, val_wpoint, val_mpint)
  104. FUNC1(uint, ecc_weierstrass_is_identity, val_wpoint)
  105. /* The output pointers in get_affine all become extra output values */
  106. FUNC3(void, ecc_weierstrass_get_affine, val_wpoint, out_val_mpint, out_val_mpint)
  107. FUNC3(val_mcurve, ecc_montgomery_curve, val_mpint, val_mpint, val_mpint)
  108. FUNC2(val_mpoint, ecc_montgomery_point_new, val_mcurve, val_mpint)
  109. FUNC1(val_mpoint, ecc_montgomery_point_copy, val_mpoint)
  110. FUNC3(val_mpoint, ecc_montgomery_diff_add, val_mpoint, val_mpoint, val_mpoint)
  111. FUNC1(val_mpoint, ecc_montgomery_double, val_mpoint)
  112. FUNC2(val_mpoint, ecc_montgomery_multiply, val_mpoint, val_mpint)
  113. FUNC2(void, ecc_montgomery_get_affine, val_mpoint, out_val_mpint)
  114. FUNC1(boolean, ecc_montgomery_is_identity, val_mpoint)
  115. FUNC4(val_ecurve, ecc_edwards_curve, val_mpint, val_mpint, val_mpint, opt_val_mpint)
  116. FUNC3(val_epoint, ecc_edwards_point_new, val_ecurve, val_mpint, val_mpint)
  117. FUNC3(val_epoint, ecc_edwards_point_new_from_y, val_ecurve, val_mpint, uint)
  118. FUNC1(val_epoint, ecc_edwards_point_copy, val_epoint)
  119. FUNC2(val_epoint, ecc_edwards_add, val_epoint, val_epoint)
  120. FUNC2(val_epoint, ecc_edwards_multiply, val_epoint, val_mpint)
  121. FUNC2(uint, ecc_edwards_eq, val_epoint, val_epoint)
  122. FUNC3(void, ecc_edwards_get_affine, val_epoint, out_val_mpint, out_val_mpint)
  123. /*
  124. * The ssh_hash abstraction. Note the 'consumed', indicating that
  125. * ssh_hash_final puts its input ssh_hash beyond use.
  126. *
  127. * ssh_hash_update is an invention of testcrypt, handled in the real C
  128. * API by the hash object also functioning as a BinarySink.
  129. */
  130. FUNC1(opt_val_hash, ssh_hash_new, hashalg)
  131. FUNC1(void, ssh_hash_reset, val_hash)
  132. FUNC1(val_hash, ssh_hash_copy, val_hash)
  133. FUNC1(val_string, ssh_hash_digest, val_hash)
  134. FUNC1(val_string, ssh_hash_final, consumed_val_hash)
  135. FUNC2(void, ssh_hash_update, val_hash, val_string_ptrlen)
  136. FUNC1(opt_val_hash, blake2b_new_general, uint)
  137. /*
  138. * The ssh2_mac abstraction. Note the optional ssh_cipher parameter
  139. * to ssh2_mac_new. Also, again, I've invented an ssh2_mac_update so
  140. * you can put data into the MAC.
  141. */
  142. FUNC2(val_mac, ssh2_mac_new, macalg, opt_val_cipher)
  143. FUNC2(void, ssh2_mac_setkey, val_mac, val_string_ptrlen)
  144. FUNC1(void, ssh2_mac_start, val_mac)
  145. FUNC2(void, ssh2_mac_update, val_mac, val_string_ptrlen)
  146. FUNC1(val_string, ssh2_mac_genresult, val_mac)
  147. FUNC1(val_string_asciz_const, ssh2_mac_text_name, val_mac)
  148. /*
  149. * The ssh_key abstraction. All the uses of BinarySink and
  150. * BinarySource in parameters are replaced with ordinary strings for
  151. * the testing API: new_priv_openssh just takes a string input, and
  152. * all the functions that output key and signature blobs do it by
  153. * returning a string.
  154. */
  155. FUNC2(val_key, ssh_key_new_pub, keyalg, val_string_ptrlen)
  156. FUNC3(opt_val_key, ssh_key_new_priv, keyalg, val_string_ptrlen, val_string_ptrlen)
  157. FUNC2(opt_val_key, ssh_key_new_priv_openssh, keyalg, val_string_binarysource)
  158. FUNC2(opt_val_string_asciz, ssh_key_invalid, val_key, uint)
  159. FUNC4(void, ssh_key_sign, val_key, val_string_ptrlen, uint, out_val_string_binarysink)
  160. FUNC3(boolean, ssh_key_verify, val_key, val_string_ptrlen, val_string_ptrlen)
  161. FUNC2(void, ssh_key_public_blob, val_key, out_val_string_binarysink)
  162. FUNC2(void, ssh_key_private_blob, val_key, out_val_string_binarysink)
  163. FUNC2(void, ssh_key_openssh_blob, val_key, out_val_string_binarysink)
  164. FUNC1(val_string_asciz, ssh_key_cache_str, val_key)
  165. FUNC1(val_keycomponents, ssh_key_components, val_key)
  166. FUNC2(uint, ssh_key_public_bits, keyalg, val_string_ptrlen)
  167. /*
  168. * Accessors to retrieve the innards of a 'key_components'.
  169. */
  170. FUNC1(uint, key_components_count, val_keycomponents)
  171. FUNC2(opt_val_string_asciz_const, key_components_nth_name, val_keycomponents, uint)
  172. FUNC2(opt_val_string_asciz_const, key_components_nth_str, val_keycomponents, uint)
  173. FUNC2(opt_val_mpint, key_components_nth_mp, val_keycomponents, uint)
  174. /*
  175. * The ssh_cipher abstraction. The in-place encrypt and decrypt
  176. * functions are wrapped to replace them with versions that take one
  177. * string and return a separate string.
  178. */
  179. FUNC1(opt_val_cipher, ssh_cipher_new, cipheralg)
  180. FUNC2(void, ssh_cipher_setiv, val_cipher, val_string_ptrlen)
  181. FUNC2(void, ssh_cipher_setkey, val_cipher, val_string_ptrlen)
  182. FUNC2(val_string, ssh_cipher_encrypt, val_cipher, val_string_ptrlen)
  183. FUNC2(val_string, ssh_cipher_decrypt, val_cipher, val_string_ptrlen)
  184. FUNC3(val_string, ssh_cipher_encrypt_length, val_cipher, val_string_ptrlen, uint)
  185. FUNC3(val_string, ssh_cipher_decrypt_length, val_cipher, val_string_ptrlen, uint)
  186. /*
  187. * Integer Diffie-Hellman.
  188. */
  189. FUNC1(val_dh, dh_setup_group, dh_group)
  190. FUNC2(val_dh, dh_setup_gex, val_mpint, val_mpint)
  191. FUNC1(uint, dh_modulus_bit_size, val_dh)
  192. FUNC2(val_mpint, dh_create_e, val_dh, uint)
  193. FUNC2(boolean, dh_validate_f, val_dh, val_mpint)
  194. FUNC2(val_mpint, dh_find_K, val_dh, val_mpint)
  195. /*
  196. * Elliptic-curve Diffie-Hellman.
  197. */
  198. FUNC1(val_ecdh, ssh_ecdhkex_newkey, ecdh_alg)
  199. FUNC2(void, ssh_ecdhkex_getpublic, val_ecdh, out_val_string_binarysink)
  200. FUNC2(opt_val_mpint, ssh_ecdhkex_getkey, val_ecdh, val_string_ptrlen)
  201. /*
  202. * RSA key exchange, and also the BinarySource get function
  203. * get_ssh1_rsa_priv_agent, which is a convenient way to make an
  204. * RSAKey for RSA kex testing purposes.
  205. */
  206. FUNC1(val_rsakex, ssh_rsakex_newkey, val_string_ptrlen)
  207. FUNC1(uint, ssh_rsakex_klen, val_rsakex)
  208. FUNC3(val_string, ssh_rsakex_encrypt, val_rsakex, hashalg, val_string_ptrlen)
  209. FUNC3(opt_val_mpint, ssh_rsakex_decrypt, val_rsakex, hashalg, val_string_ptrlen)
  210. FUNC1(val_rsakex, get_rsa_ssh1_priv_agent, val_string_binarysource)
  211. /*
  212. * Bare RSA keys as used in SSH-1. The construction API functions
  213. * write into an existing RSAKey object, so I've invented an 'rsa_new'
  214. * function to make one in the first place.
  215. */
  216. FUNC0(val_rsa, rsa_new)
  217. FUNC3(void, get_rsa_ssh1_pub, val_string_binarysource, val_rsa, rsaorder)
  218. FUNC2(void, get_rsa_ssh1_priv, val_string_binarysource, val_rsa)
  219. FUNC2(opt_val_string, rsa_ssh1_encrypt, val_string_ptrlen, val_rsa)
  220. FUNC2(val_mpint, rsa_ssh1_decrypt, val_mpint, val_rsa)
  221. FUNC2(val_string, rsa_ssh1_decrypt_pkcs1, val_mpint, val_rsa)
  222. FUNC1(val_string_asciz, rsastr_fmt, val_rsa)
  223. FUNC1(val_string_asciz, rsa_ssh1_fingerprint, val_rsa)
  224. FUNC3(void, rsa_ssh1_public_blob, out_val_string_binarysink, val_rsa, rsaorder)
  225. FUNC1(int, rsa_ssh1_public_blob_len, val_string_ptrlen)
  226. FUNC2(void, rsa_ssh1_private_blob_agent, out_val_string_binarysink, val_rsa)
  227. /*
  228. * The PRNG type. Similarly to hashes and MACs, I've invented an extra
  229. * function prng_seed_update for putting seed data into the PRNG's
  230. * exposed BinarySink.
  231. */
  232. FUNC1(val_prng, prng_new, hashalg)
  233. FUNC1(void, prng_seed_begin, val_prng)
  234. FUNC2(void, prng_seed_update, val_prng, val_string_ptrlen)
  235. FUNC1(void, prng_seed_finish, val_prng)
  236. FUNC2(val_string, prng_read, val_prng, uint)
  237. FUNC3(void, prng_add_entropy, val_prng, uint, val_string_ptrlen)
  238. /*
  239. * Key load/save functions, or rather, the BinarySource / strbuf API
  240. * that sits just inside the file I/O versions.
  241. */
  242. FUNC2(boolean, ppk_encrypted_s, val_string_binarysource, out_opt_val_string_asciz)
  243. FUNC2(boolean, rsa1_encrypted_s, val_string_binarysource, out_opt_val_string_asciz)
  244. FUNC5(boolean, ppk_loadpub_s, val_string_binarysource, out_opt_val_string_asciz, out_val_string_binarysink, out_opt_val_string_asciz, out_opt_val_string_asciz_const)
  245. FUNC4(int, rsa1_loadpub_s, val_string_binarysource, out_val_string_binarysink, out_opt_val_string_asciz, out_opt_val_string_asciz_const)
  246. FUNC4(opt_val_key, ppk_load_s, val_string_binarysource, out_opt_val_string_asciz, opt_val_string_asciz, out_opt_val_string_asciz_const)
  247. FUNC5(int, rsa1_load_s, val_string_binarysource, val_rsa, out_opt_val_string_asciz, opt_val_string_asciz, out_opt_val_string_asciz_const)
  248. FUNC8(val_string, ppk_save_sb, val_key, opt_val_string_asciz, opt_val_string_asciz, uint, argon2flavour, uint, uint, uint)
  249. FUNC3(val_string, rsa1_save_sb, val_rsa, opt_val_string_asciz, opt_val_string_asciz)
  250. FUNC2(val_string_asciz, ssh2_fingerprint_blob, val_string_ptrlen, fptype)
  251. /*
  252. * Password hashing.
  253. */
  254. FUNC9(val_string, argon2, argon2flavour, uint, uint, uint, uint, val_string_ptrlen, val_string_ptrlen, val_string_ptrlen, val_string_ptrlen)
  255. FUNC2(val_string, argon2_long_hash, uint, val_string_ptrlen)
  256. /*
  257. * Key generation functions.
  258. */
  259. FUNC3(val_key, rsa_generate, uint, boolean, val_pgc)
  260. FUNC2(val_key, dsa_generate, uint, val_pgc)
  261. FUNC1(opt_val_key, ecdsa_generate, uint)
  262. FUNC1(opt_val_key, eddsa_generate, uint)
  263. FUNC3(val_rsa, rsa1_generate, uint, boolean, val_pgc)
  264. FUNC1(val_pgc, primegen_new_context, primegenpolicy)
  265. FUNC2(opt_val_mpint, primegen_generate, val_pgc, consumed_val_pcs)
  266. FUNC2(val_string, primegen_mpu_certificate, val_pgc, val_mpint)
  267. FUNC1(val_pcs, pcs_new, uint)
  268. FUNC3(val_pcs, pcs_new_with_firstbits, uint, uint, uint)
  269. FUNC3(void, pcs_require_residue, val_pcs, val_mpint, val_mpint)
  270. FUNC2(void, pcs_require_residue_1, val_pcs, val_mpint)
  271. FUNC2(void, pcs_require_residue_1_mod_prime, val_pcs, val_mpint)
  272. FUNC3(void, pcs_avoid_residue_small, val_pcs, uint, uint)
  273. FUNC1(void, pcs_try_sophie_germain, val_pcs)
  274. FUNC1(void, pcs_set_oneshot, val_pcs)
  275. FUNC1(void, pcs_ready, val_pcs)
  276. FUNC4(void, pcs_inspect, val_pcs, out_val_mpint, out_val_mpint, out_val_mpint)
  277. FUNC1(val_mpint, pcs_generate, val_pcs)
  278. FUNC0(val_pockle, pockle_new)
  279. FUNC1(uint, pockle_mark, val_pockle)
  280. FUNC2(void, pockle_release, val_pockle, uint)
  281. FUNC2(pocklestatus, pockle_add_small_prime, val_pockle, val_mpint)
  282. FUNC4(pocklestatus, pockle_add_prime, val_pockle, val_mpint, mpint_list, val_mpint)
  283. FUNC2(val_string, pockle_mpu, val_pockle, val_mpint)
  284. /*
  285. * Miscellaneous.
  286. */
  287. FUNC2(val_wpoint, ecdsa_public, val_mpint, keyalg)
  288. FUNC2(val_epoint, eddsa_public, val_mpint, keyalg)
  289. FUNC2(val_string, des_encrypt_xdmauth, val_string_ptrlen, val_string_ptrlen)
  290. FUNC2(val_string, des_decrypt_xdmauth, val_string_ptrlen, val_string_ptrlen)
  291. FUNC2(val_string, des3_encrypt_pubkey, val_string_ptrlen, val_string_ptrlen)
  292. FUNC2(val_string, des3_decrypt_pubkey, val_string_ptrlen, val_string_ptrlen)
  293. FUNC3(val_string, des3_encrypt_pubkey_ossh, val_string_ptrlen, val_string_ptrlen, val_string_ptrlen)
  294. FUNC3(val_string, des3_decrypt_pubkey_ossh, val_string_ptrlen, val_string_ptrlen, val_string_ptrlen)
  295. FUNC3(val_string, aes256_encrypt_pubkey, val_string_ptrlen, val_string_ptrlen, val_string_ptrlen)
  296. FUNC3(val_string, aes256_decrypt_pubkey, val_string_ptrlen, val_string_ptrlen, val_string_ptrlen)
  297. FUNC1(uint, crc32_rfc1662, val_string_ptrlen)
  298. FUNC1(uint, crc32_ssh1, val_string_ptrlen)
  299. FUNC2(uint, crc32_update, uint, val_string_ptrlen)
  300. FUNC2(boolean, crcda_detect, val_string_ptrlen, val_string_ptrlen)
  301. /*
  302. * These functions aren't part of PuTTY's own API, but are additions
  303. * by testcrypt itself for administrative purposes.
  304. */
  305. FUNC1(void, random_queue, val_string_ptrlen)
  306. FUNC0(uint, random_queue_len)
  307. FUNC2(void, random_make_prng, hashalg, val_string_ptrlen)
  308. FUNC0(void, random_clear)