+#if 0
+void test_sign1(void){
+ bigint_word_t d_w[sizeof(ecdsa_test_1_d)];
+ uint8_t rnd[sizeof(ecdsa_test_1_k)];
+ uint8_t *hash;
+ bigint_t d;
+ const hfdesc_t *hash_desc;
+ ecc_combi_point_t q;
+ ecdsa_signature_t sign;
+ ecdsa_ctx_t ctx;
+ uint8_t r;
+
+ putchar('\n');
+ d.wordv = d_w;
+ memcpy_P(rnd, ecdsa_test_1_k, sizeof(ecdsa_test_1_k));
+ memcpy_P(d_w, ecdsa_test_1_d, sizeof(ecdsa_test_1_d));
+ d.length_W = (sizeof(ecdsa_test_1_d) + sizeof(bigint_word_t) - 1) / sizeof(bigint_word_t);
+ d.info = 0;
+ bigint_adjust(&d);
+
+ hash_desc = &sha1_desc; //hash_select();
+ hash = malloc(hfal_hash_getHashsize(hash_desc) / 8);
+ if(hash == NULL){
+ printf_P(PSTR("DBG: XXX <%S %s %d>\n"), PSTR(__FILE__), __func__, __LINE__);
+ }
+ hash_mem_P(hash_desc, hash, ecdsa_test_1_msg, sizeof(ecdsa_test_1_msg) * 8);
+ printf_P(PSTR("msg hash: "));
+ cli_hexdump(hash, hfal_hash_getHashsize(hash_desc) / 8);
+ putchar('\n');
+
+ ecc_affine_point_alloc(&q.affine, nist_curve_p192_p.length_W * sizeof(bigint_word_t));
+// ecc_chudnovsky_point_alloc(&q.chudnovsky, nist_curve_p192_p.length_W * sizeof(bigint_word_t));
+// ctx.basepoint = &nist_curve_p192_basepoint.chudnovsky;
+ ctx.basepoint = &nist_curve_p192_basepoint.affine;
+ ctx.priv = &d;
+ ctx.curve = &nist_curve_p192;
+
+ printf("\n d: ");
+ bigint_print_hex(&d);
+ printf_P(PSTR("\n Gx: "));
+ bigint_print_hex(&nist_curve_p192_basepoint.affine.x);
+ printf_P(PSTR("\n Gy: "));
+ bigint_print_hex(&nist_curve_p192_basepoint.affine.y);
+
+// r = ecc_chudnovsky_multiplication(&q.chudnovsky, &d, &nist_curve_p192_basepoint.chudnovsky, &nist_curve_p192);
+ r = ecc_????
+ if(r){
+ printf_P(PSTR("ERROR: ecc_chudnovsky_multiplication() returned: %"PRIu8"\n"), r);
+ }
+// r = ecc_chudnovsky_to_affine_point(&q.affine, &q.chudnovsky, &nist_curve_p192);
+ if(r){
+ printf_P(PSTR("ERROR: ecc_chudnovsky_to_affine_point() returned: %"PRIu8"\n"), r);
+ }
+
+ printf_P(PSTR("\n Qx: "));
+ bigint_print_hex(&q.affine.x);
+ printf_P(PSTR("\n Qy: "));
+ bigint_print_hex(&q.affine.y);
+ putchar('\n');
+ ctx.pub = &q.affine;
+
+ ecdsa_signature_alloc(&sign, sizeof(ecdsa_test_1_d) * sizeof(bigint_word_t));
+
+ r = ecdsa_sign_hash(&sign, hash, hfal_hash_getHashsize(hash_desc) / 8, &ctx, rnd);
+ if(r){
+ printf_P(PSTR("ERROR: ecdsa_sign_message() returned: %"PRIu8"\n"), r);
+ }
+ printf_P(PSTR(" r: "));
+ bigint_print_hex(&sign.r);
+ printf_P(PSTR("\n s: "));
+ bigint_print_hex(&sign.s);
+
+ free(hash);
+ ecdsa_signature_free(&sign);
+ ecc_chudnovsky_point_free(&q.chudnovsky);
+}
+
+#else
+