Find Jobs
Hire Freelancers

Convert C program to Java

$30-250 USD

Terminado
Publicado hace más de 8 años

$30-250 USD

Pagado a la entrega
Need the following C code converted into a Java library [login to view URL] This c++ to Java converter may help you [login to view URL] 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 [login to view URL] 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( [login to view URL](), [login to view URL]()); AliceResult res2 = computeAlice( [login to view URL](), [login to view URL](), [login to view URL]() ); boolean keysMatch= [login to view URL]().equals( [login to view URL]() ); ** 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.
ID del proyecto: 8392777

Información sobre el proyecto

17 propuestas
Proyecto remoto
Activo hace 9 años

¿Buscas ganar dinero?

Beneficios de presentar ofertas en Freelancer

Fija tu plazo y presupuesto
Cobra por tu trabajo
Describe tu propuesta
Es gratis registrarse y presentar ofertas en los trabajos
Adjudicado a:
Avatar del usuario
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 problem for me. Thank you in advance
$80 USD en 3 días
5,0 (48 comentarios)
5,5
5,5
17 freelancers están ofertando un promedio de $162 USD por este trabajo
Avatar del usuario
A proposal has not yet been provided
$252 USD en 3 días
5,0 (95 comentarios)
7,0
7,0
Avatar del usuario
A proposal has not yet been provided
$166 USD en 5 días
4,9 (91 comentarios)
5,4
5,4
Avatar del usuario
A proposal has not yet been provided
$55 USD en 3 días
4,8 (50 comentarios)
4,8
4,8
Avatar del usuario
A proposal has not yet been provided
$231 USD en 3 días
4,9 (9 comentarios)
4,1
4,1
Avatar del usuario
I have read and fully understood your requirements.. Please open chat to discuss further… _____________________-----------------------------------_____________________________------------------
$277 USD en 3 días
4,7 (8 comentarios)
3,7
3,7
Avatar del usuario
Предложение еще не подано
$188 USD en 5 días
4,9 (5 comentarios)
2,5
2,5
Avatar del usuario
A proposal has not yet been provided
$133 USD en 5 días
5,0 (3 comentarios)
1,4
1,4
Avatar del usuario
A proposal has not yet been provided
$188 USD en 3 días
0,0 (0 comentarios)
0,0
0,0
Avatar del usuario
A proposal has not yet been provided
$193 USD en 5 días
0,0 (0 comentarios)
0,0
0,0
Avatar del usuario
i can do this job. -------------------------------------------------------------------------------------------------------
$150 USD en 3 días
0,0 (0 comentarios)
0,0
0,0
Avatar del usuario
A proposal has not yet been provided
$111 USD en 5 días
0,0 (0 comentarios)
0,0
0,0
Avatar del usuario
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 en 5 días
0,0 (0 comentarios)
0,0
0,0
Avatar del usuario
A proposal has not yet been provided
$61 USD en 3 días
0,0 (0 comentarios)
0,0
0,0

Sobre este cliente

Bandera de UNITED KINGDOM
Loughton, United Kingdom
5,0
34
Forma de pago verificada
Miembro desde ago 23, 2005

Verificación del cliente

¡Gracias! Te hemos enviado un enlace para reclamar tu crédito gratuito.
Algo salió mal al enviar tu correo electrónico. Por favor, intenta de nuevo.
Usuarios registrados Total de empleos publicados
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Cargando visualización previa
Permiso concedido para Geolocalización.
Tu sesión de acceso ha expirado y has sido desconectado. Por favor, inica sesión nuevamente.