Skip to content

Commit d3d06f9

Browse files
committed
Merge pull request samr7#10 from WyseNynja/utdrmac-patch-0
utdrmac's fixes for oclvanitygen warnings
2 parents d56e279 + b37a91d commit d3d06f9

1 file changed

Lines changed: 34 additions & 2 deletions

File tree

calc_addrs.cl

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,38 @@ __constant bn_word mont_n0[2] = { 0xd2253531, 0xd838091d };
210210
#define bn_iter(e) iter_8(e)
211211

212212

213+
/*
214+
* Prototypes
215+
*/
216+
void bn_lshift1(bignum *bn);
217+
void bn_rshift(bignum *bn, int shift);
218+
void bn_rshift1(bignum *bn);
219+
void bn_rshift1_2(bignum *bna, bignum *bnb);
220+
int bn_ucmp_ge(bignum *a, bignum *b);
221+
int bn_ucmp_ge_c(bignum *a, __constant bn_word *b);
222+
void bn_neg(bignum *n);
223+
bn_word bn_uadd_words_seq(bn_word *r, bn_word *a, bn_word *b);
224+
bn_word bn_uadd_words_c_seq(bn_word *r, bn_word *a, __constant bn_word *b);
225+
bn_word bn_usub_words_seq(bn_word *r, bn_word *a, bn_word *b);
226+
bn_word bn_usub_words_c_seq(bn_word *r, bn_word *a, __constant bn_word *b);
227+
bn_word bn_uadd_words_vliw(bn_word *r, bn_word *a, bn_word *b);
228+
bn_word bn_uadd_words_c_vliw(bn_word *r, bn_word *a, __constant bn_word *b);
229+
bn_word bn_usub_words_vliw(bn_word *r, bn_word *a, bn_word *b);
230+
bn_word bn_usub_words_c_vliw(bn_word *r, bn_word *a, __constant bn_word *b);
231+
void bn_mod_add(bignum *r, bignum *a, bignum *b);
232+
void bn_mod_sub(bignum *r, bignum *a, bignum *b);
233+
void bn_mod_lshift1(bignum *bn);
234+
void bn_mul_mont(bignum *r, bignum *a, bignum *b);
235+
void bn_from_mont(bignum *rb, bignum *b);
236+
void bn_mod_inverse(bignum *r, bignum *n);
237+
void sha2_256_init(uint *out);
238+
void sha2_256_block(uint *out, uint *in);
239+
void ripemd160_init(uint *out);
240+
void ripemd160_block(uint *out, uint *in);
241+
void hash_ec_point(uint *hash_out, __global bn_word *xy, __global bn_word *zip);
242+
int hash160_ucmp_g(uint *a, __global uint *bound);
243+
244+
213245
/*
214246
* Bitwise shift
215247
*/
@@ -531,7 +563,7 @@ bn_mul_mont(bignum *r, bignum *a, bignum *b)
531563
bn_word tea, teb, c, p, s, m;
532564

533565
#if !defined(VERY_EXPENSIVE_BRANCHES)
534-
int q;
566+
uint q;
535567
#endif
536568

537569
c = 0;
@@ -667,7 +699,7 @@ void
667699
bn_mod_inverse(bignum *r, bignum *n)
668700
{
669701
bignum a, b, x, y;
670-
int shift;
702+
uint shift;
671703
bn_word xc, yc;
672704
for (shift = 0; shift < BN_NWORDS; shift++) {
673705
a.d[shift] = modulus[shift];

0 commit comments

Comments
 (0)