sedang Berlangsung

Convert C program to Java

Need the following C code converted into a Java library

[url removed, login to view]

This c++ to Java converter may help you [url removed, login to view]

I need the C code converted to nice Java code/classes.

It should be pretty easy/straightforward.

See rlwe_main.c for an example program.

Some requirements:

a) I would like a nice clean interface to the lib that makes it clean and easy to call the functions.

b) generateKeyPair needs to work with Java KeyPair.

Easy enough to do - you can subclass PublicKey and PrivateKey

by putting the uint32_t in the

public byte[] getEncoded() of [url removed, login to view]

c) assume CONSTANT_TIME is our default (see code)

d) Use java SecureRandom (passed in externally to interface)

for random numbers for rlwe_kex_generate_keypair

ie public KeyPair generateKeyPair(SecureRandom ........

e) Java test program should emulate the test logic in C main

(see below). Of course, the program must work and always

generate the same secret between Alice and Bob.

f) No statics in final - I need the final code to run in parallel with multiple threads

g) Ignore the C random number code - we should be using SecureRandom in the Java implementation.

** interface definition

I'll put the suggested mappings between old C and Java here. Chat if you want to do something different.

C:

rlwe_kex_generate_keypair(a, s_alice, b_alice, &ctx);

JAVA:

public KeyPair generateKeyPair( SecureRandom random);

C:

rlwe_kex_compute_key_bob(b_alice, s_bob, c, k_bob, &ctx);

JAVA:

BobResult computeBob( PublicKey alice, PrivateKey bob);

BobResult holds c (call it CResponse) and k (call it secret).

C:

rlwe_kex_compute_key_alice(b_bob, s_alice, c, k_alice, &ctx);

Java:

AliceResult computeAlice( PublicKey bob, PrivateKey alice,

CResponse response);

**

Hint:

Java Main test program should roughly contain

SecureRandom random = new SecureRandom();

KeyPair aliceKeyPair = generateKeyPair( random );

KeyPair bobKeyPair = generateKeyPair( random );

BobResult res = computeBob( [url removed, login to view](),

[url removed, login to view]());

AliceResult res2 = computeAlice( [url removed, login to view](),

[url removed, login to view](),

[url removed, login to view]() );

boolean keysMatch= [url removed, login to view]().equals( [url removed, login to view]() );

** Background logic to understand whats going on

Alice generates initiator polynomal (PubKey), gives it to Bob.

Bob takes initiator polynomial (alice pubkey) and now has secret (k), gives responding polynomials (C and pubkey bob) to Alice.

Alice takes responding polynomials (C and pubkey bob) and calculates secret (k).

We then run test to ensure that both Alice and Bob have the same secret.

Note:

All copyright must of completed work belong to me, This obviously also means you can't give the produced code to anyone else, in whole or in part.

*
Obviously, the Java code given to me must be bug free, fully working, and clean wherever possible,

Even though the c++ to java converter may be useful, you'll still to put some manual effort in.

The test code should clearly show the system works even when run many many times
(ie. if you put the main test loop and run it 100,000 times, the secret should match every time with different
public and private keys etc)


Keahlian Java

Lihat lebih lanjut: security logic, k to the i, help with java code, c random number library, convert java code to c, java program interactive user input guess number, using phone number java program, java program verifies password using indexof, java program library management using interface, convert code java program, convert flv mpeg java program, using java program card game

Tentang Pemberi kerja:
( 34 ulasan ) Loughton, United Kingdom

ID Proyek: #8392777

Diberikan kepada:

vvadimov

Hello, I am an experienced both c++ and java programmer and I would like to do this project for you. I have experience in writing codes regarding cryptography (cryptohashes, crypto-algorithms like AES) so it won't be a Lagi

$80 USD dalam 3 hari
(18 Ulasan)
4.4

18 freelancer menawar pada rata-rata $162 untuk pekerjaan ini

super2lao

A proposal has not yet been provided

$252 USD dalam 3 hari
(57 Ulasan)
6.4
snpe

Hi, I'm experienced Java developer. See my github profile: [url removed, login to view] I would like to help you about this project. Regards, Peco

$277 USD dalam 7 hari
(21 Ulasan)
5.6
KingOfPhoenix

A proposal has not yet been provided

$210 USD dalam 5 hari
(23 Ulasan)
5.2
dipakjadhav08

A proposal has not yet been provided

$166 USD dalam 5 hari
(34 Ulasan)
4.5
phongpro

A proposal has not yet been provided

$55 USD dalam 3 hari
(43 Ulasan)
4.7
cscinstructor

I have read and fully understood your requirements.. Please open chat to discuss further… _____________________-----------------------------------_____________________________------------------

$277 USD dalam 3 hari
(7 Ulasan)
3.6
nxhoaf

Hi, Please have a chat with me to discuss more about the project. I will try to implement it and give you the demo via skype direct call and screen sharing. If you don't want my implementation, you can reject it wi Lagi

$150 USD dalam 3 hari
(8 Ulasan)
3.4
dk2k

Предложение еще не подано

$188 USD dalam 5 hari
(5 Ulasan)
2.6
jaydeepbhatia91

A proposal has not yet been provided

$150 USD dalam 5 hari
(1 Ulasan)
1.8
maryamOmar791

Hello I am a java developer and I have alot of experience in software development Looking forward to hear from [url removed, login to view]!

$100 USD dalam 3 hari
(2 Ulasan)
1.9
zuiguanglong

A proposal has not yet been provided

$231 USD dalam 3 hari
(3 Ulasan)
1.9
mmallis87

A proposal has not yet been provided

$133 USD dalam 5 hari
(2 Ulasan)
0.8
mtby

I have experience with both c and java. I would convert it on my own, not using converter. I would deliver clean code.

$150 USD dalam 5 hari
(0 Ulasan)
0.0
k122156

A proposal has not yet been provided

$188 USD dalam 3 hari
(0 Ulasan)
0.0
hz89gp23n

A proposal has not yet been provided

$111 USD dalam 5 hari
(0 Ulasan)
0.0
ajaykumar112792

i can do this job. -------------------------------------------------------------------------------------------------------

$150 USD dalam 3 hari
(0 Ulasan)
0.0
swaaminathan93

A proposal has not yet been provided

$61 USD dalam 3 hari
(0 Ulasan)
0.0
WhatTechnologies

A proposal has not yet been provided

$193 USD dalam 5 hari
(0 Ulasan)
0.0
mistrzszefow

I have already made couple of cryptographic( random number generators from git repository) and digital signal processing programs in java and C so I think that I am one of the best candidates for this program. I hope m Lagi

$166 USD dalam 3 hari
(0 Ulasan)
0.0