0
$\begingroup$

As I look upon Burmester Desmedt algorithm:

enter image description here

I notice that the intermediate key $K_i$ is getting calculated as:

$K_i=(k_{i+1}/k_{i-1})^{x_i} \mod p$

Thus I wonder wheher the division $k_{i+1}/k_{i-1}$ should result an integer of a floating point number.

$\endgroup$

1 Answer 1

3
$\begingroup$

Thus I wonder whether the division $k_{i+1}/k_{i-1}$ should result an integer of a floating point number.

An integer.

Specifically, this computation is done modulo $p$; that is, the result of this division is the value $d$ such that $d \cdot k_{i-1} \equiv k_{i+1} \pmod p$.

One way to find this $d$ is to compute the multiplicative inverse of $k_{i-1}$ modulo $p$ (for example, using the Extended Euclidean algorithm, and then multiply that inverse with $k_{i+1}$ (again, modulo $p$)

$\endgroup$
4
  • $\begingroup$ What I actually do is I permform the division with OpenSSL's BigInt so I wanted to clarify wheher is this way to go. $\endgroup$ Commented Feb 13, 2019 at 19:01
  • 3
    $\begingroup$ @DimitriosDesyllas: you mean BN_div? No, that's wrong; you need to do division in the field $\mathbb{Z}_p$, not in the ring $\mathbb{Z}$ (rounded down). Instead, see BN_mod_inverse and BN_mod_mul $\endgroup$
    – poncho
    Commented Feb 13, 2019 at 19:32
  • $\begingroup$ So I calculate inverse of the $k_{i-1}$ with BN_mod_inverse And then I multiply it with BN_mod_mul? $\endgroup$ Commented Feb 13, 2019 at 20:58
  • 2
    $\begingroup$ @DimitriosDesyllas: by George, I think you've got it... $\endgroup$
    – poncho
    Commented Feb 13, 2019 at 21:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.