Post subject: Program search: Cryptology
Joined: 8/31/2004
Posts: 298
Location: Falun, Sweden
Hi. My question awoke one day as I was writing a text on my computer and thought about the possabilaty to somehow run my text through a program that changes every letter to another letter of my choise. I've googled for some program to do this but I can't seem to find one that fitts my needs. I've had in mind someway of inputting what every letter should be changed to myself so that only I can un-crypt the text or someone I've choosen to tell how to sett the letters. Now is my question, does anyone know of a program that can do this?
Bein' away for like five years, and not a single new post in the ZSNES forum... :'-(
Editor, Expert player (2073)
Joined: 6/15/2005
Posts: 3282
I think you can easily program it yourself. It's not that hard. I hope you aren't so serious about your cryptology needs. The reason why no such program exists on the internet is because the code is way too easy to break with modern technology.
SXL
Joined: 2/7/2005
Posts: 571
(if I understood it correctly) the most famous Caesar's cipher (breaking included) is rot13, usenet's most famous "crypting" method. it's not a real protection for your data, better used to hide spoilers. nowadays, (paranoid ? j/k) people rather use PGP, a much more robust crypting system.
I never sleep, 'cause sleep is the cousin of death - NAS
nesrocks
He/Him
Player (246)
Joined: 5/1/2004
Posts: 4096
Location: Rio, Brazil
It's extremely easy to "decrypt" your text if all you do is change letter by letter.
Former player
Joined: 8/1/2004
Posts: 2687
Location: Seattle, WA
FODA wrote:
It's extremely easy to "decrypt" your text if you encrypt it.
There you go. Fixed. Almost anyone with a few years of advanced programing will be able to break any encryption, given a little bit of time and energy. The safest method of encryption is when the sender and receiver use two different decryption methods that only their respective sides know. Complex, yes, and I won't try to remember how it works for fear of messing it up and looking like a fool on the internet.
hi nitrodon streamline: cyn-chine
Joined: 11/11/2004
Posts: 400
Location: ::1
Zurreco wrote:
FODA wrote:
There you go. Fixed. Almost anyone with a few years of advanced programing will be able to break any encryption, given a little bit of time and energy. The safest method of encryption is when the sender and receiver use two different decryption methods that only their respective sides know.
The safest method of encryption (and in fact pretty the only one that's provably safe, at least if implemented correctly) is the one-time pad. Of course, given that you have to have a truly random key of the same size as the message you want to send that cannot be reused, it's not typically useful - but it does have its applications, for example if you know that you will have to communicate with someone else in a safe way in the future. Other safe methods of encryption probably exist, but it's easy to prove that in order to be safe, the amount of possible keys has to be equal to or larger than the amount of possible messages (which typically means that keys have to be at least as long as messages), so there's no advantage to be gained over a one-time pad. All methods of encryption that don't satisfy this requirement (in particular, all methods that we actually use) are unsafe - at least theoretically. Whether they can be broken in practice is another matter, of course, but one shouldn't underestimate advances in theory for that - the usual quotes along the lines of "it would take millions of years to break this even if you used all the computers in the world in parallel" only make sense if you assume that noone's gonna come up with new tricks in the future. ^_~ But they're pretty much the best we have, so if you (the original poster) want good encryption, you should probably use GPG or something similar.
Post subject: Re: Program search: Cryptology
Player (36)
Joined: 9/11/2004
Posts: 2630
Mazzic wrote:
Hi. My question awoke one day as I was writing a text on my computer and thought about the possabilaty to somehow run my text through a program that changes every letter to another letter of my choise. I've googled for some program to do this but I can't seem to find one that fitts my needs. I've had in mind someway of inputting what every letter should be changed to myself so that only I can un-crypt the text or someone I've choosen to tell how to sett the letters. Now is my question, does anyone know of a program that can do this?
perl crypt.pl <filename> Where filename is the file you want to encrypt. Again, it's not secure at all. I can break one of these by hand in about an hour.
#!/usr/bin/perl -W

use strict;

my $output = "";

$ARGV[0] or die;



open (TEXT, $ARGV[0]) or die;

while (<TEXT>) {
  $_ =~ tr/A-Z/a-z/;
  $_ =~ tr/abcdefghijklmnopqrstuvwxyz/veldtjynxgrimpswaqfzhobuck/; #replace veldtjynx etc. with your key.
  $output .= $_;
}

$output =~ s/[\W_]//g;
$output =~ s/(.{5})/$1 /g;

print $output."\n";
Build a man a fire, warm him for a day, Set a man on fire, warm him for the rest of his life.
Player (36)
Joined: 9/11/2004
Posts: 2630
SXL wrote:
nowadays, (paranoid ? j/k) people rather use PGP, a much more robust crypting system.
I thought PGP got shut down and now all the good paranoids used GPG...
Build a man a fire, warm him for a day, Set a man on fire, warm him for the rest of his life.
Post subject: Re: Program search: Cryptology
Joined: 4/16/2005
Posts: 251
OmnipotentEntity wrote:
#!/usr/bin/perl -W

use strict;

my $output = "";

$ARGV[0] or die;



open (TEXT, $ARGV[0]) or die;

while (<TEXT>) {
  $_ =~ tr/A-Z/a-z/;
  $_ =~ tr/abcdefghijklmnopqrstuvwxyz/veldtjynxgrimpswaqfzhobuck/; #replace veldtjynx etc. with your key.
  $output .= $_;
}

$output =~ s/[\W_]//g;
$output =~ s/(.{5})/$1 /g;

print $output."\n";
Keep in mind that this one destroys information about spaces, case and non letter characters. A version that preserves those is:
#!/usr/bin/perl -pi.orig
  tr/a-zA-Z/veldtjynxgrimpswaqfzhobuckVELDTJYNXGRIMPSWAQFZHOBUCK/
(Not as many error checks, but you get the idea)
Joined: 8/31/2004
Posts: 298
Location: Falun, Sweden
Let me explain my reasons for this reques. I am aware that it is extremly easy to decrypt one of those text but that is using a compuret. Changing letter by letter in a text that you have printed out and then hand to someone else hwo knows what to do makes the text you've written much more secure. You see, I have an interest in LARP where all kinds och text cirkel around. Using one of theese basic encryptions is verry effektive if a person gets his hands on this text without any possabilaty to get to a computer. Breaking one just using pen and papper takes a while and usually you can't afford that while. Get it? Edit: And one thing. Programing ain't my thing. I don't get anything from those codes, nor would I be able to program something like that myself.
Bein' away for like five years, and not a single new post in the ZSNES forum... :'-(
Player (36)
Joined: 9/11/2004
Posts: 2630
At the end of Cryptonomicon there's a system that may interest you. It involves a deck of cards. Python code of the algorithm A description for implimenting this by hand with a deck of cards.
Build a man a fire, warm him for a day, Set a man on fire, warm him for the rest of his life.
nesrocks
He/Him
Player (246)
Joined: 5/1/2004
Posts: 4096
Location: Rio, Brazil
you don't need a computer to decrypt a text where the person simply changes letter by letter. If the text is long enough (maybe 2 or 3 sentences?) depending on the IQ of the person, one can decrypt it with a pencil and paper, or just by looking at it.
Joined: 4/16/2005
Posts: 251
If you want to use it on field there's a simple method to ensure that your messages are virtually unbreakable. - get some book you know the recipient has - encode your message by searching each letter from a random page, and writing down page, line, and position of the letter. - tell the recipient the method and book. - on field even if others get the encoded message into their hands and know the procedure, without the book there's no chance to break it, and which larper has a library in his backpack? (note: if you encode your message without encoding the same letter twice with the same code, by using different pages for examples, this is equal to the one time pad described earlier) If you want your larpers to decode the message at some point, use a newspaper or something cheap as key, and if you are mean you can hand it to them wordlessly and see if they figure it out on their own.
Player (36)
Joined: 9/11/2004
Posts: 2630
Not equal, but close enough if all you want to do is stop LARPers. (Heck, even the Solitare crypt is infinitely far from a one time pad)
Build a man a fire, warm him for a day, Set a man on fire, warm him for the rest of his life.
Joined: 11/11/2004
Posts: 400
Location: ::1
OmnipotentEntity wrote:
At the end of Cryptonomicon there's a system that may interest you. It involves a deck of cards. Python code of the algorithm A description for implimenting this by hand with a deck of cards.
As Bruce points out on that page, this one's flawed. But OK, if you only want to stop LARPers, it's probably still sufficient... :)
Player (206)
Joined: 5/29/2004
Posts: 5712
Wait, I'm lost. When did we start talking about Live Action Role Playing?
put yourself in my rocketpack if that poochie is one outrageous dude
Joined: 8/31/2004
Posts: 298
Location: Falun, Sweden
I like those methods you people suggested. I'm realy going to use some of those in the future. Thanks for using some of your time for this topic. I know it haven't made the world richer but you sure helped me. ;)
Bein' away for like five years, and not a single new post in the ZSNES forum... :'-(
Player (206)
Joined: 5/29/2004
Posts: 5712
Hey, are you still going to finish that Little Samson run, or should somebody else give it a try?
put yourself in my rocketpack if that poochie is one outrageous dude
Joined: 8/31/2004
Posts: 298
Location: Falun, Sweden
I'll finish it but I've had a hole in my productionfase due to personal issues. I'll carry on working with it soon, I promisse. ;)
Bein' away for like five years, and not a single new post in the ZSNES forum... :'-(
Joined: 11/19/2005
Posts: 25
if you are interested in some of the basics you might want to check books on cryptography or discrete mathematics.