Private keys: A = (55, 119), B = (133, 221). Ciphertext for B: C = 62. For authentication A uses its private key (55, 119), giving 73.
Step 1: A's private key (e = 7, n = 119)
\[119 = 7 \times 17,\quad \phi(n) = 6 \times 16 = 96\]
Find d with \(7d \equiv 1 \pmod{96}\): \(7 \times 55 = 385 = 4 \times 96 + 1\), so \(d_A = 55\).
Step 2: B's private key (e = 13, n = 221)
\[221 = 13 \times 17,\quad \phi(n) = 12 \times 16 = 192\]
Find d with \(13d \equiv 1 \pmod{192}\): \(13 \times 133 = 1729 = 9 \times 192 + 1\), so \(d_B = 133\).
Step 3: Confidentiality: A encrypts m = 10 with B's public key (13, 221):
\[C = 10^{13} \bmod 221\]
\(10^2 = 100\), \(10^4 = 10000 \bmod 221 = 55\), \(10^8 = 55^2 = 3025 \bmod 221 = 152\).
\[10^{13} = 10^8 \cdot 10^4 \cdot 10\]
\(152 \times 55 = 8360 \bmod 221 = 183\); \(183 \times 10 = 1830 \bmod 221 = 62\).
\[C = 62\]
B decrypts with \(62^{133} \bmod 221 = 10\).
Step 4: Authentication: to prove the message came from A, A encrypts (signs) with its own private key (d = 55, n = 119):
\[S = 10^{55} \bmod 119 = 73\]
B verifies with A's public key: \(73^{7} \bmod 119 = 10\). Only A knows 55, so B knows A sent it. (For both secrecy and authentication, A first signs with (55, 119) and then encrypts the result with B's public key (13, 221).)