Branch: Tag:

2014-10-29

2014-10-29 17:55:47 by Martin Nilsson <nilsson@opera.com>

Access bignum_program directly.

437:       ecc_scalar_random(&s, rnd, random_func_wrapper);    -  push_object(ret = fast_clone_object(get_auto_bignum_program())); +  push_object(ret = fast_clone_object(bignum_program));    ecc_scalar_get(&s, (mpz_ptr)ret->storage);       ecc_scalar_clear(&s);
473:    }       ecc_point_mul_g(&r, &s); -  push_object(x = fast_clone_object(get_auto_bignum_program())); -  push_object(y = fast_clone_object(get_auto_bignum_program())); +  push_object(x = fast_clone_object(bignum_program)); +  push_object(y = fast_clone_object(bignum_program));    ecc_point_get(&r, (mpz_ptr)x->storage, (mpz_ptr)y->storage);       ecc_scalar_clear(&s);
530:       ecc_point_mul(&r, &s, &p);    -  push_object(rx = fast_clone_object(get_auto_bignum_program())); -  push_object(ry = fast_clone_object(get_auto_bignum_program())); +  push_object(rx = fast_clone_object(bignum_program)); +  push_object(ry = fast_clone_object(bignum_program));    ecc_point_get(&r, (mpz_ptr)rx->storage, (mpz_ptr)ry->storage);       ecc_point_clear(&r);
614:    PIKEFUN object(Gmp.mpz) get_private_key()    {    struct object *ret; -  push_object(ret = fast_clone_object(get_auto_bignum_program())); +  push_object(ret = fast_clone_object(bignum_program));    ecc_scalar_get(&THIS->key, (mpz_ptr)ret->storage);    }   
645:    PIKEFUN object(Gmp.mpz) get_x()    {    struct object *ret; -  push_object(ret = fast_clone_object(get_auto_bignum_program())); +  push_object(ret = fast_clone_object(bignum_program));    ecc_point_get(&THIS->pub, (mpz_ptr)ret->storage, NULL);    }   
659:    PIKEFUN object(Gmp.mpz) get_y()    {    struct object *ret; -  push_object(ret = fast_clone_object(get_auto_bignum_program())); +  push_object(ret = fast_clone_object(bignum_program));    ecc_point_get(&THIS->pub, NULL, (mpz_ptr)ret->storage);    }