mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-09 17:38:00 +00:00
testcrypt: adjust some function parameter names.
Now those names appear in help files, I thought it was worth giving them a read-through and spotting any really obviously confusing or wrong ones. Quite a few make more sense in the original context of C than in the derived Python (e.g. 'BinarySink *bs' as a place to write output to makes sense, but the output 'val_string bs' is less helpful). A couple were so confusing that I also corrected them in the original C, notably the misuse of 'wc' for the elliptic curve point input to ecc_weierstrass_point_copy. ('wc' in that section of the code is normally a parameter describing a whole curve.)
This commit is contained in:
parent
1cf04cf01d
commit
42120dd1c5
@ -63,7 +63,7 @@ WeierstrassPoint *ecc_weierstrass_point_new_from_x(
|
|||||||
/* Memory management: copy and free points. */
|
/* Memory management: copy and free points. */
|
||||||
void ecc_weierstrass_point_copy_into(
|
void ecc_weierstrass_point_copy_into(
|
||||||
WeierstrassPoint *dest, WeierstrassPoint *src);
|
WeierstrassPoint *dest, WeierstrassPoint *src);
|
||||||
WeierstrassPoint *ecc_weierstrass_point_copy(WeierstrassPoint *wc);
|
WeierstrassPoint *ecc_weierstrass_point_copy(WeierstrassPoint *orig);
|
||||||
void ecc_weierstrass_point_free(WeierstrassPoint *point);
|
void ecc_weierstrass_point_free(WeierstrassPoint *point);
|
||||||
|
|
||||||
/* Check whether a point is actually on the curve. */
|
/* Check whether a point is actually on the curve. */
|
||||||
@ -223,7 +223,7 @@ EdwardsPoint *ecc_edwards_point_new_from_y(
|
|||||||
|
|
||||||
/* Copy and free points. */
|
/* Copy and free points. */
|
||||||
void ecc_edwards_point_copy_into(EdwardsPoint *dest, EdwardsPoint *src);
|
void ecc_edwards_point_copy_into(EdwardsPoint *dest, EdwardsPoint *src);
|
||||||
EdwardsPoint *ecc_edwards_point_copy(EdwardsPoint *ec);
|
EdwardsPoint *ecc_edwards_point_copy(EdwardsPoint *orig);
|
||||||
void ecc_edwards_point_free(EdwardsPoint *point);
|
void ecc_edwards_point_free(EdwardsPoint *point);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
131
testcrypt.h
131
testcrypt.h
@ -96,9 +96,9 @@ FUNC(uint, mp_cmp_eq, (ARG(val_mpint, a), ARG(val_mpint, b)))
|
|||||||
FUNC(uint, mp_hs_integer, (ARG(val_mpint, x), ARG(uint, n)))
|
FUNC(uint, mp_hs_integer, (ARG(val_mpint, x), ARG(uint, n)))
|
||||||
FUNC(uint, mp_eq_integer, (ARG(val_mpint, x), ARG(uint, n)))
|
FUNC(uint, mp_eq_integer, (ARG(val_mpint, x), ARG(uint, n)))
|
||||||
FUNC(void, mp_min_into,
|
FUNC(void, mp_min_into,
|
||||||
(ARG(val_mpint, r), ARG(val_mpint, x), ARG(val_mpint, y)))
|
(ARG(val_mpint, dest), ARG(val_mpint, x), ARG(val_mpint, y)))
|
||||||
FUNC(void, mp_max_into,
|
FUNC(void, mp_max_into,
|
||||||
(ARG(val_mpint, r), ARG(val_mpint, x), ARG(val_mpint, y)))
|
(ARG(val_mpint, dest), ARG(val_mpint, x), ARG(val_mpint, y)))
|
||||||
FUNC(val_mpint, mp_min, (ARG(val_mpint, x), ARG(val_mpint, y)))
|
FUNC(val_mpint, mp_min, (ARG(val_mpint, x), ARG(val_mpint, y)))
|
||||||
FUNC(val_mpint, mp_max, (ARG(val_mpint, x), ARG(val_mpint, y)))
|
FUNC(val_mpint, mp_max, (ARG(val_mpint, x), ARG(val_mpint, y)))
|
||||||
FUNC(void, mp_copy_into, (ARG(val_mpint, dest), ARG(val_mpint, src)))
|
FUNC(void, mp_copy_into, (ARG(val_mpint, dest), ARG(val_mpint, src)))
|
||||||
@ -106,33 +106,35 @@ FUNC(void, mp_select_into,
|
|||||||
(ARG(val_mpint, dest), ARG(val_mpint, src0), ARG(val_mpint, src1),
|
(ARG(val_mpint, dest), ARG(val_mpint, src0), ARG(val_mpint, src1),
|
||||||
ARG(uint, choose_src1)))
|
ARG(uint, choose_src1)))
|
||||||
FUNC(void, mp_add_into,
|
FUNC(void, mp_add_into,
|
||||||
(ARG(val_mpint, r), ARG(val_mpint, a), ARG(val_mpint, b)))
|
(ARG(val_mpint, dest), ARG(val_mpint, a), ARG(val_mpint, b)))
|
||||||
FUNC(void, mp_sub_into,
|
FUNC(void, mp_sub_into,
|
||||||
(ARG(val_mpint, r), ARG(val_mpint, a), ARG(val_mpint, b)))
|
(ARG(val_mpint, dest), ARG(val_mpint, a), ARG(val_mpint, b)))
|
||||||
FUNC(void, mp_mul_into,
|
FUNC(void, mp_mul_into,
|
||||||
(ARG(val_mpint, r), ARG(val_mpint, a), ARG(val_mpint, b)))
|
(ARG(val_mpint, dest), ARG(val_mpint, a), ARG(val_mpint, b)))
|
||||||
FUNC(val_mpint, mp_add, (ARG(val_mpint, x), ARG(val_mpint, y)))
|
FUNC(val_mpint, mp_add, (ARG(val_mpint, x), ARG(val_mpint, y)))
|
||||||
FUNC(val_mpint, mp_sub, (ARG(val_mpint, x), ARG(val_mpint, y)))
|
FUNC(val_mpint, mp_sub, (ARG(val_mpint, x), ARG(val_mpint, y)))
|
||||||
FUNC(val_mpint, mp_mul, (ARG(val_mpint, x), ARG(val_mpint, y)))
|
FUNC(val_mpint, mp_mul, (ARG(val_mpint, x), ARG(val_mpint, y)))
|
||||||
FUNC(void, mp_and_into,
|
FUNC(void, mp_and_into,
|
||||||
(ARG(val_mpint, r), ARG(val_mpint, a), ARG(val_mpint, b)))
|
(ARG(val_mpint, dest), ARG(val_mpint, a), ARG(val_mpint, b)))
|
||||||
FUNC(void, mp_or_into,
|
FUNC(void, mp_or_into,
|
||||||
(ARG(val_mpint, r), ARG(val_mpint, a), ARG(val_mpint, b)))
|
(ARG(val_mpint, dest), ARG(val_mpint, a), ARG(val_mpint, b)))
|
||||||
FUNC(void, mp_xor_into,
|
FUNC(void, mp_xor_into,
|
||||||
(ARG(val_mpint, r), ARG(val_mpint, a), ARG(val_mpint, b)))
|
(ARG(val_mpint, dest), ARG(val_mpint, a), ARG(val_mpint, b)))
|
||||||
FUNC(void, mp_bic_into,
|
FUNC(void, mp_bic_into,
|
||||||
(ARG(val_mpint, r), ARG(val_mpint, a), ARG(val_mpint, b)))
|
(ARG(val_mpint, dest), ARG(val_mpint, a), ARG(val_mpint, b)))
|
||||||
FUNC(void, mp_copy_integer_into, (ARG(val_mpint, dest), ARG(uint, n)))
|
FUNC(void, mp_copy_integer_into, (ARG(val_mpint, dest), ARG(uint, n)))
|
||||||
FUNC(void, mp_add_integer_into,
|
FUNC(void, mp_add_integer_into,
|
||||||
(ARG(val_mpint, r), ARG(val_mpint, a), ARG(uint, n)))
|
(ARG(val_mpint, dest), ARG(val_mpint, a), ARG(uint, n)))
|
||||||
FUNC(void, mp_sub_integer_into,
|
FUNC(void, mp_sub_integer_into,
|
||||||
(ARG(val_mpint, r), ARG(val_mpint, a), ARG(uint, n)))
|
(ARG(val_mpint, dest), ARG(val_mpint, a), ARG(uint, n)))
|
||||||
FUNC(void, mp_mul_integer_into,
|
FUNC(void, mp_mul_integer_into,
|
||||||
(ARG(val_mpint, r), ARG(val_mpint, a), ARG(uint, n)))
|
(ARG(val_mpint, dest), ARG(val_mpint, a), ARG(uint, n)))
|
||||||
FUNC(void, mp_cond_add_into,
|
FUNC(void, mp_cond_add_into,
|
||||||
(ARG(val_mpint, r), ARG(val_mpint, a), ARG(val_mpint, b), ARG(uint, yes)))
|
(ARG(val_mpint, dest), ARG(val_mpint, a), ARG(val_mpint, b),
|
||||||
|
ARG(uint, yes)))
|
||||||
FUNC(void, mp_cond_sub_into,
|
FUNC(void, mp_cond_sub_into,
|
||||||
(ARG(val_mpint, r), ARG(val_mpint, a), ARG(val_mpint, b), ARG(uint, yes)))
|
(ARG(val_mpint, dest), ARG(val_mpint, a), ARG(val_mpint, b),
|
||||||
|
ARG(uint, yes)))
|
||||||
FUNC(void, mp_cond_swap,
|
FUNC(void, mp_cond_swap,
|
||||||
(ARG(val_mpint, x0), ARG(val_mpint, x1), ARG(uint, swap)))
|
(ARG(val_mpint, x0), ARG(val_mpint, x1), ARG(uint, swap)))
|
||||||
FUNC(void, mp_cond_clear, (ARG(val_mpint, x), ARG(uint, clear)))
|
FUNC(void, mp_cond_clear, (ARG(val_mpint, x), ARG(uint, clear)))
|
||||||
@ -160,13 +162,13 @@ FUNC(val_monty, monty_new, (ARG(val_mpint, modulus)))
|
|||||||
FUNC_WRAPPED(val_mpint, monty_modulus, (ARG(val_monty, mc)))
|
FUNC_WRAPPED(val_mpint, monty_modulus, (ARG(val_monty, mc)))
|
||||||
FUNC_WRAPPED(val_mpint, monty_identity, (ARG(val_monty, mc)))
|
FUNC_WRAPPED(val_mpint, monty_identity, (ARG(val_monty, mc)))
|
||||||
FUNC(void, monty_import_into,
|
FUNC(void, monty_import_into,
|
||||||
(ARG(val_monty, mc), ARG(val_mpint, r), ARG(val_mpint, x)))
|
(ARG(val_monty, mc), ARG(val_mpint, dest), ARG(val_mpint, x)))
|
||||||
FUNC(val_mpint, monty_import, (ARG(val_monty, mc), ARG(val_mpint, x)))
|
FUNC(val_mpint, monty_import, (ARG(val_monty, mc), ARG(val_mpint, x)))
|
||||||
FUNC(void, monty_export_into,
|
FUNC(void, monty_export_into,
|
||||||
(ARG(val_monty, mc), ARG(val_mpint, r), ARG(val_mpint, x)))
|
(ARG(val_monty, mc), ARG(val_mpint, dest), ARG(val_mpint, x)))
|
||||||
FUNC(val_mpint, monty_export, (ARG(val_monty, mc), ARG(val_mpint, x)))
|
FUNC(val_mpint, monty_export, (ARG(val_monty, mc), ARG(val_mpint, x)))
|
||||||
FUNC(void, monty_mul_into,
|
FUNC(void, monty_mul_into,
|
||||||
(ARG(val_monty, mc), ARG(val_mpint, r), ARG(val_mpint, x),
|
(ARG(val_monty, mc), ARG(val_mpint, dest), ARG(val_mpint, x),
|
||||||
ARG(val_mpint, y)))
|
ARG(val_mpint, y)))
|
||||||
FUNC(val_mpint, monty_add,
|
FUNC(val_mpint, monty_add,
|
||||||
(ARG(val_monty, mc), ARG(val_mpint, x), ARG(val_mpint, y)))
|
(ARG(val_monty, mc), ARG(val_mpint, x), ARG(val_mpint, y)))
|
||||||
@ -188,14 +190,14 @@ FUNC(val_mpint, mp_modadd,
|
|||||||
FUNC(val_mpint, mp_modsub,
|
FUNC(val_mpint, mp_modsub,
|
||||||
(ARG(val_mpint, x), ARG(val_mpint, y), ARG(val_mpint, modulus)))
|
(ARG(val_mpint, x), ARG(val_mpint, y), ARG(val_mpint, modulus)))
|
||||||
FUNC(void, mp_lshift_safe_into,
|
FUNC(void, mp_lshift_safe_into,
|
||||||
(ARG(val_mpint, r), ARG(val_mpint, x), ARG(uint, shift)))
|
(ARG(val_mpint, dest), ARG(val_mpint, x), ARG(uint, shift)))
|
||||||
FUNC(void, mp_rshift_safe_into,
|
FUNC(void, mp_rshift_safe_into,
|
||||||
(ARG(val_mpint, r), ARG(val_mpint, x), ARG(uint, shift)))
|
(ARG(val_mpint, dest), ARG(val_mpint, x), ARG(uint, shift)))
|
||||||
FUNC(val_mpint, mp_rshift_safe, (ARG(val_mpint, x), ARG(uint, shift)))
|
FUNC(val_mpint, mp_rshift_safe, (ARG(val_mpint, x), ARG(uint, shift)))
|
||||||
FUNC(void, mp_lshift_fixed_into,
|
FUNC(void, mp_lshift_fixed_into,
|
||||||
(ARG(val_mpint, r), ARG(val_mpint, a), ARG(uint, shift)))
|
(ARG(val_mpint, dest), ARG(val_mpint, x), ARG(uint, shift)))
|
||||||
FUNC(void, mp_rshift_fixed_into,
|
FUNC(void, mp_rshift_fixed_into,
|
||||||
(ARG(val_mpint, r), ARG(val_mpint, x), ARG(uint, shift)))
|
(ARG(val_mpint, dest), ARG(val_mpint, x), ARG(uint, shift)))
|
||||||
FUNC(val_mpint, mp_rshift_fixed, (ARG(val_mpint, x), ARG(uint, shift)))
|
FUNC(val_mpint, mp_rshift_fixed, (ARG(val_mpint, x), ARG(uint, shift)))
|
||||||
FUNC(val_mpint, mp_random_bits, (ARG(uint, bits)))
|
FUNC(val_mpint, mp_random_bits, (ARG(uint, bits)))
|
||||||
FUNC(val_mpint, mp_random_in_range, (ARG(val_mpint, lo), ARG(val_mpint, hi)))
|
FUNC(val_mpint, mp_random_in_range, (ARG(val_mpint, lo), ARG(val_mpint, hi)))
|
||||||
@ -211,7 +213,7 @@ FUNC(val_wpoint, ecc_weierstrass_point_new,
|
|||||||
(ARG(val_wcurve, curve), ARG(val_mpint, x), ARG(val_mpint, y)))
|
(ARG(val_wcurve, curve), ARG(val_mpint, x), ARG(val_mpint, y)))
|
||||||
FUNC(val_wpoint, ecc_weierstrass_point_new_from_x,
|
FUNC(val_wpoint, ecc_weierstrass_point_new_from_x,
|
||||||
(ARG(val_wcurve, curve), ARG(val_mpint, x), ARG(uint, desired_y_parity)))
|
(ARG(val_wcurve, curve), ARG(val_mpint, x), ARG(uint, desired_y_parity)))
|
||||||
FUNC(val_wpoint, ecc_weierstrass_point_copy, (ARG(val_wpoint, wc)))
|
FUNC(val_wpoint, ecc_weierstrass_point_copy, (ARG(val_wpoint, orig)))
|
||||||
FUNC(uint, ecc_weierstrass_point_valid, (ARG(val_wpoint, P)))
|
FUNC(uint, ecc_weierstrass_point_valid, (ARG(val_wpoint, P)))
|
||||||
FUNC(val_wpoint, ecc_weierstrass_add_general,
|
FUNC(val_wpoint, ecc_weierstrass_add_general,
|
||||||
(ARG(val_wpoint, P), ARG(val_wpoint, Q)))
|
(ARG(val_wpoint, P), ARG(val_wpoint, Q)))
|
||||||
@ -219,14 +221,14 @@ FUNC(val_wpoint, ecc_weierstrass_add, (ARG(val_wpoint, P), ARG(val_wpoint, Q)))
|
|||||||
FUNC(val_wpoint, ecc_weierstrass_double, (ARG(val_wpoint, P)))
|
FUNC(val_wpoint, ecc_weierstrass_double, (ARG(val_wpoint, P)))
|
||||||
FUNC(val_wpoint, ecc_weierstrass_multiply,
|
FUNC(val_wpoint, ecc_weierstrass_multiply,
|
||||||
(ARG(val_wpoint, B), ARG(val_mpint, n)))
|
(ARG(val_wpoint, B), ARG(val_mpint, n)))
|
||||||
FUNC(uint, ecc_weierstrass_is_identity, (ARG(val_wpoint, wp)))
|
FUNC(uint, ecc_weierstrass_is_identity, (ARG(val_wpoint, P)))
|
||||||
/* The output pointers in get_affine all become extra output values */
|
/* The output pointers in get_affine all become extra output values */
|
||||||
FUNC(void, ecc_weierstrass_get_affine,
|
FUNC(void, ecc_weierstrass_get_affine,
|
||||||
(ARG(val_wpoint, wp), ARG(out_val_mpint, x), ARG(out_val_mpint, y)))
|
(ARG(val_wpoint, P), ARG(out_val_mpint, x), ARG(out_val_mpint, y)))
|
||||||
FUNC(val_mcurve, ecc_montgomery_curve,
|
FUNC(val_mcurve, ecc_montgomery_curve,
|
||||||
(ARG(val_mpint, p), ARG(val_mpint, a), ARG(val_mpint, b)))
|
(ARG(val_mpint, p), ARG(val_mpint, a), ARG(val_mpint, b)))
|
||||||
FUNC(val_mpoint, ecc_montgomery_point_new,
|
FUNC(val_mpoint, ecc_montgomery_point_new,
|
||||||
(ARG(val_mcurve, mc), ARG(val_mpint, x)))
|
(ARG(val_mcurve, curve), ARG(val_mpint, x)))
|
||||||
FUNC(val_mpoint, ecc_montgomery_point_copy, (ARG(val_mpoint, orig)))
|
FUNC(val_mpoint, ecc_montgomery_point_copy, (ARG(val_mpoint, orig)))
|
||||||
FUNC(val_mpoint, ecc_montgomery_diff_add,
|
FUNC(val_mpoint, ecc_montgomery_diff_add,
|
||||||
(ARG(val_mpoint, P), ARG(val_mpoint, Q), ARG(val_mpoint, PminusQ)))
|
(ARG(val_mpoint, P), ARG(val_mpoint, Q), ARG(val_mpoint, PminusQ)))
|
||||||
@ -234,8 +236,8 @@ FUNC(val_mpoint, ecc_montgomery_double, (ARG(val_mpoint, P)))
|
|||||||
FUNC(val_mpoint, ecc_montgomery_multiply,
|
FUNC(val_mpoint, ecc_montgomery_multiply,
|
||||||
(ARG(val_mpoint, B), ARG(val_mpint, n)))
|
(ARG(val_mpoint, B), ARG(val_mpint, n)))
|
||||||
FUNC(void, ecc_montgomery_get_affine,
|
FUNC(void, ecc_montgomery_get_affine,
|
||||||
(ARG(val_mpoint, mp), ARG(out_val_mpint, x)))
|
(ARG(val_mpoint, P), ARG(out_val_mpint, x)))
|
||||||
FUNC(boolean, ecc_montgomery_is_identity, (ARG(val_mpoint, mp)))
|
FUNC(boolean, ecc_montgomery_is_identity, (ARG(val_mpoint, P)))
|
||||||
FUNC(val_ecurve, ecc_edwards_curve,
|
FUNC(val_ecurve, ecc_edwards_curve,
|
||||||
(ARG(val_mpint, p), ARG(val_mpint, d), ARG(val_mpint, a),
|
(ARG(val_mpint, p), ARG(val_mpint, d), ARG(val_mpint, a),
|
||||||
ARG(opt_val_mpint, nonsquare_mod_p)))
|
ARG(opt_val_mpint, nonsquare_mod_p)))
|
||||||
@ -243,12 +245,12 @@ FUNC(val_epoint, ecc_edwards_point_new,
|
|||||||
(ARG(val_ecurve, curve), ARG(val_mpint, x), ARG(val_mpint, y)))
|
(ARG(val_ecurve, curve), ARG(val_mpint, x), ARG(val_mpint, y)))
|
||||||
FUNC(val_epoint, ecc_edwards_point_new_from_y,
|
FUNC(val_epoint, ecc_edwards_point_new_from_y,
|
||||||
(ARG(val_ecurve, curve), ARG(val_mpint, y), ARG(uint, desired_x_parity)))
|
(ARG(val_ecurve, curve), ARG(val_mpint, y), ARG(uint, desired_x_parity)))
|
||||||
FUNC(val_epoint, ecc_edwards_point_copy, (ARG(val_epoint, ec)))
|
FUNC(val_epoint, ecc_edwards_point_copy, (ARG(val_epoint, orig)))
|
||||||
FUNC(val_epoint, ecc_edwards_add, (ARG(val_epoint, P), ARG(val_epoint, Q)))
|
FUNC(val_epoint, ecc_edwards_add, (ARG(val_epoint, P), ARG(val_epoint, Q)))
|
||||||
FUNC(val_epoint, ecc_edwards_multiply, (ARG(val_epoint, B), ARG(val_mpint, n)))
|
FUNC(val_epoint, ecc_edwards_multiply, (ARG(val_epoint, B), ARG(val_mpint, n)))
|
||||||
FUNC(uint, ecc_edwards_eq, (ARG(val_epoint, P), ARG(val_epoint, Q)))
|
FUNC(uint, ecc_edwards_eq, (ARG(val_epoint, P), ARG(val_epoint, Q)))
|
||||||
FUNC(void, ecc_edwards_get_affine,
|
FUNC(void, ecc_edwards_get_affine,
|
||||||
(ARG(val_epoint, wp), ARG(out_val_mpint, x), ARG(out_val_mpint, y)))
|
(ARG(val_epoint, P), ARG(out_val_mpint, x), ARG(out_val_mpint, y)))
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The ssh_hash abstraction. Note the 'consumed', indicating that
|
* The ssh_hash abstraction. Note the 'consumed', indicating that
|
||||||
@ -262,7 +264,7 @@ FUNC(void, ssh_hash_reset, (ARG(val_hash, h)))
|
|||||||
FUNC(val_hash, ssh_hash_copy, (ARG(val_hash, orig)))
|
FUNC(val_hash, ssh_hash_copy, (ARG(val_hash, orig)))
|
||||||
FUNC_WRAPPED(val_string, ssh_hash_digest, (ARG(val_hash, h)))
|
FUNC_WRAPPED(val_string, ssh_hash_digest, (ARG(val_hash, h)))
|
||||||
FUNC_WRAPPED(val_string, ssh_hash_final, (ARG(consumed_val_hash, h)))
|
FUNC_WRAPPED(val_string, ssh_hash_final, (ARG(consumed_val_hash, h)))
|
||||||
FUNC(void, ssh_hash_update, (ARG(val_hash, h), ARG(val_string_ptrlen, pl)))
|
FUNC(void, ssh_hash_update, (ARG(val_hash, h), ARG(val_string_ptrlen, data)))
|
||||||
|
|
||||||
FUNC(opt_val_hash, blake2b_new_general, (ARG(uint, hashlen)))
|
FUNC(opt_val_hash, blake2b_new_general, (ARG(uint, hashlen)))
|
||||||
|
|
||||||
@ -274,7 +276,7 @@ FUNC(opt_val_hash, blake2b_new_general, (ARG(uint, hashlen)))
|
|||||||
FUNC(val_mac, ssh2_mac_new, (ARG(macalg, alg), ARG(opt_val_cipher, cipher)))
|
FUNC(val_mac, ssh2_mac_new, (ARG(macalg, alg), ARG(opt_val_cipher, cipher)))
|
||||||
FUNC(void, ssh2_mac_setkey, (ARG(val_mac, m), ARG(val_string_ptrlen, key)))
|
FUNC(void, ssh2_mac_setkey, (ARG(val_mac, m), ARG(val_string_ptrlen, key)))
|
||||||
FUNC(void, ssh2_mac_start, (ARG(val_mac, m)))
|
FUNC(void, ssh2_mac_start, (ARG(val_mac, m)))
|
||||||
FUNC(void, ssh2_mac_update, (ARG(val_mac, m), ARG(val_string_ptrlen, pl)))
|
FUNC(void, ssh2_mac_update, (ARG(val_mac, m), ARG(val_string_ptrlen, data)))
|
||||||
FUNC_WRAPPED(val_string, ssh2_mac_genresult, (ARG(val_mac, m)))
|
FUNC_WRAPPED(val_string, ssh2_mac_genresult, (ARG(val_mac, m)))
|
||||||
FUNC(val_string_asciz_const, ssh2_mac_text_name, (ARG(val_mac, m)))
|
FUNC(val_string_asciz_const, ssh2_mac_text_name, (ARG(val_mac, m)))
|
||||||
|
|
||||||
@ -285,26 +287,26 @@ FUNC(val_string_asciz_const, ssh2_mac_text_name, (ARG(val_mac, m)))
|
|||||||
* all the functions that output key and signature blobs do it by
|
* all the functions that output key and signature blobs do it by
|
||||||
* returning a string.
|
* returning a string.
|
||||||
*/
|
*/
|
||||||
FUNC(val_key, ssh_key_new_pub, (ARG(keyalg, self), ARG(val_string_ptrlen, pub)))
|
FUNC(val_key, ssh_key_new_pub, (ARG(keyalg, alg), ARG(val_string_ptrlen, pub)))
|
||||||
FUNC(opt_val_key, ssh_key_new_priv,
|
FUNC(opt_val_key, ssh_key_new_priv,
|
||||||
(ARG(keyalg, self), ARG(val_string_ptrlen, pub),
|
(ARG(keyalg, alg), ARG(val_string_ptrlen, pub),
|
||||||
ARG(val_string_ptrlen, priv)))
|
ARG(val_string_ptrlen, priv)))
|
||||||
FUNC(opt_val_key, ssh_key_new_priv_openssh,
|
FUNC(opt_val_key, ssh_key_new_priv_openssh,
|
||||||
(ARG(keyalg, self), ARG(val_string_binarysource, src)))
|
(ARG(keyalg, alg), ARG(val_string_binarysource, src)))
|
||||||
FUNC(opt_val_string_asciz, ssh_key_invalid,
|
FUNC(opt_val_string_asciz, ssh_key_invalid,
|
||||||
(ARG(val_key, key), ARG(uint, flags)))
|
(ARG(val_key, key), ARG(uint, flags)))
|
||||||
FUNC(void, ssh_key_sign,
|
FUNC(void, ssh_key_sign,
|
||||||
(ARG(val_key, key), ARG(val_string_ptrlen, data), ARG(uint, flags),
|
(ARG(val_key, key), ARG(val_string_ptrlen, data), ARG(uint, flags),
|
||||||
ARG(out_val_string_binarysink, bs)))
|
ARG(out_val_string_binarysink, sig)))
|
||||||
FUNC(boolean, ssh_key_verify,
|
FUNC(boolean, ssh_key_verify,
|
||||||
(ARG(val_key, key), ARG(val_string_ptrlen, sig),
|
(ARG(val_key, key), ARG(val_string_ptrlen, sig),
|
||||||
ARG(val_string_ptrlen, data)))
|
ARG(val_string_ptrlen, data)))
|
||||||
FUNC(void, ssh_key_public_blob,
|
FUNC(void, ssh_key_public_blob,
|
||||||
(ARG(val_key, key), ARG(out_val_string_binarysink, bs)))
|
(ARG(val_key, key), ARG(out_val_string_binarysink, blob)))
|
||||||
FUNC(void, ssh_key_private_blob,
|
FUNC(void, ssh_key_private_blob,
|
||||||
(ARG(val_key, key), ARG(out_val_string_binarysink, bs)))
|
(ARG(val_key, key), ARG(out_val_string_binarysink, blob)))
|
||||||
FUNC(void, ssh_key_openssh_blob,
|
FUNC(void, ssh_key_openssh_blob,
|
||||||
(ARG(val_key, key), ARG(out_val_string_binarysink, bs)))
|
(ARG(val_key, key), ARG(out_val_string_binarysink, blob)))
|
||||||
FUNC(val_string_asciz, ssh_key_cache_str, (ARG(val_key, key)))
|
FUNC(val_string_asciz, ssh_key_cache_str, (ARG(val_key, key)))
|
||||||
FUNC(val_keycomponents, ssh_key_components, (ARG(val_key, key)))
|
FUNC(val_keycomponents, ssh_key_components, (ARG(val_key, key)))
|
||||||
FUNC(uint, ssh_key_public_bits,
|
FUNC(uint, ssh_key_public_bits,
|
||||||
@ -343,8 +345,8 @@ FUNC_WRAPPED(val_string, ssh_cipher_decrypt_length,
|
|||||||
/*
|
/*
|
||||||
* Integer Diffie-Hellman.
|
* Integer Diffie-Hellman.
|
||||||
*/
|
*/
|
||||||
FUNC(val_dh, dh_setup_group, (ARG(dh_group, kex)))
|
FUNC(val_dh, dh_setup_group, (ARG(dh_group, group)))
|
||||||
FUNC(val_dh, dh_setup_gex, (ARG(val_mpint, pval), ARG(val_mpint, gval)))
|
FUNC(val_dh, dh_setup_gex, (ARG(val_mpint, p), ARG(val_mpint, g)))
|
||||||
FUNC(uint, dh_modulus_bit_size, (ARG(val_dh, ctx)))
|
FUNC(uint, dh_modulus_bit_size, (ARG(val_dh, ctx)))
|
||||||
FUNC(val_mpint, dh_create_e, (ARG(val_dh, ctx), ARG(uint, nbits)))
|
FUNC(val_mpint, dh_create_e, (ARG(val_dh, ctx), ARG(uint, nbits)))
|
||||||
FUNC_WRAPPED(boolean, dh_validate_f, (ARG(val_dh, ctx), ARG(val_mpint, f)))
|
FUNC_WRAPPED(boolean, dh_validate_f, (ARG(val_dh, ctx), ARG(val_mpint, f)))
|
||||||
@ -353,11 +355,11 @@ FUNC(val_mpint, dh_find_K, (ARG(val_dh, ctx), ARG(val_mpint, f)))
|
|||||||
/*
|
/*
|
||||||
* Elliptic-curve Diffie-Hellman.
|
* Elliptic-curve Diffie-Hellman.
|
||||||
*/
|
*/
|
||||||
FUNC(val_ecdh, ssh_ecdhkex_newkey, (ARG(ecdh_alg, kex)))
|
FUNC(val_ecdh, ssh_ecdhkex_newkey, (ARG(ecdh_alg, alg)))
|
||||||
FUNC(void, ssh_ecdhkex_getpublic,
|
FUNC(void, ssh_ecdhkex_getpublic,
|
||||||
(ARG(val_ecdh, key), ARG(out_val_string_binarysink, bs)))
|
(ARG(val_ecdh, key), ARG(out_val_string_binarysink, pub)))
|
||||||
FUNC(opt_val_mpint, ssh_ecdhkex_getkey,
|
FUNC(opt_val_mpint, ssh_ecdhkex_getkey,
|
||||||
(ARG(val_ecdh, key), ARG(val_string_ptrlen, remoteKey)))
|
(ARG(val_ecdh, key), ARG(val_string_ptrlen, pub)))
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* RSA key exchange, and also the BinarySource get function
|
* RSA key exchange, and also the BinarySource get function
|
||||||
@ -392,11 +394,11 @@ FUNC_WRAPPED(val_string, rsa_ssh1_decrypt_pkcs1,
|
|||||||
FUNC(val_string_asciz, rsastr_fmt, (ARG(val_rsa, key)))
|
FUNC(val_string_asciz, rsastr_fmt, (ARG(val_rsa, key)))
|
||||||
FUNC(val_string_asciz, rsa_ssh1_fingerprint, (ARG(val_rsa, key)))
|
FUNC(val_string_asciz, rsa_ssh1_fingerprint, (ARG(val_rsa, key)))
|
||||||
FUNC(void, rsa_ssh1_public_blob,
|
FUNC(void, rsa_ssh1_public_blob,
|
||||||
(ARG(out_val_string_binarysink, bs), ARG(val_rsa, key),
|
(ARG(out_val_string_binarysink, blob), ARG(val_rsa, key),
|
||||||
ARG(rsaorder, order)))
|
ARG(rsaorder, order)))
|
||||||
FUNC(int, rsa_ssh1_public_blob_len, (ARG(val_string_ptrlen, data)))
|
FUNC(int, rsa_ssh1_public_blob_len, (ARG(val_string_ptrlen, data)))
|
||||||
FUNC(void, rsa_ssh1_private_blob_agent,
|
FUNC(void, rsa_ssh1_private_blob_agent,
|
||||||
(ARG(out_val_string_binarysink, bs), ARG(val_rsa, key)))
|
(ARG(out_val_string_binarysink, blob), ARG(val_rsa, key)))
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The PRNG type. Similarly to hashes and MACs, I've invented an extra
|
* The PRNG type. Similarly to hashes and MACs, I've invented an extra
|
||||||
@ -404,12 +406,12 @@ FUNC(void, rsa_ssh1_private_blob_agent,
|
|||||||
* exposed BinarySink.
|
* exposed BinarySink.
|
||||||
*/
|
*/
|
||||||
FUNC(val_prng, prng_new, (ARG(hashalg, hashalg)))
|
FUNC(val_prng, prng_new, (ARG(hashalg, hashalg)))
|
||||||
FUNC(void, prng_seed_begin, (ARG(val_prng, p)))
|
FUNC(void, prng_seed_begin, (ARG(val_prng, pr)))
|
||||||
FUNC(void, prng_seed_update, (ARG(val_prng, pr), ARG(val_string_ptrlen, data)))
|
FUNC(void, prng_seed_update, (ARG(val_prng, pr), ARG(val_string_ptrlen, data)))
|
||||||
FUNC(void, prng_seed_finish, (ARG(val_prng, p)))
|
FUNC(void, prng_seed_finish, (ARG(val_prng, pr)))
|
||||||
FUNC_WRAPPED(val_string, prng_read, (ARG(val_prng, p), ARG(uint, size)))
|
FUNC_WRAPPED(val_string, prng_read, (ARG(val_prng, pr), ARG(uint, size)))
|
||||||
FUNC(void, prng_add_entropy,
|
FUNC(void, prng_add_entropy,
|
||||||
(ARG(val_prng, p), ARG(uint, source_id), ARG(val_string_ptrlen, data)))
|
(ARG(val_prng, pr), ARG(uint, source_id), ARG(val_string_ptrlen, data)))
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Key load/save functions, or rather, the BinarySource / strbuf API
|
* Key load/save functions, or rather, the BinarySource / strbuf API
|
||||||
@ -424,23 +426,23 @@ FUNC(boolean, rsa1_encrypted_s,
|
|||||||
FUNC(boolean, ppk_loadpub_s,
|
FUNC(boolean, ppk_loadpub_s,
|
||||||
(ARG(val_string_binarysource, src),
|
(ARG(val_string_binarysource, src),
|
||||||
ARG(out_opt_val_string_asciz, algorithm),
|
ARG(out_opt_val_string_asciz, algorithm),
|
||||||
ARG(out_val_string_binarysink, bs),
|
ARG(out_val_string_binarysink, blob),
|
||||||
ARG(out_opt_val_string_asciz, commentptr),
|
ARG(out_opt_val_string_asciz, comment),
|
||||||
ARG(out_opt_val_string_asciz_const, errorstr)))
|
ARG(out_opt_val_string_asciz_const, error)))
|
||||||
FUNC(int, rsa1_loadpub_s,
|
FUNC(int, rsa1_loadpub_s,
|
||||||
(ARG(val_string_binarysource, src), ARG(out_val_string_binarysink, bs),
|
(ARG(val_string_binarysource, src), ARG(out_val_string_binarysink, blob),
|
||||||
ARG(out_opt_val_string_asciz, commentptr),
|
ARG(out_opt_val_string_asciz, comment),
|
||||||
ARG(out_opt_val_string_asciz_const, errorstr)))
|
ARG(out_opt_val_string_asciz_const, error)))
|
||||||
FUNC_WRAPPED(opt_val_key, ppk_load_s,
|
FUNC_WRAPPED(opt_val_key, ppk_load_s,
|
||||||
(ARG(val_string_binarysource, src),
|
(ARG(val_string_binarysource, src),
|
||||||
ARG(out_opt_val_string_asciz, comment),
|
ARG(out_opt_val_string_asciz, comment),
|
||||||
ARG(opt_val_string_asciz, passphrase),
|
ARG(opt_val_string_asciz, passphrase),
|
||||||
ARG(out_opt_val_string_asciz_const, errorstr)))
|
ARG(out_opt_val_string_asciz_const, error)))
|
||||||
FUNC_WRAPPED(int, rsa1_load_s,
|
FUNC_WRAPPED(int, rsa1_load_s,
|
||||||
(ARG(val_string_binarysource, src), ARG(val_rsa, key),
|
(ARG(val_string_binarysource, src), ARG(val_rsa, key),
|
||||||
ARG(out_opt_val_string_asciz, comment),
|
ARG(out_opt_val_string_asciz, comment),
|
||||||
ARG(opt_val_string_asciz, passphrase),
|
ARG(opt_val_string_asciz, passphrase),
|
||||||
ARG(out_opt_val_string_asciz_const, errorstr)))
|
ARG(out_opt_val_string_asciz_const, error)))
|
||||||
FUNC_WRAPPED(val_string, ppk_save_sb,
|
FUNC_WRAPPED(val_string, ppk_save_sb,
|
||||||
(ARG(val_key, key), ARG(opt_val_string_asciz, comment),
|
(ARG(val_key, key), ARG(opt_val_string_asciz, comment),
|
||||||
ARG(opt_val_string_asciz, passphrase), ARG(uint, fmt_version),
|
ARG(opt_val_string_asciz, passphrase), ARG(uint, fmt_version),
|
||||||
@ -541,18 +543,19 @@ FUNC(boolean, crcda_detect,
|
|||||||
(ARG(val_string_ptrlen, packet), ARG(val_string_ptrlen, iv)))
|
(ARG(val_string_ptrlen, packet), ARG(val_string_ptrlen, iv)))
|
||||||
FUNC(val_string, get_implementations_commasep, (ARG(val_string_ptrlen, alg)))
|
FUNC(val_string, get_implementations_commasep, (ARG(val_string_ptrlen, alg)))
|
||||||
FUNC(void, http_digest_response,
|
FUNC(void, http_digest_response,
|
||||||
(ARG(out_val_string_binarysink, bs), ARG(val_string_ptrlen, username),
|
(ARG(out_val_string_binarysink, response),
|
||||||
ARG(val_string_ptrlen, password), ARG(val_string_ptrlen, realm),
|
ARG(val_string_ptrlen, username), ARG(val_string_ptrlen, password),
|
||||||
ARG(val_string_ptrlen, method), ARG(val_string_ptrlen, uri),
|
ARG(val_string_ptrlen, realm), ARG(val_string_ptrlen, method),
|
||||||
ARG(val_string_ptrlen, qop), ARG(val_string_ptrlen, nonce),
|
ARG(val_string_ptrlen, uri), ARG(val_string_ptrlen, qop),
|
||||||
ARG(val_string_ptrlen, opaque), ARG(uint, nonce_count),
|
ARG(val_string_ptrlen, nonce), ARG(val_string_ptrlen, opaque),
|
||||||
ARG(httpdigesthash, hash), ARG(boolean, hash_username)))
|
ARG(uint, nonce_count), ARG(httpdigesthash, hash),
|
||||||
|
ARG(boolean, hash_username)))
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* These functions aren't part of PuTTY's own API, but are additions
|
* These functions aren't part of PuTTY's own API, but are additions
|
||||||
* by testcrypt itself for administrative purposes.
|
* by testcrypt itself for administrative purposes.
|
||||||
*/
|
*/
|
||||||
FUNC(void, random_queue, (ARG(val_string_ptrlen, pl)))
|
FUNC(void, random_queue, (ARG(val_string_ptrlen, data)))
|
||||||
FUNC(uint, random_queue_len, (VOID))
|
FUNC(uint, random_queue_len, (VOID))
|
||||||
FUNC(void, random_make_prng,
|
FUNC(void, random_make_prng,
|
||||||
(ARG(hashalg, hashalg), ARG(val_string_ptrlen, seed)))
|
(ARG(hashalg, hashalg), ARG(val_string_ptrlen, seed)))
|
||||||
|
Loading…
Reference in New Issue
Block a user