Type text to see how computers represent it at the byte level. Hover the 0x badges for tips.
For each character, we split the 8-bit binary into two nibbles and map them to hex.
| Decimal | Binary (4-bit) | Hex |
|---|
XOR is reversible: C = P XOR K and P = C XOR K. Try a one-character key first.
Same operation decrypts it because XOR is its own inverse.
Two parties agree on a public prime p and generator g. They keep private secrets a and b, exchange public values, and derive the same shared key: K = g^{ab} mod p.
Choose small primes p and q to build n=p·q and φ=(p−1)(q−1), pick e coprime with φ, compute d ≡ e⁻¹ (mod φ), then encrypt/decrypt m with c=m^e mod n, m=c^d mod n.
0x41 = decimal 65 = 01000001.