You are not logged in.

#1 2013-10-15 00:46:16

ParanoidAndroid
Member
Registered: 2012-10-14
Posts: 114

Braille Unicode crypto idea

So I'm a crypto freak and I've hit upon an idea to mask one's activities. It requires a lot of work, but I'm pursuing this as a personal project for fun, so please don't point out how useless it is. That's not the point. The journey is what matters.

Okay, so here's the idea: I need to take characters (abcde etc) and map them arbitrarily to braille symbols. That is, when I type abcde in urxvt, they should show up as braille symbols I have chosen and mapped to those letters. Additionally, this should apply to my whole system, so conky would display it's text in braille characters mapped to regular letters, for example. This is so that anyone trying to read the screen, even if they knew braille symbols, would be unable to make sense out of it unless they knew what letters were mapped to what symbols.

The problem is:
a) how does one map individual unicode characters to individual keys?
and
b) urxvt won't render the ubraille-ttf font properly. I get monospaced regular characters instead, and I'm not sure why.

Anybody know how this could be implemented?

Offline

#2 2013-10-15 01:42:28

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,198

Re: Braille Unicode crypto idea

How would mapping them to individual keys help? That is, I assume you want the system to give you a file listing when you type ls, say, and not complain the command is unknown. Also, you want output ciphered as well, right? So I'm not clear about the point of mapping characters to keys.

Wouldn't it be simpler to create a custom font containing permutated Braille glyphs in the various slots for the letters of the alphabet and to then use that as your system font? (Assuming you can get them to render properly, of course.)

