**1 Answer**

written 13 months ago by | • modified 13 months ago |

**Solution:**

The Diffieâ€“Hellman (DH) Algorithm is a key-exchange protocol that enables two parties communicating over a public channel to establish a mutual secret without it being transmitted over the Internet.

D-H enables the two to use a public key to encrypt and decrypt their conversation or data using symmetric cryptography.

Number the joints from 1 ton starting with the base and ending with the tool Yaw, pitch and roll in that order

Assign a right-handed orthonormal coordinate frame L0 to the robot base, making sure that $\mathrm{z}^0$ aligns with the axis of joint 1. Set $\mathrm{k}=1$.

Align I with the axis of joint k+l.

Locate the origin of $\mathrm{L}$, at the intersection of the $\mathrm{i}$ and $\mathrm{i} \cdot 1$ axes. If they do not intersect, use the intersection of zk with a common normal between i and $\mathrm{i} \cdot 1 \cdot$

Select x " to be orthogonal to both $\mathrm{i}$ and $z \mathrm{k}-\mathrm{i}$ If $\mathrm{i}$ and $\mathrm{i}-1$ are parallel, points away from $z^{k-1}$

Select $\mathrm{y}^{\mathrm{k}}$ to form a right-handed orthonormal coordinate frame Lk. Set

$\mathrm{k}=\mathrm{k}+1$. If $\mathrm{k}\lt\mathrm{n}$, go to step 2 ; else continue.

Set the origin of $\mathrm{L}$, at the tooltip. Align $\mathrm{zn}$ with the approach vector, $\mathrm{y}$ with sliding vector, and $\mathrm{x}$ "with the normal vector of the tool. Set $\mathrm{k}=1$.

Locate point b k at the intersection of the x k and $\mathrm{z}^{\mathrm{k}-1}$ axes. If they do not intersect, use the intersection of $\mathrm{x}$ " with a common normal between $\mathrm{xk}$ and $\mathrm{i} \cdot 1$.

Compute as the angle of rotation from xk-1 to xk measure dba out $\mathrm{zk} \cdot 1$.

Compute $\mathrm{d}^{\mathrm{k}}$ as the distance from the origin of frame $L^{\mathrm{k}-1}$ to point bk measured along $\mathrm{i} \cdot 1 \bullet$

Compute $a^{\mathrm{k}}$ as the distance from point $b \mathrm{k}$ to the origin of frame Lk measured along $\mathrm{x}^{\mathrm{k}}$.

Compute $\mathrm{a}^{\mathrm{k}}$ as the angle of rotation from $\mathrm{z}^{\mathrm{k}-1}$ to z ${ }^{\mathrm{k}}$ measured about $x^{\prime \prime}$,

Set $\mathrm{k}=\mathrm{k}+\mathrm{I}$. If $\mathrm{k} \mathrm{s} \mathrm{n}$, go to step 8; else, stop.