[25] | 1 | # tclTomMath.decls -- |
---|
| 2 | # |
---|
| 3 | # This file contains the declarations for the functions in |
---|
| 4 | # 'libtommath' that are contained within the Tcl library. |
---|
| 5 | # This file is used to generate the 'tclTomMathDecls.h' and |
---|
| 6 | # 'tclTomMathStub.c' files. |
---|
| 7 | # |
---|
| 8 | # If you edit this file, advance the revision number (and the epoch |
---|
| 9 | # if the new stubs are not backward compatible) in tclTomMathDecls.h |
---|
| 10 | # |
---|
| 11 | # Copyright (c) 2005 by Kevin B. Kenny. All rights reserved. |
---|
| 12 | # |
---|
| 13 | # See the file "license.terms" for information on usage and redistribution |
---|
| 14 | # of this file, and for a DISCLAIMER OF ALL WARRANTIES. |
---|
| 15 | # |
---|
| 16 | # RCS: @(#) $Id: tclTomMath.decls,v 1.3 2007/12/13 15:23:20 dgp Exp $ |
---|
| 17 | |
---|
| 18 | library tcl |
---|
| 19 | |
---|
| 20 | # Define the unsupported generic interfaces. |
---|
| 21 | |
---|
| 22 | interface tclTomMath |
---|
| 23 | # hooks {tclTomMathInt} |
---|
| 24 | |
---|
| 25 | # Declare each of the functions in the Tcl tommath interface |
---|
| 26 | |
---|
| 27 | declare 0 generic { |
---|
| 28 | int TclBN_epoch(void) |
---|
| 29 | } |
---|
| 30 | declare 1 generic { |
---|
| 31 | int TclBN_revision(void) |
---|
| 32 | } |
---|
| 33 | |
---|
| 34 | declare 2 generic { |
---|
| 35 | int TclBN_mp_add(mp_int* a, mp_int* b, mp_int* c) |
---|
| 36 | } |
---|
| 37 | declare 3 generic { |
---|
| 38 | int TclBN_mp_add_d(mp_int* a, mp_digit b, mp_int* c) |
---|
| 39 | } |
---|
| 40 | declare 4 generic { |
---|
| 41 | int TclBN_mp_and(mp_int* a, mp_int* b, mp_int* c) |
---|
| 42 | } |
---|
| 43 | declare 5 generic { |
---|
| 44 | void TclBN_mp_clamp(mp_int* a) |
---|
| 45 | } |
---|
| 46 | declare 6 generic { |
---|
| 47 | void TclBN_mp_clear(mp_int* a) |
---|
| 48 | } |
---|
| 49 | declare 7 generic { |
---|
| 50 | void TclBN_mp_clear_multi(mp_int* a, ...) |
---|
| 51 | } |
---|
| 52 | declare 8 generic { |
---|
| 53 | int TclBN_mp_cmp(mp_int* a, mp_int* b) |
---|
| 54 | } |
---|
| 55 | declare 9 generic { |
---|
| 56 | int TclBN_mp_cmp_d(mp_int* a, mp_digit b) |
---|
| 57 | } |
---|
| 58 | declare 10 generic { |
---|
| 59 | int TclBN_mp_cmp_mag(mp_int* a, mp_int* b) |
---|
| 60 | } |
---|
| 61 | declare 11 generic { |
---|
| 62 | int TclBN_mp_copy(mp_int* a, mp_int* b) |
---|
| 63 | } |
---|
| 64 | declare 12 generic { |
---|
| 65 | int TclBN_mp_count_bits(mp_int* a) |
---|
| 66 | } |
---|
| 67 | declare 13 generic { |
---|
| 68 | int TclBN_mp_div(mp_int* a, mp_int* b, mp_int* q, mp_int* r) |
---|
| 69 | } |
---|
| 70 | declare 14 generic { |
---|
| 71 | int TclBN_mp_div_d(mp_int* a, mp_digit b, mp_int* q, mp_digit* r) |
---|
| 72 | } |
---|
| 73 | declare 15 generic { |
---|
| 74 | int TclBN_mp_div_2(mp_int* a, mp_int* q) |
---|
| 75 | } |
---|
| 76 | declare 16 generic { |
---|
| 77 | int TclBN_mp_div_2d(mp_int* a, int b, mp_int* q, mp_int* r) |
---|
| 78 | } |
---|
| 79 | declare 17 generic { |
---|
| 80 | int TclBN_mp_div_3(mp_int* a, mp_int* q, mp_digit* r) |
---|
| 81 | } |
---|
| 82 | declare 18 generic { |
---|
| 83 | void TclBN_mp_exch(mp_int* a, mp_int* b) |
---|
| 84 | } |
---|
| 85 | declare 19 generic { |
---|
| 86 | int TclBN_mp_expt_d(mp_int* a, mp_digit b, mp_int* c) |
---|
| 87 | } |
---|
| 88 | declare 20 generic { |
---|
| 89 | int TclBN_mp_grow(mp_int* a, int size) |
---|
| 90 | } |
---|
| 91 | declare 21 generic { |
---|
| 92 | int TclBN_mp_init(mp_int* a) |
---|
| 93 | } |
---|
| 94 | declare 22 generic { |
---|
| 95 | int TclBN_mp_init_copy(mp_int * a, mp_int* b) |
---|
| 96 | } |
---|
| 97 | declare 23 generic { |
---|
| 98 | int TclBN_mp_init_multi(mp_int* a, ...) |
---|
| 99 | } |
---|
| 100 | declare 24 generic { |
---|
| 101 | int TclBN_mp_init_set(mp_int* a, mp_digit b) |
---|
| 102 | } |
---|
| 103 | declare 25 generic { |
---|
| 104 | int TclBN_mp_init_size(mp_int* a, int size) |
---|
| 105 | } |
---|
| 106 | declare 26 generic { |
---|
| 107 | int TclBN_mp_lshd(mp_int* a, int shift) |
---|
| 108 | } |
---|
| 109 | declare 27 generic { |
---|
| 110 | int TclBN_mp_mod(mp_int* a, mp_int* b, mp_int* r) |
---|
| 111 | } |
---|
| 112 | declare 28 generic { |
---|
| 113 | int TclBN_mp_mod_2d(mp_int* a, int b, mp_int* r) |
---|
| 114 | } |
---|
| 115 | declare 29 generic { |
---|
| 116 | int TclBN_mp_mul(mp_int* a, mp_int* b, mp_int* p) |
---|
| 117 | } |
---|
| 118 | declare 30 generic { |
---|
| 119 | int TclBN_mp_mul_d(mp_int* a, mp_digit b, mp_int* p) |
---|
| 120 | } |
---|
| 121 | declare 31 generic { |
---|
| 122 | int TclBN_mp_mul_2(mp_int* a, mp_int* p) |
---|
| 123 | } |
---|
| 124 | declare 32 generic { |
---|
| 125 | int TclBN_mp_mul_2d(mp_int* a, int d, mp_int* p) |
---|
| 126 | } |
---|
| 127 | declare 33 generic { |
---|
| 128 | int TclBN_mp_neg(mp_int* a, mp_int* b) |
---|
| 129 | } |
---|
| 130 | declare 34 generic { |
---|
| 131 | int TclBN_mp_or(mp_int* a, mp_int* b, mp_int* c) |
---|
| 132 | } |
---|
| 133 | declare 35 generic { |
---|
| 134 | int TclBN_mp_radix_size(mp_int* a, int radix, int* size) |
---|
| 135 | } |
---|
| 136 | declare 36 generic { |
---|
| 137 | int TclBN_mp_read_radix(mp_int* a, const char* str, int radix) |
---|
| 138 | } |
---|
| 139 | declare 37 generic { |
---|
| 140 | void TclBN_mp_rshd(mp_int * a, int shift) |
---|
| 141 | } |
---|
| 142 | declare 38 generic { |
---|
| 143 | int TclBN_mp_shrink(mp_int* a) |
---|
| 144 | } |
---|
| 145 | declare 39 generic { |
---|
| 146 | void TclBN_mp_set(mp_int* a, mp_digit b) |
---|
| 147 | } |
---|
| 148 | declare 40 generic { |
---|
| 149 | int TclBN_mp_sqr(mp_int* a, mp_int* b) |
---|
| 150 | } |
---|
| 151 | declare 41 generic { |
---|
| 152 | int TclBN_mp_sqrt(mp_int* a, mp_int* b) |
---|
| 153 | } |
---|
| 154 | declare 42 generic { |
---|
| 155 | int TclBN_mp_sub(mp_int* a, mp_int* b, mp_int* c) |
---|
| 156 | } |
---|
| 157 | declare 43 generic { |
---|
| 158 | int TclBN_mp_sub_d(mp_int* a, mp_digit b, mp_int* c) |
---|
| 159 | } |
---|
| 160 | declare 44 generic { |
---|
| 161 | int TclBN_mp_to_unsigned_bin(mp_int* a, unsigned char* b) |
---|
| 162 | } |
---|
| 163 | declare 45 generic { |
---|
| 164 | int TclBN_mp_to_unsigned_bin_n(mp_int* a, unsigned char* b, |
---|
| 165 | unsigned long* outlen) |
---|
| 166 | } |
---|
| 167 | declare 46 generic { |
---|
| 168 | int TclBN_mp_toradix_n(mp_int* a, char* str, int radix, int maxlen) |
---|
| 169 | } |
---|
| 170 | declare 47 generic { |
---|
| 171 | int TclBN_mp_unsigned_bin_size(mp_int* a) |
---|
| 172 | } |
---|
| 173 | declare 48 generic { |
---|
| 174 | int TclBN_mp_xor(mp_int* a, mp_int* b, mp_int* c) |
---|
| 175 | } |
---|
| 176 | declare 49 generic { |
---|
| 177 | void TclBN_mp_zero(mp_int* a) |
---|
| 178 | } |
---|
| 179 | |
---|
| 180 | # internal routines to libtommath - should not be called but must be |
---|
| 181 | # exported to accommodate the "tommath" extension |
---|
| 182 | |
---|
| 183 | declare 50 generic { |
---|
| 184 | void TclBN_reverse(unsigned char* s, int len) |
---|
| 185 | } |
---|
| 186 | declare 51 generic { |
---|
| 187 | int TclBN_fast_s_mp_mul_digs(mp_int *a, mp_int *b, mp_int *c, int digs) |
---|
| 188 | } |
---|
| 189 | declare 52 generic { |
---|
| 190 | int TclBN_fast_s_mp_sqr(mp_int* a, mp_int* b) |
---|
| 191 | } |
---|
| 192 | declare 53 generic { |
---|
| 193 | int TclBN_mp_karatsuba_mul(mp_int* a, mp_int* b, mp_int* c) |
---|
| 194 | } |
---|
| 195 | declare 54 generic { |
---|
| 196 | int TclBN_mp_karatsuba_sqr(mp_int* a, mp_int* b) |
---|
| 197 | } |
---|
| 198 | declare 55 generic { |
---|
| 199 | int TclBN_mp_toom_mul(mp_int* a, mp_int* b, mp_int* c) |
---|
| 200 | } |
---|
| 201 | declare 56 generic { |
---|
| 202 | int TclBN_mp_toom_sqr(mp_int* a, mp_int* b) |
---|
| 203 | } |
---|
| 204 | declare 57 generic { |
---|
| 205 | int TclBN_s_mp_add(mp_int* a, mp_int* b, mp_int* c) |
---|
| 206 | } |
---|
| 207 | declare 58 generic { |
---|
| 208 | int TclBN_s_mp_mul_digs(mp_int* a, mp_int* b, mp_int* c, int digs) |
---|
| 209 | } |
---|
| 210 | declare 59 generic { |
---|
| 211 | int TclBN_s_mp_sqr(mp_int* a, mp_int* b) |
---|
| 212 | } |
---|
| 213 | declare 60 generic { |
---|
| 214 | int TclBN_s_mp_sub(mp_int* a, mp_int* b, mp_int* c) |
---|
| 215 | } |
---|