Re:Web Fonts Performance: Making Pretty, Fast
by ConstantineXVI on Wednesday September 12, 2012 @08:31PM
(#4514097)
I thought of an evil hack w/ web fonts the other day. Seems it'd be fairly simple to use randomly re-sorted fonts (where characters are mapped to improper code points) as a kind of one-time-pad to jam HTML scrapers or surveillance of the line. The user's browser would get the appropriate font and be able to read the text; anyone reading the raw HTML would get gibberish, forcing anyone trying to extract the data to use OCR. Obviously this would kill your site for search engines, screen readers, etc., so the only use would be if you're seriously paranoid about your data getting scraped, and only then if the scraper had limited resources (the NSA, etc. can probably spare a few cycles for OCR).
[ Parent
| on HN ]
Re:Web Fonts Performance: Making Pretty, Fast
by mistercow on Wednesday September 12, 2012 @09:31PM
(#4514300)
That wouldn't be a one-time pad. It would be a substitution cipher. Substitution ciphers are extremely simple to break.
I don't think there is any way to implement an actual OTP with a font, but you could use the font as a code book, where each character in the cipher text goes to a random unique code point, with the font duplicating each character many times.
Re:Web Fonts Performance: Making Pretty, Fast
by riobard on Wednesday September 12, 2012 @09:20PM
(#4514254)
That's silly. Simple frequency analysis would defeat this, no OCR required.
Re:Web Fonts Performance: Making Pretty, Fast
by sratner on Thursday September 13, 2012 @02:58AM
(#4515092)
Strength of "encryption" notwithstanding, it was a fun exercise: https://github.com/simonratner/fontcrypt
Perhaps of some use to those annoying coupon code sites that go to great lengths to prevent copying of the coupon code in order to funnel users through their affiliate link. [Edit: To be an inconvenience to scrapers, you'd want to generate a random font per session.]