443,890 Members | 1,226 Online
Need help? Post your question and get tips & solutions from a community of 443,890 IT Pros & Developers. It's quick & easy.

# Encryption algorithm that returns only lowercase encrypted string

 P: n/a I would like to know if there is a encryption algorithm that returns only lowercase encrypted string. Thanks in advance. Mar 20 '07 #1
15 Replies

 P: n/a What you could do is take the encrypted bytes (using any encryption algorithm) and then manually convert them to a base 26 representation (or a base 36 if you are going to allow numbers) and then use all lowercase letters in that scenario. I have to ask though, why do you want to do such a thing? -- - Nicholas Paldino [.NET/C# MVP] - mv*@spam.guard.caspershouse.com "Optimus" I would like to know if there is a encryption algorithm that returns only lowercase encrypted string. Thanks in advance. Mar 20 '07 #2

 P: n/a On 19 Mar 2007 19:48:50 -0700, "Optimus" I would like to know if there is a encryption algorithm that returnsonly lowercase encrypted string.Thanks in advance. No modern algorithm does this, though many classical algorithms will do so: Ceasar, Playfair, Vigenere etc. These depend on the plaintext only having letters, no digits. What may be of more use to you is an encoding such as Base32 which only uses letters of a single case, though it also includes digits. See RFC 4648 (http://tools.ietf.org/html/rfc4648) for details. Encrypt using a modern algorithm (AES/Rijndael) and Base32 encode the resulting byte stream. If you really do need just lowercase letters, no digits, then you could do something like encode the cyphertext as hex and then use a single letter substitution for the digits: 0 -m, 1 -n etc. You would have to write this yourself. rossum Mar 20 '07 #3

 P: n/a Base-26 JR "rossum" >I would like to know if there is a encryption algorithm that returnsonly lowercase encrypted string.Thanks in advance. No modern algorithm does this, though many classical algorithms will do so: Ceasar, Playfair, Vigenere etc. These depend on the plaintext only having letters, no digits. What may be of more use to you is an encoding such as Base32 which only uses letters of a single case, though it also includes digits. See RFC 4648 (http://tools.ietf.org/html/rfc4648) for details. Encrypt using a modern algorithm (AES/Rijndael) and Base32 encode the resulting byte stream. If you really do need just lowercase letters, no digits, then you could do something like encode the cyphertext as hex and then use a single letter substitution for the digits: 0 -m, 1 -n etc. You would have to write this yourself. rossum Mar 20 '07 #4

 P: n/a JR wrote: "rossum" What may be of more use to you is an encoding such as Base32 whichonly uses letters of a single case, though it also includes digits. Base-26 Powers of 2 are *much* easier to do. Arne Mar 21 '07 #5

 P: n/a rossum wrote: On 19 Mar 2007 19:48:50 -0700, "Optimus" I would like to know if there is a encryption algorithm that returnsonly lowercase encrypted string. What may be of more use to you is an encoding such as Base32 which only uses letters of a single case, though it also includes digits. I happen to have a Base32 implementing in C# if someone is interested. Arne Mar 21 '07 #6

 P: n/a Easy is one thing, meeting the requirement is another. I prefer the latter. JR "Arne Vajhøj" "rossum" >What may be of more use to you is an encoding such as Base32 whichonly uses letters of a single case, though it also includes digits. Base-26 Powers of 2 are *much* easier to do. Arne Mar 21 '07 #7

 P: n/a JR http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet If replying to the group, please do not mail me too Mar 21 '07 #8

 P: n/a Actually, a common variation uses digits and letters but with confusing characters being equivalent - such as zero and o - and ignoring case. JR "Jon Skeet [C# MVP]" Easy is one thing, meeting the requirement is another.I prefer the latter. Base16 accomplishes both, of course... Base32 was certainly worth mentioning, as it's quite possible that the OP can deal with digits. -- Jon Skeet - http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet If replying to the group, please do not mail me too Mar 21 '07 #9

 P: n/a JR wrote: Easy is one thing, meeting the requirement is another. I prefer the latter. So are you claiming that no power of 2 base can meet requirements ? Arne Mar 22 '07 #10

 P: n/a It depends. If the requirement is to produce only lower case letters, there are 26 of them in English. If you also allow the digits you have 36. If you then disallow four letters, say l, o, s and i, you have 32. JR "Arne Vajhøj" Easy is one thing, meeting the requirement is another.I prefer the latter. So are you claiming that no power of 2 base can meet requirements ? Arne Mar 22 '07 #11

 P: n/a JR http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet If replying to the group, please do not mail me too Mar 22 '07 #12

 P: n/a On Wed, 21 Mar 2007 22:21:23 +0200, "JR" Actually, a common variation uses digits and letters but with confusingcharacters being equivalent - such as zero and o - and ignoring case.JR That is the Base32 that I mentioned, letters a to z and digits 2 to 7. rossum Mar 22 '07 #13

 P: n/a JR wrote: "Arne Vajhøj" JR wrote: >>Easy is one thing, meeting the requirement is another.I prefer the latter. So are you claiming that no power of 2 base can meetrequirements ? It depends. If the requirement is to produce only lower case letters, there are 26 of them in English. If you also allow the digits you have 36. If you then disallow four letters, say l, o, s and i, you have 32. Jon Skeet has already posted the fact that 2^4 <= 26 twice ! So no - it does not depend. Arne Mar 25 '07 #14

 P: n/a I actually have this requirnment as well. We are encrypting our URL using TripDES and its case sensitive alphanumberic string. Now seems there are email scanning tools that rewrite URLs to all lower case. I have verified an email that is being sent to an AOL user is the proper case - when it comes back to us the URL is all lower case. According to the return headers the email is getting realyed through some spamscanner.test.aol.com. I think this method will work.. http://www.eggheadcafe.com/articles/20060427.asp - being this is NOT encryption rather obfuscation - which is fine for us.. but this combination of HEX encoding should work fine - I need to test.. but I should be able to do an upper on the string if it is converted to lowercase and be off and running. *** Sent via Developersdex http://www.developersdex.com *** Mar 27 '07 #15

 P: n/a Ken P http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet If replying to the group, please do not mail me too Mar 27 '07 #16

### This discussion thread is closed

Replies have been disabled for this discussion.