Why Braille characters? This strikes me as just making it difficult to learn the cipher. (Braille is designed to be easy to read by touch but I imagine it is at least more difficult to read by sight.) Since your cipher will lose the nuances of Braille anyway (as I understand it - which isn't much - it is not a 1:1 mapping of letters/numbers to Braille characters), why not pick something you'll find easier to learn to read on screen?

[And for the record, yes, this is pointless.]


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#3 2013-10-15 02:19:04

ParanoidAndroid
Member
Registered: 2012-10-14
Posts: 114

Re: Braille Unicode crypto idea

I didn't know I could do such a thing. Your approach sounds much better. How would that be done? I don't have much experience with fonts beyond installing them.

And to answer your question as to why braille... it was the first thing I thought of. It's outrageously hard to read unless you spend an inordinate amount of time learning it, plus I think it would look interesting. Also, I'd rather not create an entire font from scratch... I don't know how. That's really it. This isn't likely to turn out to be a long-term thing, I just thought I'd see if it was even possible. This is the kind of odd thing I do when I'm bored: come up with nutty ideas and test them for fun.

Also, I still can't get the ubraille unicode font to render on urxvt hmm

Offline

#4 2013-10-15 02:23:42

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: Braille Unicode crypto idea

Pick another language that has a font that renders in urxvt and use that: it will have the same effect.


[Note: this post is not an endorsement of this harebrained scheme smile ]


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#5 2013-10-15 02:46:55

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,198

Re: Braille Unicode crypto idea

If, hypothetically, you really wanted to do this, I would recommend experimenting with fontforge. Find a font which renders OK but uses something other than English characters and just swap glyphs around. You don't need to touch anything else. Well, if you wanted it to look pretty, you would need to do more but I'm guessing that's not a high priority. To ensure legibility (hah!) pick something monospaced - assuming they make monospaced fonts for languages which use other alphabets. That will ensure that all your glyphs still fit in their bounding boxes after you've switched them.

[Again: this is not something I recommend actually doing.]

EDIT: You should obviously choose a font with a licence which permits this.

Last edited by cfr (2013-10-15 02:48:07)


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#6 2013-10-15 04:26:54

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: Braille Unicode crypto idea

I became curious about this thread and installed the font that you mentioned before. It doesn't render anywhere for me. Does it work for you in any application?

By the way, a whole bunch of us got knowledgeable about stuff doing exactly what you're doing. I'm already a fan of this even though it won't be useful to me.

Last edited by skottish (2013-10-15 04:27:29)

Offline

#7 2013-10-15 14:50:54

ParanoidAndroid
Member
Registered: 2012-10-14
Posts: 114

Re: Braille Unicode crypto idea

Thank you, Skottish. This is how I got as far as I have - I thought of something wierd and thought, "How could this be implemented?" That got me from an Ubuntu user who didn't know one end of a command-line from the other to a user who built, configured, and understands the vast majority of his system.

To answer your question, no, it doesn't render on any application I have. I thought it might be because my locale is set to US unicode, but that doesn't seem to affect anything.

This idea is stupid and practically useless, I'm well aware of that. That being said, I want to pursue it both to learn and just to see if it can be done.

@Cfr,
In my earlier post, I mentioned arbitrarily mapping the characters of a given font to letters in English script. In other words, I assign a braille symbol to A, and my system renders A as that symbol. Is that what you're suggesting, by use of fontforge?

Also, no other font I've tried - Japanese, Armenian, Hebrew, Arabic - for another language has rendered as anything other than English characters in some kind of bizzare widely-spaced font. Does anyone know why that is? Google can't give me an answer.

Offline

#8 2013-10-15 17:03:33

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: Braille Unicode crypto idea

ParanoidAndroid wrote:

Also, no other font I've tried - Japanese, Armenian, Hebrew, Arabic - for another language has rendered as anything other than English characters in some kind of bizzare widely-spaced font. Does anyone know why that is? Google can't give me an answer.

That's rxvt's default font used for fallback. It isn't finding the font you are trying to set.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#9 2013-10-15 19:40:08

ParanoidAndroid
Member
Registered: 2012-10-14
Posts: 114

Re: Braille Unicode crypto idea

I still can't get it to render. Japanese and braille both register now, but typing produces english characters. I'm assuming that this is because my keyboard does not produce japanese keycodes that correspond to the font glyphs. Same probably goes for braille. Is there a way around this? Is there a way to map braille or japanese or other glyphs to U.S. keycodes?

Offline

#10 2013-10-15 20:01:15

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: Braille Unicode crypto idea

ttf-ubraille seems to be not rendering because of where it lies on the Unicode table:

This is probably the first free unicode Braille font in the world.
It contains braille glyphs in the Unicode range of 0x2800 - 28FF only.
I used Linux and pfaedit editor to create this font and UCS bitmap
fonts to verify the glyph shapes. It can be used in yudit and other
unicode editors to display braille texts.

There are other free braille fonts to be found by a quick search.

Last edited by skottish (2013-10-15 20:07:56)

Offline

#11 2013-10-15 23:26:21

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,198

Re: Braille Unicode crypto idea

ParanoidAndroid wrote:

I still can't get it to render. Japanese and braille both register now, but typing produces english characters.

But this is what you want. Otherwise your system will be unusable because, for example, you will have no way of asking bash to execute the 'ls' command (since 'l' and 's' on your keyboard will send something else to the system).

I'm assuming that this is because my keyboard does not produce japanese keycodes that correspond to the font glyphs. Same probably goes for braille. Is there a way around this? Is there a way to map braille or japanese or other glyphs to U.S. keycodes?

I don't completely understand this myself but I think you are mistaken about what you want.

What you want is to type 'ls', say, and for the command 'ls' to be executed - i.e. the system gets the keycodes for 'l' and 's' - but for the glyphs rendered to be different. The easiest way I can think of to do that is to use a font which just has completely different glyphs in the relevant slots. That's what customising your own font would let you do. You take the glyphs and put them in the slots you want. So if the only issue with the Braille font you've got is that it uses a different unicode block, that's not a problem. Make a copy, open it up and copy the glyphs you want into the slots for 'A', 'B', ... 'a', 'b',...

That is, what you want is for the correct keycodes to be sent but for it to look on screen as if something quite different has been sent. Using a scrambled font should let you do that, I think. To put this another way, you tell the system to use a particular version of 'A', say, when you tell it to use a certain font. That is, you tell it to use this picture for 'A'. All you want to do is tell it to use a picture which is really different for 'A'. But the system won't care - it's just a picture. That way, typing 'A' will still _mean_ A. But what appears on screen will not look to _humans_ like 'A'. It will be an 'A' to your system because your font will tell it that's what A looks like. But that's fine. You are not trying to hide the fact that it is an A from your system - only from human eyes.

Last edited by cfr (2013-10-15 23:30:19)


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#12 2013-10-16 09:29:05

n0rv
Member
Registered: 2012-02-27
Posts: 50

Re: Braille Unicode crypto idea

ParanoidAndroid wrote:

The problem is:
a) how does one map individual unicode characters to individual keys?
and
b) urxvt won't render the ubraille-ttf font properly. I get monospaced regular characters instead, and I'm not sure why.

Anybody know how this could be implemented?

How about making your own font? Converting ubraille-ttf to some bitmap font should not be complicated, I think... Fontforge package form repo may be helpful.

Last edited by n0rv (2013-10-16 09:32:00)

Offline

#13 2013-10-16 13:34:50

