How to generate g and p for DH safely on Arduino Nano

177 Views Asked by At

I want to make a DH Key exchange with a PC and an Arduino. I want to generate a Prime p and a Base g on the Arduino that should be 2048 Bits long.

1

There are 1 best solutions below

0
On

You don't generate p and g.

They are specified by the Diffie-Hellman group choice.

You only need to generate a random integer in the range of zero to the group mod-1.