r/cryptography • • 10d ago

algorithm replicating

if i have secure implementation of algorithm in 1 language and i wana port it to other language and they dont have compiler is there secure way to do it?

0 Upvotes

11 comments sorted by

View all comments

4

u/ReplacementCool4049 10d ago

This is what people don't get about these projects. The algorithm is the easy part. Constant-time execution is the hard part. In my experience GC and JIT runtimes will leak timing info no matter how careful your code is. That's your real problem, not the port.

1

u/rvg0291 9d ago

what if algorithm dont needs to be time leak prof? will just rewriting it line by line be enough?

1

u/Natanael_L 9d ago

Do you only need to import data and successfully decrypt, or do you need to actually deploy something secure and interactive? If the former then maybe, if the latter then no it's not enough

1

u/rvg0291 9d ago

i wana use same library for all cryptocryptography since i think its easyer to fix single lib for all languages and more portable but most implementations isint portable enough and also i need to use it in sat solver so i need it to work in language wich can be easyly converted into sat solvable format with lib itself turning into sat solvable format too

1

u/Natanael_L 9d ago

You're going the wrong direction then. You should pick implementations that fit a SAT solver (because those aren't practical unless constraints and properties are very well defined) and then port them to whatever your target system is.

1

u/rvg0291 9d ago

i tryed finding but its realy hard to find them