clfarron4
Member
From: London, UK
Registered: 2013-06-28
Posts: 2,175
Website

Re: Braille Unicode crypto idea

I am going to ask one thing here: How are you planning to get around language statistics?


Claire is fine.
Problems? I have dysgraphia, so clear and concise please.
My public GPG key for package signing
My x86_64 package repository

Offline

#14 2013-10-16 14:14:52

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,547
Website

Re: Braille Unicode crypto idea

clfarron4 wrote:

I am going to ask one thing here: How are you planning to get around language statistics?

I think the first post clarified this a little, though I don't think the title fits with the first post.  OP, perhaps a title revision would help keep this on the topic you seem to want to discuss which is purely aesthetic and does not have any cryptographic component.

What you describe is slightly less effective as a cryptographic system than a rot-13 encoding (which is to say it is not remotely effective).  But if you just want to have fun changing the aesthetics of your system's display/output, then by all means go for it - but this does not match the thread title.

EDIT: one would not even to use statistical analysis to "decrypt" the desired system.  All they'd need to do is change the font back to something more typical - there is no encryption of data being discussed here, simply a different aesthetics of the UI.

Last edited by Trilby (2013-10-16 14:16:27)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#15 2013-10-16 14:58:46

alphaniner
Member
From: Ancapistan
Registered: 2010-07-12
Posts: 2,810

Re: Braille Unicode crypto idea

I don't understand why rot-13 is encryption but replacing every alphabetic character with a random braille character is not encryption.


But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner

Offline

#16 2013-10-16 16:01:34

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,547
Website

Re: Braille Unicode crypto idea

alphaniner wrote:

I don't understand why rot-13 is encryption but replacing every alphabetic character with a random braille character is not encryption.

First I never suggested it was.  I said the approach discussed in this thread would be *even less effective* as encryption than rot-13 ... which itself is completely ineffective.

However I could see an arguement for rot13 actually being encryption (though very weak) as files can be 'coded' via a rot13 algorythm.  The method discussed in this thread, in contrast, does not make *any* change to underlying data: the files are not coded in any way, only the display is changed.

Last edited by Trilby (2013-10-16 16:02:04)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#17 2013-10-16 16:25:01

alphaniner
Member
From: Ancapistan
Registered: 2010-07-12
Posts: 2,810

Re: Braille Unicode crypto idea

According to wikipedia rot13 is considered [riduculously weak, almost pointless] encryption. In any case, if a message on a piece of paper can be encrypted with rot13, then the characters on a display would be "encrypted" with PA's braille scheme. The underlying data is completely OT.


But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner

Offline

#18 2013-10-16 17:34:30

ParanoidAndroid
Member
Registered: 2012-10-14
Posts: 114

Re: Braille Unicode crypto idea

@Trilby,
You're quite right this has nothing to do with mathematical encryption. I meant that if you arbitrarily map characters to render as braille or japanese or whatever other script, it becomes impossible for anyone except the one who engineered the font to have a clue what the display contents are. Thus, if one is typing out a subversive communication, an annoying busybody peering obtrusively over one's shoulder cannot read the message. This is not crypto, strictly speaking. It's more similar to obfuscated code or DaVinci's mirror writing than any kind of mathematical cypher. So yes, I think you have a point, the title should be changed. I can't think of a better way to phrase it, though. Ideas, anyone?

@N0rv,
A custom font is exactly what I need. I tried fontforge and attempted to make a font from scratch (I created an alphabetic script for a language I developed once, and intended to use that). However, it proved to be wholly beyond me, even with the documentation. I just can't figure out how to get the damn thing to draw the precise shapes I need. There's a reason I don't use a mouse... I think I'll go with cfr's idea of glyph substitution, which seems to me much simpler.

@cfr,
good point. I guess I wasn't phrasing my question right. That is exactly what I want: the system to render the english script I type in as something radically different.

I'm unsure if braille is a good font for this, actually. I downloaded another TTF braille font and it rendered. It looked extremely alien and nifty, but it's not really legible on a dense text display. lscpu's output, for example, was entirely unintelligible even if I had taught myself to read the braille characters. Anyone know of a suitably readable font to use? Hebrew looks pretty alien and tech-y if it's rendered right.

Offline

#19 2013-10-16 23:15:35

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,198

Re: Braille Unicode crypto idea

It all depends what you want, I guess. I mean you could use anything - 26 differently coloured squares (or 52 with capitals), runes, hieroglyphics etc. or something from Middle Earth, perhaps?


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

Board footer

Powered by FluxBB