By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,890 Members | 1,226 Online
Bytes IT Community
+ Ask a Question
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
Share this Question
Share on Google+
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" <sa******@gmail.comwrote in message
news:11**********************@e65g2000hsc.googlegr oups.com...
>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" <sa******@gmail.comwrote:
>I would like to know if there is a encryption algorithm that returns
only 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
JR
Base-26

JR

"rossum" <ro******@coldmail.com???
??????:5n********************************@4ax.com. ..
On 19 Mar 2007 19:48:50 -0700, "Optimus" <sa******@gmail.comwrote:
>>I would like to know if there is a encryption algorithm that returns
only 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" <ro******@coldmail.com???
>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.
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" <sa******@gmail.comwrote:
>I would like to know if there is a encryption algorithm that returns
only 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
JR
Easy is one thing, meeting the requirement is another.

I prefer the latter.

JR
"Arne Vajhøj" <ar**@vajhoej.dk???
??????:46***********************@news.sunsite.dk.. .
JR wrote:
>"rossum" <ro******@coldmail.com???
>>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.
Base-26

Powers of 2 are *much* easier to do.

Arne

Mar 21 '07 #7

P: n/a
JR <No****@qsm.co.ilwrote:
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 - <sk***@pobox.com>
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
JR
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]" <sk***@pobox.com???
??????:MP************************@msnews.microsoft .com...
JR <No****@qsm.co.ilwrote:
>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 - <sk***@pobox.com>
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
JR
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" <ar**@vajhoej.dk???
??????:46***********************@news.sunsite.dk.. .
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 #11

P: n/a
JR <No****@qsm.co.ilwrote:
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.
The requirement can certainly be met using just base 16. Just because
you're restricted to lower-case letters doesn't imply that you have to
use all of them.

Heck, you could encode the data in binary, as "l" and "o" for "1" and
"0".

--
Jon Skeet - <sk***@pobox.com>
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" <No****@qsm.co.ilwrote:
>Actually, a common variation uses digits and letters but with confusing
characters 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" <ar**@vajhoej.dk???
??????:46***********************@news.sunsite.dk.. .
>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 ?
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 <ke**@blueskyfactory.comwrote:
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.
Really? That's appalling, given that although email addresses shouldn't
be treated case-sensitively, URLs *definitely* can.
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.
Ah... why am I not terribly surprised? ;)
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.
Surely TripleDES has given you a byte array, in which case just "hex-
encoding" that would be simpler, wouldn't it?

--
Jon Skeet - <sk***@pobox.com>
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.