4 ms·
I realise this is a for-educational-purposes project, but I'm not sure what makes it "Modern". It's possible to make something slightly more practical if you j
by Retr0id 5y ago
I realise this is a for-educational-purposes project, but I'm not sure what makes it "Modern".
It's possible to make something slightly more practical if you just xor bytes together. Just like the implementation in the article, this has obvious malleability issues - flip a bit in the key, you flip the corresponding bit in the plaintext.
To fix this, you need authentication too, such as an HMAC.
If we assume the sender and the recipient both have a pre-shared blob of random bytes, from which they use subsections as keys, then you also need some protocol to ensure that key material is never reused.
- _hiv8 5y agoFeb 1, we use pad 1, Feb 2, we use pad 2, etc. It's really simple. We can do it on paper with a pencil. This is what scares governments. The difficult part is distributing the pads and ensuring that no one else has seen them.
- ttyprintk 5y agoWhat I did several years ago is coordinate pads between phones by hand. A pretty-dense QR code can pass something like 1400 bytes. Two people who see each other regularly could do this. Long-distance arrangements take a bit more thought.
- Retr0id 5y agoThat doesn't work. What if someone intercepts and/or spoofs messages?