# Need an expert in C and number theory

I need a function in C that:

1- takes base, exponent, and modulus .i.e. modular_pow(base, exponent, modulus).

The base is binary and it is 128-bits, the exponent is integer and it is 128-bits, and the modulus is integer and it is 512-bits. Since C has no primitive data types that can hold 128-bits or 512-bits, you many need to use char!! then converting char to integer for multiplications and for taking the modulus.

2- The function must perform Square and Multiply algorithm the Right-to-left binary method, this algorithm reduce the complexity. i.e. 2^23 need only 9 multiplications instead of 22. Here is the pseudocode.

modular_pow(a, e, n)

convert e to binary: ks ks-1 ... k1 k0

b = a^b0 ; c = a;

for(i=1, i<=s; i++) {

c = c*c mod n;

if (ki == 1)

b = b * c mod n ;

}

return b;

3- Must works on Arduino UNO.

Before you propose, please please make sure that you fully understand the complexity of this function!!.

Skills: Algorithm, C Programming

See more:

( 0 reviews ) Milford, United States

Project ID: #16319907

## Awarded to:

samiridwy

Hello, i have experience with this kind of projects, message me so we can discuss cheers --------------------------

\$77 USD in 1 day
(14 Reviews)
4.2

## 29 freelancers are bidding on average \$106 for this job

super2lao

Hi, Dear Employer! How are you? I am really interested in your project. I have enough experience on python, C/C++, C#, java programming. I am 100% sure i can satisfy your requirements perfectly. User-Friendly Int More

\$147 USD in 3 days
(88 Reviews)
7.3
Gaosong2017

Honorable Seniors.I have experience in developing C++, Java, Python developer with 7+ years. I can complete your project perfectly because I have experience in that filed. I will work for you all my best. Thank you i More

\$120 USD in 3 days
(6 Reviews)
4.9
trutony

Hi, I am a talented C & C++ coder. I won the championship 4 times in the international online programming contest sponsored by India. If you give me this project, you will get good result. Thanks. Relevant skills & ex More

\$155 USD in 3 days
(13 Reviews)
5.0
\$250 USD in 3 days
(30 Reviews)
5.4
freelancerSolvit

I don't have an actual Arduino UNO so I will implement and test the code in a virtual Uno simulation environment. By the way, did you mean C++ instead of C?

\$100 USD in 3 days
(24 Reviews)
4.4
fahdhtolba

Hello , I have bachelor's degree in computer science and i have been programming in C/C++ for both linux and windows for more than 8 years.I have written various network applications some of which are down to the IP More

\$100 USD in 3 days
(7 Reviews)
4.1
dslc

Hi. I have an Arduino UNO to test this on. Would it be okay if I need to resort to assembly code for certain functionality? (It might not be necessary - but I just wanted to check.) I certainly don't regard myself a More

\$40 USD in 5 days
(1 Review)
3.3
\$100 USD in 2 days
(7 Reviews)
3.2
\$155 USD in 3 days
(4 Reviews)
3.1
CrazyWebGuru

Hello, I read about your project. And I have made the program just runs as you described. It was so easy, in fact. Call me, and you will get the result at once. Thank you.

\$50 USD in 1 day
(1 Review)
2.7
\$30 USD in 3 days
(3 Reviews)
1.8
sohaibmughal1232

Hi. I have read your requirements. Inbox me for more detail. I guarantee high work, quickly answer your message and responsibilities. I would like to do job first with your 100% satisfaction and then paid I am gre More

\$155 USD in 3 days
(5 Reviews)
1.4
soltracker

How r u?Bro,,No need of heavy budgets for simple projects like this. Its a task of an hour or two. U will feel brotherhood,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,

\$35 USD in 3 days
(4 Reviews)
1.6
yasithmilinda

I am a computer science and engineering undergraduate with a lot of knowledge in languages like C and optimization in algorithm level using number theory.

\$155 USD in 3 days
(1 Review)
0.7

i will do this task in less cost becasuse i want good rating on profile But i only use c++ not c language

\$45 USD in 1 day
(0 Reviews)
0.0
\$155 USD in 5 days
(0 Reviews)
0.0
aamiryousafi822

My name is Aamir Yousafi. I was raised in the U.S. I have a passion for the natural sciences, and here on Freelancer.com, [login to view URL], and [login to view URL], I am a science writer, software programmer, and medical coder. I have More

\$80 USD in 3 days
(0 Reviews)
0.0
agurjew

I am ready to write the function you asked for. I understand the complexity of the function but I know I can write it. The only thing is that I do not know anything about Arduino UNO.

\$155 USD in 7 days
(0 Reviews)
0.0
hamzanaveed18

I am c/c++ developer. I ensure you that i will do the finest work because i have experience in that kind of stuff.

\$66 USD in 4 days
(0 Reviews)
0.0
\$155 USD in 3 days
(0 Reviews)
0.0