# Batch\_gcd in Julia

**URL:** <https://discourse.julialang.org/t/batch-gcd-in-julia/81204>\
**Category:** General Usage\
**Tags:** question\
**Created:** [May 17, 2022, 3:02pm UTC](https://discourse.julialang.org/t/batch-gcd-in-julia/81204 "2022-05-17T15:02:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![AntoineHus](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/antoinehus/32/35954_2.png) [@AntoineHus](https://discourse.julialang.org/u/AntoineHus)\
**Post date:** [May 17, 2022, 3:02pm UTC](https://discourse.julialang.org/t/batch-gcd-in-julia/81204/1 "2022-05-17T15:02:43Z")

</div>

Hello everybody,

On a recent project I was working on, I had to implement the Batch\_GCD algorithm from Bernstein.  
This algorithm could be use to check Weak keys in RSA.

In which package should I ask the integration of this work ?

Thanks.

---

<div class="post-metadata">

**Author:** ![Oscar\_Smith](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oscar_smith/32/25343_2.png) [@Oscar\_Smith](https://discourse.julialang.org/u/Oscar_Smith)\
**Post date:** [May 17, 2022, 3:08pm UTC](https://discourse.julialang.org/t/batch-gcd-in-julia/81204/2 "2022-05-17T15:08:50Z")

</div>

Maybe [GitHub - JuliaMath/IntegerMathUtils.jl](https://github.com/JuliaMath/IntegerMathUtils.jl)? It’s currently a small repository, but it seems like a good fit.

---

<div class="post-metadata">

**Author:** ![jd-foster](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jd-foster/32/35824_2.png) [@jd-foster](https://discourse.julialang.org/u/jd-foster)\
**Post date:** [May 18, 2022, 7:59am UTC](https://discourse.julialang.org/t/batch-gcd-in-julia/81204/3 "2022-05-18T07:59:27Z")

</div>

Another alternative is using [the gcd in Nemo.jl](https://nemocas.github.io/Nemo.jl/dev/residue/#GCD), which also ultimately uses the [GMP](http://gmplib.org/) for arbitrary precision arithmetic.

---

<div class="post-metadata">

**Author:** ![JeffreySarnoff](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jeffreysarnoff/32/1980_2.png) [@JeffreySarnoff](https://discourse.julialang.org/u/JeffreySarnoff)\
**Post date:** [May 18, 2022, 8:31am UTC](https://discourse.julialang.org/t/batch-gcd-in-julia/81204/4 "2022-05-18T08:31:53Z")

</div>

You should take Oscar up on his offer by adding a PR for [JuliaMath/IntegerMathUtils.jl](https://github.com/JuliaMath/IntegerMathUtils.jl).
